MathLabs

Problem 1

For each integer a0>1a_0>1, define the sequence a0,a1,a2,…a_0,a_1,a_2,\ldots for n≥0n\ge 0 by an+1={anif an is an integer,an+3otherwise.a_{n+1}=\begin{cases}\sqrt{a_n} & \text{if }\sqrt{a_n}\text{ is an integer},\\ a_n+3 & \text{otherwise}.\end{cases} Determine all values of a0a_0 for which there exists a number AA such that an=Aa_n=A for infinitely many values of nn.
Step 4 of 5: If 3∣a03\mid a_0, the sequence is bounded
an≥12, 3∣an  ⟹  an′<ana_n\ge 12,\ 3\mid a_n\implies a_{n'}<a_n
Detailed analysis

By the previous invariant every term is a multiple of 33. A perfect square that is a multiple of 33 must be a multiple of 99 (again since 33 is prime). So while a term an≥12a_n\ge 12 is not yet a square, following an,an+3,an+6,…a_n,a_n+3,a_n+6,\ldots reaches its first square multiple of 99, namely 9t29t^2 for the least tt with 3t≥an3t\ge\sqrt{a_n}; the next term is then 3t≤an+3<an3t\le\sqrt{a_n}+3<a_n. Iterating this descent, the sequence must eventually drop below 1212, landing on one of 3,6,93,6,9, and from there it cycles forever: 3→6→9→3→⋯3\to 6\to 9\to 3\to\cdots. So the whole sequence is bounded.