# proof that the sum of 5 consecutive squares can not be a perfect square

Since I can't comment on that thread and have trouble understanding the proof, I'm starting this thread.

I understand that there are perfect squares that are divisible by 5 and I also understand that

$(n^2+2) mod 5\equiv 2,3 \Rightarrow 5 \nmid (n^2+2)$,

but why does that mean $5(n^2+2)$ can not be a perfect square?

• If a prime $p$ divides $a^2$, then it divides $a$. But then $p^2$ must divide $a^2$. In your case $p=5$ divides $5(n^2+2)$, but $5^2$ doesn't divide it.
– EEE
Oct 15, 2017 at 18:55
• @EEE Thank you, $p^2$ must divide $a^2$ since we assume $a^2$ is a perfect square, right? Oct 15, 2017 at 19:05

If a number $t$ is a perfect square, it is the square of some integer, so let that integer be $k$, i.e. $t=k^2$, now since $5|t$, $5|k$ so $5$ is in $k$'s prime facorisation, therefore $n$ must be $5^2$(some integer), i.e. $25|t$
If $5(n^2+2)$ is not divisible by $25$, you are done. That is , when $5$ does not divide $n^2+2$