Jacobi's four-square theorem Created 2026-10-20 Updated 2026-11-05
For , let count the integer quadruples with , counting order, signs, and zeros. Jacobi's four-square theorem gives
The right side is positive, so this also implies that every positive integer is a sum of four squares.
For , the formula gives eight representations: choose the position of . For , it gives , matching the six choices of two nonzero positions and four sign choices. Specifying the counting convention matters: unordered nonnegative representations have a different count.