# Integer as Sum of 5 Non-Zero Squares

Jump to navigation Jump to search

## Theorem

Let $n \in \Z$ be an integer such that $n > 33$.

Then $n$ can be expressed as the sum of $5$ non-zero squares.

## Proof

From Lagrange's Four Square Theorem, every positive integer can be expressed as the sum of $4$ squares, some of which may be zero.

The existence of positive integers which cannot be expressed as the sum of $4$ non-zero squares is noted by the trivial examples $1$, $2$ and $3$.

Thus Lagrange's Four Square Theorem can be expressed in the form:

$(1): \quad$ Every positive integer can be expressed as the sum of $1$, $2$, $3$ or $4$ non-zero squares.

We note the following from 169 as Sum of up to 155 Squares:

 $\displaystyle 169$ $=$ $\displaystyle 13^2$ $\displaystyle$ $=$ $\displaystyle 12^2 + 5^2$ $\displaystyle$ $=$ $\displaystyle 12^2 + 4^2 + 3^2$ $\displaystyle$ $=$ $\displaystyle 8^2 + 8^2 + 5^2 + 4^2$ $\displaystyle$ $=$ $\displaystyle 8^2 + 8^2 + 4^2 + 4^2 + 3^2$

Let $n > 169$.

Then $n$ can be expressed as:

$n = m + 169$

where $m \ge 1$.

From $(1)$, $m$ can be expressed as the sum of sum of $1$, $2$, $3$ or $4$ non-zero squares.

Thus at least one of the following holds:

$m = a^2$
$m = a^2 + b^2$
$m = a^2 + b^2 + c^2$
$m = a^2 + b^2 + c^2 + d^2$

Thus one of the following holds:

 $\displaystyle n$ $=$ $\displaystyle a^2 + b^2 + c^2 + d^2 + 13^2$ $\displaystyle n$ $=$ $\displaystyle a^2 + b^2 + c^2+ 12^2 + 5^2$ $\displaystyle n$ $=$ $\displaystyle a^2 + b^2 + 12^2 + 4^2 + 3^2$ $\displaystyle n$ $=$ $\displaystyle a^2 + 8^2 + 8^2 + 5^2 + 4^2$

It remains to be shown that of the positive integers less than $169$, all but the following can be expressed in this way:

$1, 2, 3, 4, 6, 7, 9, 10, 12, 15, 18, 33$

First we show the ones which can:

 $\displaystyle 5$ $=$ $\displaystyle 1^2 + 1^2 + 1^2 + 1^2 + 1^2$ $\displaystyle 8$ $=$ $\displaystyle 2^2 + 1^2 + 1^2 + 1^2 + 1^2$ $\displaystyle 11$ $=$ $\displaystyle 2^2 + 2^2 + 1^2 + 1^2 + 1^2$ $\displaystyle 13$ $=$ $\displaystyle 3^2 + 1^2 + 1^2 + 1^2 + 1^2$ $\displaystyle 14$ $=$ $\displaystyle 2^2 + 2^2 + 2^2 + 1^2 + 1^2$ $\displaystyle 16$ $=$ $\displaystyle 3^2 + 2^2 + 1^2 + 1^2 + 1^2$ $\displaystyle 17$ $=$ $\displaystyle 2^2 + 2^2 + 2^2 + 2^2 + 1^2$ $\displaystyle 19$ $=$ $\displaystyle 3^2 + 2^2 + 2^2 + 1^2 + 1^2$ $\displaystyle 20$ $=$ $\displaystyle 2^2 + 2^2 + 2^2 + 2^2 + 2^2$ $\displaystyle 21$ $=$ $\displaystyle 3^2 + 3^2 + 1^2 + 1^2 + 1^2$ $\displaystyle 22$ $=$ $\displaystyle 3^2 + 2^2 + 2^2 + 2^2 + 1^2$ $\displaystyle 23$ $=$ $\displaystyle 4^2 + 2^2 + 1^2 + 1^2 + 1^2$ $\displaystyle 24$ $=$ $\displaystyle 3^2 + 3^2 + 2^2 + 1^2 + 1^2$ $\displaystyle 25$ $=$ $\displaystyle 3^2 + 2^2 + 2^2 + 2^2 + 2^2$ $\displaystyle 26$ $=$ $\displaystyle 4^2 + 2^2 + 2^2 + 1^2 + 1^2$ $\displaystyle 27$ $=$ $\displaystyle 3^2 + 3^2 + 2^2 + 2^2 + 1^2$ $\displaystyle 28$ $=$ $\displaystyle 4^2 + 3^2 + 1^2 + 1^2 + 1^2$ $\displaystyle 29$ $=$ $\displaystyle 3^2 + 3^2 + 3^2 + 1^2 + 1^2$ $\displaystyle 30$ $=$ $\displaystyle 3^2 + 3^2 + 2^2 + 2^2 + 2^2$ $\displaystyle 31$ $=$ $\displaystyle 4^2 + 3^2 + 2^2 + 1^2 + 1^2$ $\displaystyle 32$ $=$ $\displaystyle 4^2 + 2^2 + 2^2 + 2^2 + 2^2$ $\displaystyle 34$ $=$ $\displaystyle 4^2 + 3^2 + 2^2 + 2^2 + 1^2$ $\displaystyle 35$ $=$ $\displaystyle 4^2 + 4^2 + 1^2 + 1^2 + 1^2$ $\displaystyle 36$ $=$ $\displaystyle 4^2 + 3^2 + 3^2 + 1^2 + 1^2$ $\displaystyle 37$ $=$ $\displaystyle 3^2 + 3^2 + 3^2 + 3^2 + 1^2$ $\displaystyle 38$ $=$ $\displaystyle 4^2 + 4^2 + 2^2 + 1^2 + 1^2$ $\displaystyle 39$ $=$ $\displaystyle 4^2 + 3^2 + 3^2 + 2^2 + 1^2$ $\displaystyle 40$ $=$ $\displaystyle 3^2 + 3^2 + 3^2 + 3^2 + 2^2$ $\displaystyle 41$ $=$ $\displaystyle 4^2 + 4^2 + 2^2 + 2^2 + 1^2$ $\displaystyle 42$ $=$ $\displaystyle 4^2 + 3^2 + 3^2 + 2^2 + 2^2$