Lagrange's Four-Square Theorem states that every positive integer can be written as the sum of at most four squares. For example, 6 = 22 + 12 + 12 is the sum of three squares. Given this theorem, prove that any positive multiple of 8 can be written as the sum of eight odd squares.
By Lagrange's Theorem, for any non-negative integer n we have n = a2 + b2 + c2 + d2, where a, b, c, and d are non-negative integers.
| Consider that 8a2 | = (4a2 + 4a) + (4a2 − 4a). |
| = (2a + 1)2 + (2a − 1)2 − 2. |
So 8n = (2a + 1)2 + (2a − 1)2 + (2b + 1)2 + (2b − 1)2 + (2c + 1)2 + (2c − 1)2 + (2d + 1)2 + (2d − 1)2 − 8,
and thus 8(n + 1) is the sum of eight odd squares.
Therefore, any positive multiple of 8 can be written as the sum of eight odd squares.
Source: History of the Theory of Numbers, Volume II, by Leonard Eugene Dickson. Chapter IX.