Let $a_1, a_2, ... , a_{1000}$ be a sequence of integers such that $a_1=3, a_2=7$ and for all $n=2, 3, ... , 999$ $a_{n+1}-a_n=4(a_1+a_2)(a_2+a_3) ... (a_{n-1}+a_n)$. Find the number of indices $1\leq n\leq 1000$ for which $a_n+2018$ is a perfect square.
Problem
Source: 2018 JBMO TST - Turkey, P5
Tags: NumberTheory
28.03.2020 00:11
We start by observing $a_{n+1}\equiv a_n\equiv 3\pmod{4}$, for every $n$. Now note that $a_{k+1}-a_k = 4(a_1+a_2)\cdots (a_{k-2}+a_{k-1})\cdot (a_{k-1}+a_k) =a_k^2-a_{k-1}^2$. In particular, summing both for $k=2,3,\dots,n$, we get the formula: $a_{n+1}=a_n^2-2$. That is, $a_n+2018=a_{n-1}^2+2016$. From now on, we study the Diophantine equation $a_{n-1}^2+2016 = t^2 \iff (t-a_{n-1})(t+a_{n-1})$, while keeping in mind that $a_{n-1}\equiv 3\pmod{4}$. In particular, this forces $t$ to be odd. The rest can be done by brute force if necessary, but there are many cases so one must act wiser -- $2016 = 2^5\cdot 3^2\cdot 7$ has $36$ divisors. So, I'll sketch an argument to ``reduce" the number of cases: note that either $2\mid\mid t-a_{n-1}$ or $2\mid \mid t+a_{n-1}$. Start with the former, let $t-a_{n-1}=2q$ and $t+a_{n-1}=2^4\cdot 63/q$ where $q\mid 63$. Then, $a_{n-1}=8\cdot 63/q - q$. In particular since $a_{n-1}\equiv -1\pmod{4}$, this forces $q\equiv 1\pmod{4}$. From here, there are three possibilities: $q\in\{1,9,21\}$. For $q=1$, $a_{n-1}=503$, which is not a member of the sequence. For $q=9$, $a_{n-1}= 47$, which is satisfied for $n=4$. Indeed, $a_4^2+2016=65^2$. For $q=21$, we obtain $a_{n-1}=3$, that is, $n=2$. Indeed $a_2+2018=45^2$. Now I leave the case where $2\mid\mid t+a_{n-1}$ as an exercise -- which can be handled analogously
30.04.2021 23:09
Here is a different finish after \((t-a_{n-1})(t+a_{n-1})=2016\). We have \(t \le 1010\). For \(n \ge 5\) we cannot have \(a_{n-1}^2+2016 = t^2\) because \(a_4^2+2016=(47^2-2)^2+2016 > 1010^2 \ge t^2\). Checking \(n=1,2,3,4\) gives solutions \(n=2,4\).
01.01.2025 15:46
Induction by $\boxed{a^2_n=a_{n-1}+2}$ so we want $a^2_k+2016=m^2$ which is just case bash with $a_n$ being odd etc.