Question: An infinite sequence of pairwise distinct numbers $a\_1, a\_2, a\_3, ...$ is defined thus: $a\_n$ is the smallest positive integer number such that $\sqrt{a\_n+\sqrt{a\_{n-1}+...+\sqrt{a\_1}}}$ is positive integer.

Prove that the sequence $ a\_1, a\_2, a\_3, ... $ contains all positive integers numbers.

### My work:

Let $a\_1=1$. Then $\sqrt{a\_2+1}$ is positive integer and $a\_2$ is the smallest positive integer then $a\_2=3$.

Then $\sqrt{a\_3+2}$ is positive integer and $a\_3$ is the smallest positive integer then $a\_3=2$.

Then $\sqrt{a\_4+\sqrt{a\_3+\sqrt{a\_{2}+\sqrt{a\_1}}}}=\sqrt{a\_4+2}$ is positive integer and $a\_4$ is the smallest positive integer and $a\_4\not=a\_1,a\_2,a\_3$ then $a\_4=7$.

Answer: 
Consider the sequence of square roots $s\_n$, where $s\_n=\sqrt{a\_n+s\_{n-1}}$. This sequence starts out $1,2,2,3,3,4,3,5,3,\ldots$. If we can show that every positive integer occurs at least once in this sequence, then we can conclude that every positive integer occurs (exactly once) in the sequence of $a\_n$'s: each integer $k$ must occur among the $a\_n$'s no later than the first time $s\_{n-1}=k^2-k$.

Observe first that the sequence of $s\_n$'s cannot recycle a finite set of values infinitely often, since $a\_n=s\_n^2-s\_{n-1}$ must not repeat. So there must be an infinite number of "new" values in the sequence.

To show that every positive integer occurs in the sequence of $s\_n$'s, it suffices to show that each "new" value in the sequence is precisely one more than the previous "new" value -- e.g., $7$ won't occur as an $s\_n$ until after $6$ has occurred. To prove this, note that if $s\_1,s\_2,\ldots,s\_{n-1}\le k$, then $a\_1,a\_2,\ldots,a\_{n-1}\lt k^2$ (since $a\_j=s\_j^2-s\_{j-1}$). Since $(k+1)^2-s\_{n-1}\ge k^2+k-1\gt a\_j$ for all $j\lt n$ and $a\_n$ is the *smallest* positive integer (not already in the sequence) for which $a\_n+s\_{n-1}$ is a square, we must have $s\_n\le k+1$.
*(not an answer, only meant to share my astonishment)*

Look at it, guys! Just freaking **look** at it!

First 50 terms:
1, 3, 2, 7, 6, 13, 5, 22, 4, 33, 10, 12, 21, 11, 32, 19, 20, 31, 30, 43, 9, 45, 18, 44, 29, 58, 8, 60, 17, 59, 28, 75, 16, 76, 27, 94, 15, 95, 26, 115, 14, 116, 25, 138, 24, 163, 23, 190, 35, 42.

First 200 terms:
[![First 200 terms](https://i.stack.imgur.com/VC6nW.png)](https://i.stack.imgur.com/VC6nW.png)

First 1000 terms:
[![First 1000 terms](https://i.stack.imgur.com/flLwZ.png)](https://i.stack.imgur.com/flLwZ.png)

First 5000 terms:
[![First 5000 terms](https://i.stack.imgur.com/6tBnD.png)](https://i.stack.imgur.com/6tBnD.png)

My first guess was that the thing is chaotic, and we won't ever be able to prove a thing. Now I've changed my mind.