The sequence of positive integers $a_1, a_2, a_3, ...$ satisfies $a_{n+1} = a^2_{n} + 2018$ for $n \ge 1$. Prove that there exists at most one $n$ for which $a_n$ is the cube of an integer.
Problem
Source: Irmo 2018 p2 q9
Tags: perfect cube, Sequence, recurrence relation, number theory
16.09.2018 18:13
Note that cubic residues in modulo $7$ are $0,1,6$. Let $a_k$ be the smallest integer which is a cube; let $a_k=a^3$. Note that, $a_{k+1}=a^6+2018$. If $a_k\not\equiv 0\pmod{7}$, then $a_{k+1}\equiv 3\pmod{7}$, $a_{k+2}\equiv 4\pmod{7}$, and for every $n\geq k+2$, $a_n\equiv 4\pmod{7}$, hence there could be at most one such guy. If $a_k\equiv 0\pmod{7}$; then $a_k\equiv a_{k-1}^2+2\equiv 0\pmod{7}$, giving that $a_{k-1}^2\equiv -2\pmod{7}$. However, since $-2$ is not a quadratic residue, this is impossible.
09.11.2018 20:12
grupyorum wrote: Note that cubic residues in modulo $7$ are $0,1,6$. Let $a_k$ be the smallest integer which is a cube; let $a_k=a^3$. Note that, $a_{k+1}=a^6+2018$. If $a_k\not\equiv 0\pmod{7}$, then $a_{k+1}\equiv 3\pmod{7}$, $a_{k+2}\equiv 4\pmod{7}$, and for every $n\geq k+2$, $a_n\equiv 4\pmod{7}$, hence there could be at most one such guy. If $a_k\equiv 0\pmod{7}$; then $a_k\equiv a_{k-1}^2+2\equiv 0\pmod{7}$, giving that $a_{k-1}^2\equiv -2\pmod{7}$. However, since $-2$ is not a quadratic residue, this is impossible. But what if $k=1$? Then $a_{k-1}$ does not exist.
09.11.2018 20:29
Here is the fix of the argument: So the only possibly bad case is when $a_1$ is a cube divisible by $7$. But then $a_2 \equiv 2 \mod 7, a_3 \equiv 6 \mod 7$, $a_4 \equiv 3 \mod 7$ and $a_k \equiv 4 \mod 7$ for $k \ge 5$. So the only possible other cube is $a_3$. However, we can consider modulo $9$. Clearly $a_1 \equiv 0 ,\pm 1\mod 9$. Then $a_2 \equiv 2,3 \mod 9$. Then $a_3 \equiv 6,2 \mod 9$ and hence cannot be a cube.
09.11.2018 20:38
Actually it is much nicer to consider the sequence modulo $9$ right from the start. The only cubic residues are $0,\pm 1$. Starting from $0$ we get the sequence $0 \mapsto 2 \mapsto 6 \mapsto 2 \mapsto \dots$ and we are forever trapped in non-residues. Starting from $\pm 1$ we get the sequence $\pm 1 \mapsto 3 \mapsto 2 \mapsto 6 \mapsto 2 \mapsto \dots$ and again we are trapped. So we never find two occurences of cubic residues modulo $9$ in the sequence.