Prove that there is no 333 consecutive prime numbers such that sum of their squares is also a square.

elementary-number-theory

Prove that there is no 333 consecutive prime numbers such that sum of their squares is also a square.

Such square is of course not divisble by $2$.

Let $p$ be prime number not equal to $2$ than:
$$333 \times p^2 \equiv 333\equiv 1\pmod{4}$$
Not proven.

Let $p$ be prime number not equal to $3$ than:
$$333 \times p^2 \equiv 333\equiv 0\pmod 3$$
That means that this square would be divisible by $9$

I did not know how to use fact that those primes are consecutive.

Best Answer

You have the right idea regarding checking modulo values, but using $8$ works better for the general case. If the first prime number is not $2$, then each of the consecutive prime numbers is odd. Thus, each of their squares would be congruent to $1$ modulo $8$. Also, the sum of these squares must be odd, so if that sum is a perfect square, then it must also be congruent to $1$ modulo $8$.

However, the sum of the $333$ squares would be congruent to $333 \equiv 5 \pmod 8$, so it can't be a perfect square.

If, instead, the first prime is $2$, then there would be $332$ primes which are not a multiple of $3$, so each of their squares would be congruent to $1$ modulo $3$. Thus, the sum of all the $333$ prime squares would be congruent to $332 \equiv 2 \pmod{3}$, which is not congruent to any perfect square.