In mathematics, Legendre's three-square theorem states that a natural number can be represented as the sum of three squares of integers
if and only if n is not of the form for nonnegative integers a and b.
The first numbers that cannot be expressed as the sum of three squares (i.e. numbers that can be expressed as ) are
a b
|
0 | 1 | 2 |
---|---|---|---|
0 | 7 | 28 | 112 |
1 | 15 | 60 | 240 |
2 | 23 | 92 | 368 |
3 | 31 | 124 | 496 |
4 | 39 | 156 | 624 |
5 | 47 | 188 | 752 |
6 | 55 | 220 | 880 |
7 | 63 | 252 | 1008 |
8 | 71 | 284 | 1136 |
9 | 79 | 316 | 1264 |
10 | 87 | 348 | 1392 |
11 | 95 | 380 | 1520 |
12 | 103 | 412 | 1648 |
Unexpressible values up to 100 are in bold |