# Thread: sum of two squares proof

1. ## sum of two squares proof

Show that 8k+7 cannot be the sum of three squares

2. I might be reaching a bit here but I can show it can be the sum of 2 squares.

$(\sqrt{8k})^2+(\sqrt{7})^2 = 8k+7$

3. ## My mistake

It should be three squares.

4. I won't write it all out explicitly for you, but here is how you would go about it, there will be lots of cases and things for you to work out.

first of all you look at the residue classes mod 8. If it could be done, then you would need to be able to satisfy $7\equiv a^2 + b^2 + c^2$ (mod 8).

$0^2 \equiv 0$ (mod 8)
$1^2 \equiv 1$ (mod 8)
$2^2 \equiv 4$ (mod 8)
$3^2 \equiv 1$ (mod 8)
$4^2 \equiv 0$ (mod 8)
$5^2 \equiv 1$ (mod 8)
$6^2 \equiv 4$ (mod 8)
$7^2 \equiv 1$ (mod 8)

There is no way to add 3 numbers coming from the set {0,1,4} (repetition obviously allowed) and get 7 (mod 8). Therefore it cannot be done.