<s>[INST] Show that an integer of the form $8k + 7$ cannot be written as the sum of three squares. I have figured out a (long, and tedious) way to do it. But I was wondering if there is some sort of direct correlation or another path that I completely missed.
My attempt at the program was as follows: 
A number of the form, $8k + 7 = 7 (mod 8)$. That is, we are looking for integers a, b, c such that $a^2 + b^2 + c^2 = 7 (mod 8)$. 
LONG and TEDIOUS way:
$$(8k)^2 = 0 (mod 8)$$
$$(8k+1)^2 = 1 (mod 8)$$
$$(8k+2)^2 = 4 (mod 8)$$
$$(8k+3)^2 = 1 (mod 8)$$
$$(8k+4)^2 = 0 (mod 8)$$
$$(8k+5)^2 = 1 (mod 8)$$
$$(8k+6)^2 = 4 (mod 8)$$
$$(8k+7)^2 = 1 (mod 8)$$
That is, using three of these modulo there is no way to arrive at 
$$a^2 + b^2 + c^2 = 7 (mod 8)$$
 [/INST] Note that $x^2\equiv (-x)^2\pmod 8$. So the squares mod $8$ are $0^2=0$, $1^2=1$, $2^2=4$ and $3^2=1$. It is evident that three of these numbers cannot add up $7$.
</s>