Prove that there exist infinitely many values of $n$ such that $z_n, z_{n+1}, …, z_{n+2019}$ are all odd.

elementary-number-theorysums-of-squares

Let all numbers of form $x^2 +y^2$ where $x, y$ are coprime integers be arranged in a sequence $z_1 < z_2 < z_3 < . . ..$
(So the sequence begins $z_1 = 2 = 1^2 + 1^2 , z_2 = 5 = 1^2 + 2^2 , z_3 = 10 = 1^2 + 3^2$.) Prove that there exist infinitely many values of $n$ such that $z_n, z_{n+1}, …, z_{n+2019}$ are all odd.

This is from the Poland math olympiad the year $2019$.

Let $S$ be the set containing all of these numbers. Note that $z\in S$ means $z$ doesn't have a prime factor that is $\equiv 3\pmod 4$. The proof is simple, assume on the contrary that there exists $z \in S$ with $p\equiv 3\pmod 4$ being a prime factor of $z$. Then $$p\mid z=x^2+y^2\implies p\mid x \text{ and } p\mid y\implies p\mid (x,y)=1$$
A contradiction (any prime$\equiv 3\pmod 4$ has this property).

Now according to this question $z\in S \iff z$ is not divisible by $4$ and doesn't have any prime factor of the form $4k+3$. With this we have classified all the numbers in $S$.

Best Answer

The solution has been posted on this post on AoPS

To continue the solution outlined in the comment(which is similar to the AoPS solution, but we are constructing an $a$ such that $(a - i + 1)^2 + (a + i)^2(1 \leq i \leq 2019)$ are consecutive elements of $a_n$), you can

  1. Take $a$ to be divisible by $10000!$, so that $(a - i + 1, a + i) = 1$ for all $1 \leq i \leq 2019$.

  2. For each $j \in [1, 2018^2 + 2019^2]$ such that $2j + 1$ is not a square, pick a distinct prime $p_j \equiv 3 \bmod 4$ greater than $10000$ and a $b_j$ such that $p | (2b_j + 1)^2 + 2j + 1$. It is possible to show that infinitely many such $p_j$ exists as $2j + 1$ is not a square. By CRT, we can take $a$ such that $a \equiv b_j \bmod p_j$ for each $j$. This ensures that $2a^2 + 2a + j$ cannot be written as $x^2 + y^2$ for $x,y$ coprime.