# How do I show that if $m^2 + n^2 + p^2 \equiv 0 \pmod 5$ then at least one of them is divisible by $5$? [closed]

How do I show that if $$m^2 + n^2 + p^2 \equiv 0 \pmod 5$$ then at least one of $$\{m,n,p\}$$ is divisible by 5?

• At least one of what is divisible by $5$? – fleablood Oct 13 '19 at 18:59

This is quite standard. The only squares mod 5 are 0, 1 and 4. Then if you have that the sum of tree squares that gives 0, at least one of them has to be zero (just check all posibilities $$1+1+1=3\neq 0,1+1+4=1\neq 0$$ and so on).
If $$k \equiv 0,\pm 1, \pm 2 \pmod 5$$ then $$k^2 \equiv 0,1,-1\pmod 5$$.
So none of $$m,n$$ or $$p$$ are divisible by $$5$$ then none of $$m,n,p \equiv 0 \pmod 5$$ and none of $$m^2, n^2, p^2 \equiv 0 \pmod 5$$. So all of $$m^2, n^2, p^2 \equiv \pm 1 \pmod 5$$.
So $$m^2 + n^2 + p^2 \equiv \pm 1 + \pm 1 + \pm 1$$. The only possible values for those is $$-3,-1,1$$ or $$3$$. So $$m^2 + n^2 +p^2$$ being divisible by $$5$$ is impossible unless one of $$m,n$$ or $$p$$ is divisible by $$5$$.