# Odd Numbers Not Expressible as Sum of 4 Distinct Non-Zero Coprime Squares

## Theorem

The largest odd positive integer that cannot be expressed as the sum of exactly $4$ distinct non-zero square numbers with greatest common divisor $1$ is $157$.

The full sequence of such odd positive integers which cannot be so expressed is:

$1, \ldots, 37, 41, 43, 45, 47, 49, 53, 55, 59, 61, 67, 69, 73, 77, 83, 89, 97, 101, 103, 115, 157$

where the sequence contains all odd integers between $1$ and $37$.

This sequence appears not to be documented on the On-Line Encyclopedia of Integer Sequences (N. J. A. Sloane (Ed.), 2008).

## Proof

The statement of the result was taken from the paper cited below by Paul T. Bateman and others:

The largest odd integer not expressible as a sum of $4$ distinct non-zero squares with greatest common divisor $1$ is $157$.

By a brute force exercise, we assemble all the sets of $4$ distinct non-zero integers and calculate the sum of their squares such that those sums are less than $157$.

It is noted in passing that all such sets have a greatest common divisor of $1$.

Thus we have:

 $\ds 39$ $=$ $\ds 1 + 4 + 9 + 25$ $\ds = 1^2 + 2^2 + 3^2 + 5^2$ $\ds 51$ $=$ $\ds 1 + 9 + 16 + 25$ $\ds = 1^2 + 3^2 + 4^2 + 5^2$ $\ds 57$ $=$ $\ds 1 + 4 + 16 + 36$ $\ds = 1^2 + 2^2 + 4^2 + 6^2$ $\ds 63$ $=$ $\ds 1 + 4 + 9 + 49$ $\ds = 1^2 + 2^2 + 3^2 + 7^2$ $\ds 65$ $=$ $\ds 4 + 9 + 16 + 36$ $\ds = 2^2 + 3^2 + 4^2 + 6^2$ $\ds 71$ $=$ $\ds 1 + 9 + 25 + 36$ $\ds = 1^2 + 3^2 + 5^2 + 6^2$ $\ds 75$ $=$ $\ds 1 + 9 + 16 + 49$ $\ds = 1^2 + 3^2 + 4^2 + 7^2$ $\ds 79$ $=$ $\ds 1 + 2 + 25 + 49$ $\ds = 1^2 + 2^2 + 5^2 + 7^2$ $\ds 81$ $=$ $\ds 4 + 16 + 25 + 36$ $\ds = 2^2 + 4^2 + 5^2 + 6^2$ $\ds 85$ $=$ $\ds 1 + 4 + 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ds 1 + 16 + 49 + 81$ $\ds = 1^2 + 4^2 + 7^2 + 9^2$ $\ds$ $=$ $\ds 1 + 9 + 16 + 121$ $\ds = 1^2 + 3^2 + 4^2 + 11^2$ $\ds$ $=$ $\ds 9 + 25 + 49 + 64$ $\ds = 3^2 + 5^2 + 7^2 + 8^2$ $\ds 149$ $=$ $\ds 1 + 4 + 25 + 121$ $\ds = 1^2 + 2^2 + 5^2 + 11^2$ $\ds$ $=$ $\ds 4 + 9 + 36 + 100$ $\ds = 2^2 + 3^2 + 6^2 + 10^2$ $\ds 151$ $=$ $\ds 9 + 25 + 36 + 81$ $\ds = 3^2 + 5^2 + 6^2 + 9^2$ $\ds 153$ $=$ $\ds 4 + 36 + 49 + 64$ $\ds = 2^2 + 6^2 + 7^2 + 8^2$ $\ds 155$ $=$ $\ds 9 + 16 + 49 + 81$ $\ds = 3^2 + 4^2 + 7^2 + 9^2$

It remains to be demonstrated that the above sequence is indeed complete.

The original article by Franz Halter-Koch states:

Satz $3$. Genau dann is $n \in N$ nicht Summe von vier verschiedenen positiven (im Falle $n \not \equiv 0 \bmod 8$ auch teilerfremden) Quadraten, wenn entwieder
$n = 4^h a \quad$ mit $h \ge 0$ und $a \in \set {1, 2, \ldots, 19, 22, 23, 25, 26, 27, 31, 33, 34, 37, 38, 42, 43, 47, 55, 58, 67, 73, 82, 97, 103}$
oder
$n \in \set {21, 29, 35, 41, 45, 49, 53, 59, 61, 69, 77, 83, 89, 101, 115, 157}$

That is, in English:

Statement $3$. $n \in N$ is not the sum of four different positive squares (in the case where $n \not \equiv 0 \bmod 8$ also non-prime) if and only if:
$n = 4^h a \quad$ where $h \ge 0$ and $a \in \set {1, 2, \ldots, 19, 22, 23, 25, 26, 27, 31, 33, 34, 37, 38, 42, 43, 47, 55, 58, 67, 73, 82, 97, 103}$
or
$n \in \set {21, 29, 35, 41, 45, 49, 53, 59, 61, 69, 77, 83, 89, 101, 115, 157}$