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 3 of 5: If 3∤a03\nmid a_0, the sequence is unbounded
an≡2 (mod 3)  ⟹  an+1=an+3a_n\equiv 2\ (\mathrm{mod}\ 3)\implies a_{n+1}=a_n+3
Detailed analysis

Perfect squares are ≡0\equiv 0 or 1(mod3)1\pmod 3, never 22. So a term ≡2(mod3)\equiv 2\pmod 3 is never a square, forcing an+1=an+3a_{n+1}=a_n+3 forever after, and the sequence grows without bound. If instead an≡1(mod3)a_n\equiv 1\pmod 3 for every nn, follow the arithmetic progression an,an+3,an+6,…a_n,a_n+3,a_n+6,\ldots (which visits every integer ≡1(mod3)\equiv 1\pmod 3 above ana_n) until it meets its first perfect square K2K^2; taking KK to be the least integer ≥⌈an⌉\ge\lceil\sqrt{a_n}\rceil with 3∤K3\nmid K gives K≤an+2K\le \sqrt{a_n}+2, so the next term KK is strictly smaller than ana_n whenever an≥7a_n\ge 7. Repeating this descent, the value must eventually reach 4=224=2^2, whose successor is 2≡2(mod3)2\equiv 2\pmod 3. So sooner or later a term ≡2(mod3)\equiv 2\pmod 3 appears, and the sequence is unbounded.