Lagrange's Four-Square Theorem
Every positive integer is the sum of four squares: for some . The number of representations (Jacobi's formula).
Proof (Circle Method)
Step 1: Generating function. where is the Jacobi theta function.
Step 2: Major arcs. Near with small , the theta function factors: where is the Gauss sum (with for ) and .
Step 3: Singular series. The major arc contribution gives where with .
Step 4: Computing . By multiplicativity and evaluation of Gauss sums: for all , so . In particular, for all (taking in the sum).
Step 5: Minor arcs. For the four-square problem, the minor arc bound is actually unnecessary because Jacobi's formula provides an exact identity via modular forms. The theta function is a modular form of weight 2 for , and the Fourier coefficients are determined exactly by the Eisenstein series decomposition.
Alternatively, one can verify for all directly from the formula: where and of a non-integer is 0. Since and (only relevant when ), one verifies always.
is a sum of three squares if and only if is not of the form . Unlike four squares, the singular series precisely when , making three squares a more delicate problem. The proof uses the theory of ternary quadratic forms and the Hasse-Minkowski theorem (or Gauss's original argument).
: four squares suffice for all sufficiently large (indeed, for all ). The asymptotic formula for follows from the circle method, while requires exact modular form computations. The singular series is always positive for and all , making the circle method proof cleaner.