Refinements of Lagrange’s Four-Square Theorem

Abstract A well-known theorem of Lagrange asserts that every nonnegative integer n can be written in the form a2 + b2 + c2 + d2, where . We characterize the values assumed by a + b + c + d as we range over all such representations of n.