# Prove that there are an infinite number of natural numbers that cannot be written as the sum of three squares.

I am having trouble proving this. I know that I need to look at the quadratic residues mod 8 and that they are 1,4 or 0. However how do I prove that these are the equivalence classes of Z/3Z.

Then I can added the equivalence classes and show that none of them divide 8. How do I set this proof up?

## 1 Answer

We may be overthinking this. Residue $7$ modulo $8$ cannot be rendered as a sum of three residues each belonging to $\{0,1,4\}$. Proof: The sum can be odd only if there are an odd number of $1$'s; one $1$ gives a sum one greater than a multiple of $4$ and three $1$'s give $1+1+1\equiv 3$ not $7$. Done.

• I don't understand where the residue 7 mod 8 comes from. Can someone explain? – mathamasacre Sep 29 '16 at 15:53
• Because we need only one counterexample, and residue 7 is it. – Oscar Lanzi Sep 29 '16 at 16:52