What is the formula for the $n$th term of the interesting sequence?

  • Topic:
  • Thread starter Thread starter alexmahone
  • Start date Start date
  • Tags Tags
    Interesting Sequence
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
3 replies · 3K views
alexmahone
Messages
303
Reaction score
0
Let $a_n$ be the $n$th term of the sequence $1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, ...,$ constructed by including the integer $k$ exactly $k$ times. Show that $a_n=\lfloor\sqrt{2n}+\frac{1}{2}\rfloor$.

(Hints only as this is an assignment problem.)
 
Physics news on Phys.org
Hint: when does the $k$th digit first and last appear in the sequence? Use the triangular numbers.
 
The integer $k$ first appears at the $\left[\dfrac{(k-1)k}{2}+1\right]$th position and last appears at the $\left[\dfrac{(k-1)k}{2}+k\right]$th position.

Not sure where to go from here.
 
So that tells you that the sequence increments immediately after every index of the form $n = (k - 1)k/2 + k = k(k + 1)/2$, and nowhere else, right? So if you can show that the expression you are given $\sqrt{2n} + 1/2$ increments for exactly the same $n$'s, then the floor of that must be equivalent to your sequence.