# How to show a number is not a sum of three squares

I've been tasked with the following:

Let $m$ and $n$ be positive integers, prove that $4^{n}(8m+7)$ cannot be written as the sum of three squares.

I've already gotten the idea that I should do it by contradiction, and that some modulus arithmetic will come into play, but things like which modulus and really where to start past assuming it is the sum of three squares has got me stumped. Any ideas?

• Do you know anything about the congruence properties of odd squares to even moduli? There is one key fact to find. If you don't know it, write out the first few odd squares and see if you notice anything (you might take the differences). – Mark Bennet Nov 17 '14 at 22:17
• One thing could be that $4^n(8m+7)\equiv 0 \pmod 4$, which implies that $x^2,y^2,z^2\equiv 0 \pmod 4$, as for any square $n^2\equiv 0 ,1 \pmod 4$, so they must all be congruent to 0 to add to a multiple of 4. – NickC Nov 17 '14 at 22:18
• Also holds true when $n=0,$ meaning the odd numbers $8m+7$ – Will Jagy Nov 17 '14 at 22:41