Math 2.0

Number theory Automorphic forms Theorem

Jacobi's four-square theorem

Builds on IntegersDivisor functionSum of divisorsTheta functionModular formCongruence subgroup

Statement

Let n≥1n \ge 1 be an integer, and let r4(n)r_4(n) be the number of quadruples (a,b,c,d)(a, b, c, d) of integers with a2+b2+c2+d2=na^2 + b^2 + c^2 + d^2 = n. Then r4(n)=8∑d∣n4∤dd.r_4(n) = 8 \sum_{\substack{d \mid n \\ 4 \nmid d}} d. Let σ\sigma be the sum of divisors, and let mm be the largest odd divisor of nn. Equivalently, r4(n)=8σ(n)r_4(n) = 8\sigma(n) if nn is odd, and r4(n)=24σ(m)r_4(n) = 24\sigma(m) if nn is even.

Remarks

One proof uses the series ∑n∈ℤqn2\sum_{n \in \Z} q^{n^2} with q=e2πiτq = e^{2 \pi i \tau}, which is θ(2τ)\theta(2\tau) for the theta constant θ\theta of the theta function. Its fourth power is ∑n≥0r4(n)qn\sum_{n \ge 0} r_4(n) q^n. The function θ(2τ)4\theta(2\tau)^4 is a modular form of weight 22 for the congruence subgroup Γ0(4)\Gamma_0(4). That space has dimension 22 and is spanned by Eisenstein series, and comparing two coefficients gives the formula. Elementary proofs also exist. Example: n=4n = 4 has divisors 1,21, 2 not divisible by 44, so r4(4)=8⋅3=24r_4(4) = 8 \cdot 3 = 24. Check: the solutions are the 88 quadruples with one entry ±2\pm 2 and three zeros, and the 1616 quadruples with all entries ±1\pm 1. Since the sum always contains d=1d = 1, r4(n)≥8>0r_4(n) \ge 8 > 0, which gives Lagrange's four-square theorem.

Going deeper

For a student

The theorem is a model case of how modular forms solve counting problems. A generating function of a counting problem is shown to be modular, and the finite dimension of the space of modular forms identifies it. For two squares the same method gives r2(n)=4∑d∣n, d oddχ(d)r_2(n) = 4 \sum_{d \mid n,\, d \text{ odd}} \chi(d), where χ(d)=(−1)(d−1)/2\chi(d) = (-1)^{(d-1)/2}. For larger numbers of squares, cusp forms can appear, and the exact formula then has a cusp form term besides the divisor sums.

Reading path

To understand this page from the ground up, read these 7 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Congruence subgroup concept
  2. Divisor function concept
  3. Integers object
  4. Modular form concept
  5. Sum of divisors concept
  6. Theta function concept
  7. Jacobi's four-square theorem statement

Further reading

  1. Web https://en.wikipedia.org/wiki/Jacobi%27s_four-square_theorem
About this page
TagCG17WSS64W
URIm2://CG17WSS64W
Kindstatement, theorem
WritingW0 stub
MSC11E25, 11F27
StatusThis copy of the site has no build data. Run m2 status CG17WSS64W.
AboutDivisor function
UsesIntegers, Divisor function, Sum of divisors, Theta function, Modular form, Congruence subgroup
Same as
Changed2 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.