Help with definition for two OEIS sequences

8 views
Skip to first unread message

Aitzaz Imtiaz

unread,
Mar 31, 2026, 8:26:56 AM (17 hours ago) Mar 31
to SeqFan
Greetings,
  I need help with definitions of two OEIS sequences that I cannot come up with since usually I propose recreational sequences not knowing how to define them much. The basic idea is to sum up a triangular array and make a wave pattern on it.

A387365 has the diagram:
a387365.jpg
I posted this as a challenge on Code Golf and someone came up with:

 a(n) = (n+1) * 2^abs(n - 1 - c*(c-1)) / 2, where c = ceiling(sqrt(n)).

 This became the agreed definition for this sequence as I failed to come up with any definition.
a393645_1.jpg
Around later, I wanted a crossref for this as a new wave pattern:
a393645_1.jpg
I did not consult the Code Golf this time and took it as a challenge to try to find formula for these horizontal waves after studying how absolute function works as conditional. So I came up with:  

a(n) = (n + 3*k + 3 - 3*abs(n - k^2 - 1))/2 * 2^((n - k - 3 + abs(n - k^2 - 1))/2) where k = round(sqrt(n)).

Someone pointed out if this seems random, and it does appear quite random as the formula looks big (I did not want the formula in A387365 as definition to begin with but that was a last resort).  I would appreciate if someone adds an extension and change definition of A387365, or else help guide me and hint me a possible good definition so the submission of this newer sequence goes smooth,

I will be much thankful for any assistance.

Regards,
Aitzaz.
Reply all
Reply to author
Forward
0 new messages