1 Sums of Squares 543
Proposition 2The number of representations of a positive integer m as a sum of
2 squares of integers is equal to 4 times the excess of the number of positive divisors
of m of the form 4 h+ 1 over the number of positive divisors of the form 4 h+ 3.
Proof We h av e
θ 002 ( 0 )=
∑
n 1 ,n 2 ∈Z
qn
(^21) +n (^22)
= 1 +
∑
m≥ 1
r 2 (m)qm,
wherer 2 (m)is the number of solutions in integersn 1 ,n 2 of the equation
n^21 +n^22 =m.
To obtain another expression forθ^200 ( 0 )we use again the relation
θ 10 ′(v)/θ 10 (v)−θ 01 ′(v)/θ 01 (v)=πiθ 002 ( 0 )θ 00 (v)θ 11 (v)/θ 01 (v)θ 10 (v),
but this time we simply takev= 1 /4. Since
θ 01 ( 1 / 4 )=
∑
n∈Z
(−i)nqn
2
=
∑
n∈Z
i−nqn
2
=θ 00 ( 1 / 4 ),
and similarlyθ 11 ( 1 / 4 )=iθ 10 ( 1 / 4 ), we obtain
πθ 002 ( 0 )=θ 01 ′( 1 / 4 )/θ 01 ( 1 / 4 )−θ 10 ′( 1 / 4 )/θ 10 ( 1 / 4 ).
By differentiating logarithmically the product expansion forθ 10 (v)and then putting
v= 1 /4, we get
θ 10 ′( 1 / 4 )/θ 10 ( 1 / 4 )=−π− 4 π
∑
n≥ 1
q^2 n/( 1 +q^4 n).
Similarly, by differentiating logarithmically the product expansion forθ 01 (v)and then
puttingv= 1 /4, we get
θ 01 ′( 1 / 4 )/θ 01 ( 1 / 4 )= 4 π
∑
n≥ 1
q^2 n−^1 /( 1 +q^4 n−^2 ).
Thus
θ 01 ′( 1 / 4 )/θ 01 ( 1 / 4 )−θ 10 ′( 1 / 4 )/θ 10 ( 1 / 4 )=π+ 4 π
∑
n≥ 1
qn/( 1 +q^2 n)
and hence
θ 002 ( 0 )= 1 + 4
∑
n≥ 1
qn/( 1 +q^2 n).
Since
qn/( 1 +q^2 n)=qn( 1 −q^2 n)/( 1 −q^4 n)=(qn−q^3 n)
∑
k≥ 0
q^4 kn,