Modular Arithmetic – Sum of Five Consecutive Squares Not a Perfect Square

modular arithmeticsquare-numbers

Prove that the sum of the squares of $5$ consecutive positive numbers can not be a perfect square.

As far I did,
$(n-2)^2 + (n-1)^2+n^2 + (n+1^2) + (n+2)^2$
$=2(n^2+4) + 2(n^2 + 1) + n^2$
$=5(n^2 + 2)$
If we can prove that this is not a perfect square then we are done. But I don't know how to prove it.

Best Answer

Any perfect square number is congruent $0,\pm1$ modulo $5$.

That is, $x \equiv 0,\pm1,\pm 2 \pmod 5 \Rightarrow x^2 \equiv 0,\pm1 \pmod 5 $

So $x^2+2 \equiv 1,2,3 \pmod 5$

Hence $5$ does not divide $n^2+2$ for any natural $n$.

So $5(n^2+2)$ is not a perfect square.