3

I had thought about this sequence (where each positive integer $n$ shows up $n$ times) the other day and think I have a closed form solution. First of all we know that the last time that $k$ shows up in the sequence is at $a_{\frac{k(k+1)}{2}}$. We want to see if $a_n$ is one of these last occurrences. So we solve $$\frac{k(k+1)}{2} = n$$ for $k$. If $k$ is an integer then we know $a_n = k$ but if $k$ is not an integer then $a_n$ must be $\left \lceil k \right \rceil$ since the last occurrence of $\left \lfloor k \right \rfloor$ occurred before $n$. Therefore the value of $a_n$ is: $$\left \lceil \frac{\sqrt{8n+1} -1}{2}\right \rceil$$ Is this correct? Is there anything interesting about this sequence other that that the sum of it values and the sum of its reciprocals both diverge? Thanks.

Cameron Buie
  • 102,994
Patrick
  • 2,106

1 Answers1

1

Your reasoning and result looks good. For more details and interesting properties on this sequence, have a look at the OEIS database. Note, that they also give the closed form expression assuming $n \ge 0$ (as against your $n \ge 1$) as follows:

$$\left \lfloor \frac{\sqrt{8n+1} + 1}{2}\right \rfloor, n\ge 0$$

For your definition ($n$ starts from 1), they also provide another closed for expression as:

$$\left \lfloor \frac{1}{2} + \sqrt{2n}\right \rfloor$$

You can look up the database for other properties and references for this sequence.

Paresh
  • 836
  • 5
  • 12