What is this "periodic" sequence called?

118 Views Asked by At

I came across this weird "periodic" sequence (containing only natural numbers) where the first 15 elements are

$$1, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 7, 8.$$

The sequence is not finite, and to grows to a power of 2 and then resets to 1. If the sequence grows to $2^k$ ($k \in \mathbb{N}$) it will grow to $2^{k + 1}$ after resetting to 1.

Basically, the sequence is made up of "blocks" where the $n$th block contains all natural numbers from $1$ to $2^n$, and $n \in \mathbb{N}$.

I have a couple of questions about it.

  1. Do these type of sequences have a name? I would really love to learn more about them.
  2. An explicit formula that I have managed to find , by guessing and running code, is

$$a_{n} = 1 + (n \text{ mod } 2^{\lfloor \log_{2}n \rfloor}), \text { where n $\geq$ 1}.$$ I haven't actually proven that this formula expresses all elements in the sequence, how would one even approach it? I've tried with induction, but it feels like something is missning, like a recursive formula for the sequence.

1

There are 1 best solutions below

3
On
  1. I don't know of any name for this kind of sequence; perhaps someone else does.

  2. You can't "prove" that this is the right formula, because the sequence could continue with $$ 1,1,2,1,2,3,4,1,2,3,4,5,6,7,8, 0,0, 0, 0, 0, 0, \ldots $$ What you can do is observe that your solution gives the correct answer for all the examples actually shown, and perhaps argue that it's about as simple a formula as you could hope to get for such a thing. Anything beyond that is a statement about psychology rather than mathematics, I'm afraid.