ARITHMETIC CONSEQUENCES OF JACOBI S TWO SQUARES THEOREM Michael D. Hirschhorn RAMA126-98) Abstract. There is a well-known formula due to Jacobi for the number r 2 n) of representations of the number n as the sum of two squares. This formula implies that the numbers r 2 n) satisfy elegant arithmetic relations. Conversely, these arithmetic properties essentially imply Jacobi s formula. So it is of interest to give direct proofs of these arithmetic relations, and this we do. Keywords: Jacobi s two squares theorem, representations, arithmetic relations AMS Classification 11E25 1. Introduction. Let r k n) denote the number of representations of the positive integer n as the sumof k squares of integers). Then, as Jacobi showed, Theorem 1. For n 1, r 2 n) 4d 1 n) d 3 n)), where d i n) is the number of divisors of n congruent to i modulo 4. This theoremis equivalent to the q-series identity n2)2 ) q 4n 3 q 1+4 q4n 1 1 q4n 3 1 q 4n 1 n 1 1 Typeset by AMS-TEX
2 MICHAEL D. HIRSCHHORN which can be proved directly [1]) fromjacobi s triple product identity aq; q 2 ) a 1 q; q 2 ) q 2 ; q 2 ) a n q n2 or [2]) fromjacobi s identity q) 3 1) n 2n +1)q n2 +n)/2. Theorem1 enables us to give a well-known explicit formula for r 2 n) in terms of the prime factorisation of n. Fromthis formula we can deduce the following result. Theorem 2. r 2 2n) r 2 n), if p 1 mod 4) is prime, r 2 pn) 2r 2 n) r 2 n p ), if p 3 mod 4) is prime, r 2 pn) r 2 n p ). The situation can be reversed. As we shall see, Theorem2 together with r 2 1) 4 implies Theorem 1. This alone would be sufficient reason to look for a direct proof of Theorem2, but it is also true that Theorem2 is of great intrinsic interest. I have managed to find such a proof of Theorem2, and shall present it here. 2. Theorems 1 and 2. We start by showing that Theorem1 yields Theorem2. FromTheorem1, we readily deduce that 2.1) if n 2 α p α1 1 p α k k qβ1 1 q β l l where p i 1mod4),q j 3 mod 4) are primes, then { 0 if any βj is odd r 2 n) 4α 1 +1) α k +1) ifallβ j are even.
ARITHMETIC CONSEQUENCES OF JACOBI S TWO SQUARES THEOREM 3 2.2) It follows immediately from 2.1) that r 2 2 α n)r 2 n), if p 1 mod 4) is prime and n is p-free, that is, p does not divide n, r 2 p α n)α +1)r 2 n), while if p 3 mod 4) is prime and n is p-free, { 0 if α is odd r 2 p α n) r 2 n) if α is even. From2.2) it is not hard to deduce Theorem2, as follows. It is clear that r 2 2n) r 2 n). and that if p is an odd prime and n is p-free, the remaining relations hold. So we now suppose n p α m,whereα 1andmis p-free. If p 1mod4)then r 2 pn) r 2 p α+1 m)α +2)r 2 m), r 2 n) α +1)r 2 m), r 2 n p )αr 2m), and r 2 pn) 2r 2 n) r 2 n p ), while if p 3mod4), r 2 pn) r 2 p α+1 m), r 2 n p )r 2p α 1 m), and r 2 pn) r 2 n p ), since both equal 0 or r 2 m), according as α is even or odd. Conversely, 2.2) follows easily fromtheorem2 by induction on α; 2.2) together with r 2 1) 4 yields 2.1), and this is equivalent to Theorem1.
4 MICHAEL D. HIRSCHHORN 3. Proof of Theorem 2. We shall establish Theorem2 via generating functions. equivalent result Indeed, we shall prove the 3.1) r 2 2n)q n r 2 n)q n, r 2 pn)q n + r 2 n)q pn 2 r 2 n)q n if p 1 mod 4) is prime, r 2 pn)q n r 2 n)q pn if p 3 mod 4) is prime. We have q n2 q n2 + q n2 q 4n2 + q 4n2 +4n+1 T 0 q 2 )+2qT 1 q 2 ) n even n odd where T 0 q) q 2n2 and T 1 q) q 2n2 +2n. Thus 3.2) ) 2 r 2 n)q n q n2 T 0 q 2 )+2qT 1 q 2 ) ) 2 T0 q 2 ) 2 +4q 2 T 1 q 2 ) 2) +4qT 0 q 2 )T 1 q 2 ). It follows that r 2 2n)q n T 0 q) 2 +4qT 1 q) 2 ) 2 q 2n2 +4q q 2n2 +2n 2
ARITHMETIC CONSEQUENCES OF JACOBI S TWO SQUARES THEOREM 5 q 2m2 +2n 2 + m,n m,n q m+n)2 +m n) 2 + m,n k l mod 2) + k l mod 2) r 2 n)q n. k,l q k2+l2 q 2m2 +2m+2n 2 +2n+1 m,n q m+n+1)2 +m n) 2 Next, let p be an odd prime. Then q n2 q n2 + n 0 mod p) q pn)2 + p 1)/2 r1 p 1)/2 r1 p 1)/2 q p2 n 2 +2 r1 n r mod p) q n2 + ) q pn+r)2 + q pn r)2 q r2 q p2 n 2 +2prn p 1)/2 T 0 q p )+2 q r2 T r 2q p ) r1 n r mod p) q n2 where Thus T 0 q) q pn2 and for 1 r p 1)/2, T r 2q) q pn2 +2rn. ) 2 r 2 n)q n q n2 T 0 q p )+2 p 1)/2 r1 2 q r2 T r 2q p ). It follows that r 2 pn)q n T 0 q) 2 +8 all pairs {r,s} with r,s {1,,p 1)/2}, r 2 +s 2 0 mod p) q r2 +s 2 )/p T r 2q)T s 2q).
6 MICHAEL D. HIRSCHHORN If p 3 mod 4), the congruence r 2 + s 2 0modp) withr, s {1,, p 1)/2} has no solution, and ) 2 r 2 pn)q n T 0 q) 2 q pn2 r 2 n)q pn. m,n q pm2+n2) On the other hand if p 1mod4)wehave r 2 pn)q n + r 2 n)q pn 2T 0 q) 2 +8 all pairs {r,s} with r,s {1,,p 1)/2}, r 2 +s 2 0 mod p) q r2 +s 2 )/p T r 2q)T s 2q) 2 T 0 q) 2 +4 To complete the proof we need to show that 3.3) T 0 q) 2 +4. all pairs {r,s} with r,s {1,,p 1)/2}, r 2 +s 2 0 mod p) allpairs {r,s} with r,s {1,,p 1)/2}, r 2 +s 2 0 mod p) We need to know that since p 1mod4)wecanwrite with a, b {1,, p 1)/2}. Thus we have ) 2 T 0 q) 2 q pn2 ak+bl 0 mod p) m,n. q r2 +s 2 )/p T r 2q)T s 2q) q r2 +s 2 )/p T r 2q)T s 2q) r 2 n)q n. p a 2 + b 2 q pm2 +pn 2 m,n q am+bn)2 +bm an) 2
ARITHMETIC CONSEQUENCES OF JACOBI S TWO SQUARES THEOREM 7 We now show that for each pair {r, s} with r, s {1,, p 1)/2} and r 2 + s 2 0 mod p), q r2 +s 2 )/p T r 2q)T s 2q) It then follows that ak+bl s mod p) T 0 q) 2 +4 q r2 +s 2 )/p T r 2q)T s 2q) + all relevant pairs {r,s} ak+bl 0 mod p) all relevant pairs {r,s} r 2 n)q n. ak+bl r mod p) ak+bl s mod p) + ak+bl r mod p) + + ak+bl s mod p) ak+bl s mod p) q k2+l2 k,l First observe that q k)2 + l) 2 ak+bl r mod p),. a k)+b l) r mod p) and similarly. ak+bl s mod p) ak+bl s mod p) Also q l2 + k) 2 bk+a l) r mod p)
8 MICHAEL D. HIRSCHHORN. bk al r mod p) Now if bk al r mod p) then multiply by sr 1 mod p)) ak + bl s or s mod p). In either case, all four sums are equal. So there is only one thing left to prove, and that is q r2 +s 2 )/p T r 2q)T s 2q). Suppose ak + bl r mod p). Then bk al s or s mod p). If ak + bl r + mp and bk al s + np then k am + bn +ar + bs)/p, l bm an +br as)/p, k 2 + l 2 pm 2 + pn 2 +2rm +2sn +r 2 + s 2 )/p and m,n q pm2 +pn 2 +2rm+2sn+r 2 +s 2 )/p q r2 +s 2 )/p T r 2q)T s 2q). On the other hand, if ak + bl r + mp and bk al s np then k am bn +ar bs)/p, l bm + an +br + as)/p, k 2 + l 2 pm 2 + pn 2 +2rm +2sn +r 2 + s 2 )/p and again q r2 +s 2 )/p T r 2q)T s 2q), and the proof is complete.
ARITHMETIC CONSEQUENCES OF JACOBI S TWO SQUARES THEOREM 9 References [1] M. D. Hirschhorn, A simple proof of Jacobi s two-square theorem, Amer. Math. Monthly, 92 1985), 579 580. [2] M. D. Hirschhorn, Jacobi s two-square theoremand related identities, Ramanujan Journal, 3 1999), 153 158. School of Mathematics UNSW Sydney Australia 2052 m.hirschhorn@unsw.edu.au