By evaluating the Fourier series at specific points,
[Jacobi1829, §40-46] and by playing a
few more specialized games, Jacobi was able to obtain Lambert series,
series of rational functions in
. For example, evaluating the
series for dn at
gives the series:
Similar tricks give the following Lambert series:
These two series are especially important for our purposes because it
happens that
Furthermore, both the series are easily expanded into power series.
Expanding the first into a power series,
Jacobi found that:
This gives the following theorem:
Theorem (Jacobi's Two Square Theorem). The number of representations of a positive integer as a sum of two squares is equal to four times the difference of the numbers of divisors congruent to 1 and 3 modulo 4.
For example, the divisors of 5 are 5 and 1. Both are congruent to
1 modulo 4. Thus
and
. Hence 5 has eight
representations as the sum of two squares. (These were listed earlier.)
To take a more complicated example, the odd divisors of 75 are
1, 3, 5, 15, 25 and 75. So
. Hence 75 cannot
be represented as the sum of two squares.
Expanding the second Lambert series into a power series gives
a series of the form:
In words, we have Jacobi's Four Square Theorem:
Theorem (Jacobi's Four Square Theorem) The number of representations of an integer as the sum of four squares is equal to eight times the sum of all its divisors which are not divisible by 4.
For example, the divisors of 4 are 1, 2 and 4. So 4 has 8 times (1+2)
or 24 representations. Let's check that out. We know that
The divisors of 100 are 1, 2, 4, 5, 10, 20, 25, 50 and 100. Of these,
1, 2, 5, 10, 25 and 50 are not divisible by 4. Hence Jacobi's
formula predicts
To obtain Lagrange's Theorem, first observe that 1 is a divisor of every positive integer and 1 is not divisible by 4. Hence every positive integer has at least eight representations as a sum of four squares.
Corollary (Lagrange's Four Square Theorem). Every positive integer may be represented as the sum of four squares.