The infinite sequence $a_1,a_2,a_3,\ldots$ of positive integers is defined as follows: $a_1=1$, and for each $n \ge 2$, $a_n$ is the smallest positive integer, distinct from $a_1,a_2, \ldots , a_{n-1}$ such that: $$\sqrt{a_n+\sqrt{a_{n-1}+\ldots+\sqrt{a_2+\sqrt{a_1}}}}$$is an integer. Prove that all positive integers appear on the sequence $a_1,a_2,a_3,\ldots$
Problem
Source: Cono Sur Olympiad 2017, problem 6
Tags: cono sur, number theory
21.08.2017 22:26
Let $b_n=\sqrt{a_n+\sqrt{a_{n-1}+\ldots+\sqrt{a_2+\sqrt{a_1}}}}$ for each positive integer $n$. We get that $b_{n+1}^2=b_n+a_{n+1}$ for every $n\in \mathbb{Z}^+$. We'll show that every positive integer appears at least once in the sequence $\{ b_n\}_{n\in \mathbb{Z}^+}$. Suppose to the contrary that there exists positive integer $l$ that doesn't appear in the sequence. Note that the sequence $\{ b_n\}$ is unbounded, so there exists (smallest) positive integer $m$ that $b_m<l$ and $b_{m+1}>l$. Says $b_m=l-e_1$ and $b_{m+1}=l+e_2$. We get $a_{m+1}=(l+e_2)^2-(l-e_1)$. By the definition of $a_{m+1}$, and the fact that $a_{m+1}\neq l^2-(l-e_1)$, which will lead to $b_{m+1}=l$, we get that there's a positive integer $p$ that $p\leq m$ and $a_p=l^2-(l-e_1)$. Since $l^2-(l-e_1)>(l-1)^2$, we get that $b_p=\sqrt{ b_{p-1}+a_p}>l-1\Rightarrow b_p\geq l$. So there's an integer $j\leq p-1$, smaller than $m$, that $b_j<l$ and $b_{j+1}>l$. Contradiction. Now, suppose there exists positive integer $h$ that doesn't appear in the sequence $\{ a_n\}_{n\in \mathbb{Z}^+}$. It's clear that there exist positive integer $N$ that $a_n\geq h$ for all $n>N$. Since $h$ doesn't appear in the sequence, we get that, for $n>N$, $b_n+h$ is not a perfect square. Contradiction to the claim proved above, done.
27.08.2017 19:25
Last spam in this summer, too bad that school will start tomorrow. My idea is exactly the same as @ThE-dArK-lOrD, but anyway