## No Number of Form 4^n(8m+7) Can Be Written as a Sum of Three Squares

Theorem (Integer as a Sum of Three Squares)
A positive integer
$n$
cannot be expressed as the sum of three squares if it is of the form
$4^n(8m+7)$
.
Proof
The squares modulo 8 are 0,1, 4 so a sum of three squares can be congruent modulo 8 to any of the numbers 0, 1, 2, 3, 4, 5, 6 but not 7. Hence no number of the form
$8m+7$
can be a sum of three squares.
Suppose for some
$n \gt 1, \; m \ge 0$
we have
$4^n(8m+7)=x^2+y^2+z^2$
.
The left hand side of the last expression is congruent modulo 4 to 0 and as squares modulo 4 are either 0 or 1, it has to be the case that
$x, \; y, \; z$
are all even. Put
$x=2x_1, \; y=2y_1. \; z=2z_1$
we get
$4^{n-1}(8m+7)=x_1^2+y_1^2+z_1^2$
.
If
$n-1 \gt 1$
then
$x_1, \; y_1, \; z_1$
are all even and we can write
$4^{n-2}(8m+7)=x_2^2+y_2^2+z_2^2$
.
We can continue in this way, eventually expressing
$8m+7$
as a sum of three square - a contradiction so the assumption that
$4^n(8m+7)$
can be written as a sum of three squares is false. 