"four-square theorem" and "four square theorem" redirect here. For other uses, see four square (disambiguation).
Lagrange's four-square theorem, also known as Bachet's conjecture, states that every nonnegative integer can be represented as a sum of four non-negative integer squares.[1] That is, the squares form an additive basis of order four.
where the four numbers are integers. For illustration, 3, 31, and 310 can be represented as the sum of four squares as follows: