Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Ramanujan J (2007) 13:7–25 DOI 10.1007/s11139-006-0240-6 On the number of primitive representations of integers as sums of squares Shaun Cooper · Michael Hirschhorn Dedicated to Richard Askey on the occasion of his 70th birthday. Received: 12 April 2002 / Accepted: 8 October 2002 C Springer Science + Business Media, LLC 2007 Abstract Formulas for the number of primitive representations of any integer n as a sum of k squares are given, for 2 ≤ k ≤ 8, and for certain values of n, for 9 ≤ k ≤ 12. The formulas have a similar structure and are striking for their simplicity. Keywords Sum of squares . Möbius inversion . Generating function . Divisor sum 2000 Mathematics Subject Classification Primary—11E25; Secondary—05A15, 33E05 1 Introduction Let rk (n) denote the number of representations of n as a sum of k squares. That is, rk (n) is the number of solutions in integers, counting permutations and sign changes, of x12 + x22 + · · · + xk2 = n. (1.1) A solution of (1.1) is called primitive if g.c.d.(x1 , x2 , . . . , xn ) = 1. Here we use the convention that any integer is a divisor of zero. Let us denote the number of primitive p representations of n as a sum of k squares by rk (n). S. Cooper Institute of Information and Mathematical Sciences, Massey University, Private Bag 102904, North Shore Mail Centre, Auckland, New Zealand e-mail: [email protected] M. Hirschhorn School of Mathematics, University of New South Wales, Sydney 2052, Australia e-mail: [email protected] Springer 8 S. Cooper, M. Hirschhorn For example, consider the representations of 225 as a sum of three squares: Number of representations Primitive representations 23 × 3! = 48 23 × 3! = 48 2×3=6 22 × 3! = 24 23 × 3 = 24 (14, 5, 2) (11, 10, 2) (15, 0, 0) (12, 9, 0) (10, 10, 5) Non-primitive representations Thus p r3 (225) = 48 + 48 = 96, r3 (225) = 48 + 48 + 6 + 24 + 24 = 150. p The quantities rk (n) and rk (n) are clearly related by [18, p. 6] p n rk (n) = rk . d2 d 2 |n By the Möbius inversion formula, we also have n n p rk (n) = rk (n) − + − rk rk p12 p12 p22 p 2 |n p 2 , p 2 |n 1 + · · · + (−1) j 1 2 n p12 · · · p 2j rk p12 ,... , p 2j |n , p12 , p22 , p32 |n (1.2) rk n 2 2 2 p1 p2 p3 (1.3) where p1 , . . . , p j are the distinct primes whose squares divide n. Observe that if m is squarefree, then p rk (m) = rk (m). For |q| < 1, let φ(q) = ∞ qn 2 n=−∞ and define (a; q)∞ = ∞ (1 − aq j−1 ). j=1 Then the generating function for rk (n) is φ(q)k = ∞ n=0 Springer rk (n)q n . (1.4) On the number of primitive representations of integers as sums of squares 9 Throughout this article, n will always be a positive integer, and we will denote its prime factorization by n = 2 λ2 pλ p , (1.5) p where the product is taken over all odd primes p which divide n. The Legendre symbol is defined, for prime values of p, by ⎧ ⎪ ⎨ 1 if a is a quadratic residue (mod p) a = −1 if a is a quadratic nonresidue (mod p) ⎪ p ⎩ 0 if a ≡ 0 (mod p). For odd values of n, the Jacobi symbol is defined by ⎧ 1 if n = 1 ⎪ ⎪ ⎨ a = a λp ⎪ n if n > 1, ⎪ ⎩ p p where p and λ p are as in the prime factorization (1.5). The main results in this article are: Theorem 1. Let the prime factorization of n be given by (1.5). Then p r2 (n) = c2 (n) 1 + (−1)( p−1)/2 , (1.6) p 1 1+ = c4 (n)n , p p (−1)( p−1)/2 p 2 r6 (n) = c6 (n)n 1+ , p2 p 1 p 3 r8 (n) = c8 (n)n 1+ 3 , p p p r4 (n) where 0 if n ≡ 0 (mod 4) c2 (n) = 4 if n ≡ 0 (mod 4), ⎧ 8 if n ≡ 1 (mod 2) ⎪ ⎪ ⎪ ⎨12 if n ≡ 2 (mod 4) c4 (n) = ⎪ 4 if n ≡ 4 (mod 8) ⎪ ⎪ ⎩ 0 if n ≡ 0 (mod 8), ⎧ 12 if n ≡ 1 (mod 4) ⎪ ⎪ ⎪ ⎨20 if n ≡ 3 (mod 4) c6 (n) = ⎪ 15 if n ≡ 0, 2, or 4 (mod 8) ⎪ ⎪ ⎩ 17 if n ≡ 6 (mod 8), (1.7) (1.8) (1.9) (1.10) (1.11) (1.12) Springer 10 S. Cooper, M. Hirschhorn ⎧ 16 ⎪ ⎪ ⎪ ⎪ ⎪ ⎨14 c8 (n) = 35 ⎪ ⎪ ⎪ 2 ⎪ ⎪ ⎩ 18 if n ≡ 1 (mod 2) if n ≡ 2 (mod 4) if n ≡ 4 (mod 8) if n ≡ 0 (mod 8). (1.13) (1.14) If at least one of the exponents λ p is odd for some prime p ≡ 3(mod 4), then p r10 (n) = c10 (n)n 4 where ⎧ 68 ⎪ ⎪ ⎪ ⎪ ⎪ 5 ⎪ ⎪ ⎪ ⎪ 12 ⎪ ⎨ c10 (n) = 51 ⎪ ⎪ ⎪ ⎪4 ⎪ ⎪ ⎪ ⎪ ⎪ 257 ⎪ ⎩ 20 (−1)( p−1)/2 1+ , p4 p if n ≡ 1 (mod 4) if n ≡ 3 (mod 4) if n ≡ 0, 4, or 6 if n ≡ 2 (mod 8) (1.15) (1.16) (mod 8). Furthermore, if n ≡ 0, 2, or 6 (mod 8), then p 1+ (1.17) ⎧ 33 ⎪ ⎪ if n ≡ 2 (mod 4) ⎨ 4 c12 (n) = ⎪ ⎪ ⎩ 495 if n ≡ 0 (mod 8). 64 (1.18) p where 1 p5 , r12 (n) = c12 (n)n 5 Theorem 2. Let the prime factorization of n be given by (1.5). Let m denote the squarefree part of n, let k ≥ 1, and let ( ap ) denote the Legendre symbol. Then −m n 1/2 p p p 1− r3 (n) = c3 (n)r3 (m) 1/2 , (1.19) m p p| n m p r5 (n) = p c5 (n)r5 (m) m n 3/2 p 1− 2 , m 3/2 p| n p m Springer (1.20) On the number of primitive representations of integers as sums of squares p r7 (n) = p c7 (n)r7 (m) 11 −m n 5/2 p 1− , m 5/2 p| n p3 (1.21) m where 1 if n ≡ 0 (mod 4) c3 (n) = 0 if n ≡ 0 (mod 4), ⎧ 1 if n ≡ 0 (mod 4) ⎪ ⎪ ⎪ ⎪ 1 ⎪ ⎪ ⎪ if n = 4k (4 j + 2) ⎪ ⎪ 2 ⎪ ⎪ ⎨ 1 c5 (n) = if n = 4k (4 j + 3) ⎪2 ⎪ ⎪ ⎪ ⎪ 1 if n = 4k (8 j + 1) ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ 5 if n = 4k (8 j + 5) 7 ⎧ 1 if n ≡ 0 (mod 4) ⎪ ⎪ ⎪ ⎪ ⎪ 5 ⎪ ⎪ if n = 4k (4 j + 1) ⎪ ⎪ 4 ⎪ ⎪ ⎨ c7 (n) = 5 if n = 4k (4 j + 2) ⎪ 4 ⎪ ⎪ ⎪ ⎪ 1 if n = 4k (8 j + 3) ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ 35 if n = 4k (8 j + 7). 37 (1.22) (1.23) (1.24) Furthermore, p r9 (n) = p r9 (m) m n 7/2 p 1− 4 m 7/2 p| n p if m ≡ 5 (mod 8), (1.25) if m ≡ 7 (mod 8). (1.26) m p r11 (n) = p r11 (m) −m n 9/2 p 1− m 9/2 p| n p5 m For completeness, we also state the results for r2k+1 (m) for squarefree values of m, for 1 ≤ k ≤ 5. Theorem 3. Let m be squarefree and let ( mj ) denote the Jacobi symbol. Then r3 (1) = 6, r3 (2) = 12, Springer 12 S. Cooper, M. Hirschhorn ⎧ j (m−1)/2 ⎪ j ⎪ if m ≡ 1 (mod 8) and m = 1 (−1) 12 ⎪ ⎪ j=1 ⎪ m ⎪ ⎪ ⎪ ⎪ ⎪ (m−1)/2 j ⎪ ⎪ ⎪ ⎨8 if m ≡ 3 (mod 8) j=1 m r3 (m) = ⎪ ⎪ ⎪ (m−1)/2 ⎪ j ⎪ j ⎪ (−1) −12 if m ≡ 5 (mod 8) ⎪ ⎪ j=1 m ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ 0 if m ≡ 7 (mod 8), (1.27) ⎧ m/2 j j m/8 ⎪ ⎪ −24 if m ≡ 1 (mod 4) 24 ⎪ ⎪ j=1 j=3m/8+1 m m ⎨ r3 (2m) = (1.28) and m = 1 ⎪ ⎪ 3m/8 j ⎪ ⎪ ⎩24 if m ≡ 3 (mod 4). j=m/8+1 m r5 (1) = 10, r5 (2) = 40, ⎧ (m−1)/2 j ⎪ ⎪ j if m ≡ 1 (mod 8) and m = 1 ⎪−80 j=1 ⎪ m ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ (m−1)/2 ⎪ j ⎪ j ⎪ −80 (−1) j if m ≡ 3 (mod 8) ⎪ ⎪ j=1 m ⎨ r5 (m) = (m−1)/2 j ⎪ ⎪ ⎪ −112 j if m ≡ 5 (mod 8) ⎪ ⎪ j=1 ⎪ m ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ (m−1)/2 j ⎪ j ⎪ ⎪ 80 (−1) j if m ≡ 7 (mod 8), ⎩ j=1 m r5 (2m) = 80m m−1 j=1 j≡1 (mod 4) 2 j + 80(−1)(m−1)/2 j m m−1 j=1 j≡3 (mod 4) 2 j (m − j) j m if m is odd and m > 1. r7 (1) = 14, r7 (2) = 84, Springer (1.29) (1.30) On the number of primitive representations of integers as sums of squares ⎧ j (m−1)/2 j ⎪ ⎪ (m 2 − 4 j 2 ) (−1) 28 ⎪ j=1 ⎪ m ⎪ ⎪ ⎪ ⎪280 (m−1)/2 j ⎪ ⎪ (m 2 − 6 j 2 ) ⎪ j=1 ⎪ m ⎨ 3 r7 (m) = (m−1)/2 j ⎪ j ⎪ −28 (−1) (m 2 − 4 j 2 ) ⎪ ⎪ j=1 ⎪ m ⎪ ⎪ ⎪ ⎪ ⎪ (m−1)/2 j ⎪ ⎪ ⎩−592 j2 j=1 m r7 (2m) = 56 m−1 j=1 j≡1 (mod4) 13 if m ≡ 1 (mod 8) and m = 1 if m ≡ 3 (mod 8) if m ≡ 5 (mod 8) (1.31) if m ≡ 7 (mod 8), 2 j (2m 2 + 2m j − j 2 ) j m + 112(−1)(m−1)/2 m−1 j=1 j≡3 (mod 4) 2 j m(m − j) if m is odd and m > 1. j m (1.32) r9 (m) = r11 (m) = (m−1)/2 j 4320 j 2 (4 j − 3m), 17 m j=1 (m−1)/2 j 31680 j 3 ( j − m), 31 m j=1 if m ≡ 5 (mod 8). if m ≡ 7 (mod 8). (1.33) (1.34) The purpose of this article is to prove Theorems 1 and 2, which we will do in Sections 2 and 3, respectively. Equations (1.7) and (1.11), in the case when n is odd, were stated by Eisenstein [10]. Equations (1.27) and (1.28) were obtained by Dirichlet [8, p. 101], [9]. He obtained these formulas by computing the number of properly primitive classes of binary quadratic forms of negative determinant, and then applying a theorem of Gauss [7, pp. 262, 265], [13, Section 291], which connects this class number with r3 (n). The equations in (1.27) were restated by Eisenstein [11], who attributed them to Dirichlet [9]. Formulas equivalent to (1.20), (1.21), (1.23), (1.24), (1.29), (1.30), (1.31) and (1.32) were stated without proof by Smith [47]; see also [7, pp. 308–309]. Equations (1.29), (1.30), (1.31) and (1.32) had been stated earlier by Eisentein [11, 12]. The Paris Academy of Sciences, noting Eisenstein’s work [11] but apparently unaware of Smith’s work [47], proposed as its Grand Prix des Sciences Mathématiques competition for 1882 the problem of completely determining the value of r5 (n). The prize was awarded jointly to Smith [49] and Minkowski [33], who both gave formulas as well as proofs. An interesting account of this competition and the controversy surrounding it has been given by Serre [45]; also see [7, p. 312]. The Eqs. (1.33) and (1.34) were stated as conjectures in [4, 5].1 1 Note added in proof: These conjectures have recently been proved by S. Gun and B. Ramakrishnan, On special values of certain L-functions, The Ramanujan Journal, to appear. Springer 14 S. Cooper, M. Hirschhorn 2 Proof of the formulas for sums of an even number of squares We begin with the generating functions Lemma 1. φ(q)2 = 1 − 4 ∞ (−1) j q 2 j−1 1 − q 2 j−1 j=1 φ(q)4 = 1 + 8 ∞ j=1 φ(q)6 = 1 + 4 (2.1) jq j , 1 + (−q) j (2.2) ∞ ∞ (−1) j (2 j − 1)2 q 2 j−1 j 2q j + 16 , 2 j−1 1−q 1 + q2 j j=1 j=1 φ(q)8 = 1 + 16 ∞ j=1 φ(q)10 = 1 − , j 3q j , 1 − (−q) j (2.3) (2.4) ∞ ∞ (−1) j (2 j − 1)4 q 2 j−1 j 4q j 4 64 + 5 j=1 1 − q 2 j−1 5 j=1 1 + q 2 j + φ(q)12 = 1 + 8 32 (q 2 ; q 2 )14 ∞ , q 5 (−q; −q)4∞ ∞ j=1 j 5q j + 16q(q 2 ; q 2 )12 ∞. 1 + (−q) j (2.5) (2.6) Proof: Equations (2.1)–(2.4) are due to Jacobi [25, Sections 40 and 42], and Eqs. (2.5) and (2.6) are due to Glaisher [14]. Glaisher [15, 16] also found similar formulas for φ(q)14 , φ(q)16 and φ(q)18 . A general formula for φ(q)2k was stated by Ramanujan [41] and proved by Mordell [34]. Proofs of (2.1)–(2.6) using theta functions were given by Rademacher [40] and Grosswald [18]. An elementary proof of (2.1)–(2.6), as well as Ramanujan’s general formula for φ(q)2k , was given in [3]. Lemma 2. Let d j (n) be the number of divisors of n of the form 4i + j. Then r2 (n) = 4{d1 (n) − d3 (n)}, r4 (n) = 8 d d|n,4/|d =8 d|n r6 (n) = 4 de=n d odd Springer d − 32 d, (2.7) (2.8) d| n4 (−1)(d−1)/2 (4e2 − d 2 ), (2.9) On the number of primitive representations of integers as sums of squares r8 (n) = 16(−1)n = 16 (−1)d d 3 d|n d − 32 3 15 d 3 + 256 d| n2 d|n d 3. (2.10) d| n4 Let the prime factorization of n be given by (1.5). If at least one of the exponents λ p is odd for some prime p ≡ 3 (mod 4), then r10 (n) = 4 (−1)(d−1)/2 (d 4 + 16e4 ). 5 de=n (2.11) d odd If n is even, then r12 (n) = 8 d 5 − 512 d5 24 (10 × 25λ2 + 21) d5 31 d|n =8 (2.12) d| n4 d|n = (2.13) d odd (−1) d . d+e−1 5 (2.14) de=n Proof: Formulas (2.7)–(2.10) follow by comparing the coefficients of q n in (2.1)– (2.4), respectively. These were probably known to Jacobi, although he doesn’t seem to have explicitly stated the results in full. See, for example [26, 27]. Eisenstein [10], in 1847, referred to “den bekannten Sätzen für 2 and 4 Quadrate” (the well known theorems for two and four squares) before giving results for the number of representations of an odd integer as a sum of six or eight squares, and the number 4n + 3 as a sum of ten squares, but he did not explicitly state the two or four squares results (2.7), (2.8). Nor did he state the six and eight squares results (2.9), (2.10) for even integers. A complete statement of (2.8)–(2.10) was given in 1865 by Smith [48]. Smith [46] had previously given (2.7) in 1861. Let q ∞ (q 2 ; q 2 )14 ∞ = χ4 (n)q n . (−q; −q)4∞ n=1 (2.15) Glaisher [15, p. 178, footnote], [17], showed that χ4 (n) = 0 whenever at least one of the exponents λ p is odd for some prime p ≡ 3 (mod 4). Equation (2.11) then follows by equating the coefficients of q n on both sides of (2.5). The product in (2.15) can also be expanded explicitly by one of the Macdonald identities for BC2 . See [6, p. 142], [32, p. 138, formula BCl (d), with l = 2]. The formula (2.11), in the special case n ≡ 3 (mod 4), was stated without proof by Eisenstein [10]. For completeness, we mention Springer 16 S. Cooper, M. Hirschhorn the formula 4 4(λ2 +1) λ p ( p−1)/2 (d−1)/2 4 r10 (n) = + (−1) (−1) d 2 d|n 5 p d odd 8 64 2 2 + n 2r2 (n) − s t , 5 5 s 2 +t 2 =n (2.16) which holds for all n. This was stated without proof by Liouville [29], and rediscovered and proved by Glaisher [14, 16]. Observe that by (2.7), Liouville’s formula (2.16) reduces to (2.11) if at least one of the exponents λ p is odd for some prime p ≡ 3 (mod 4). For sums of twelve squares, observe that if n is even, then the coefficient of q n in the infinite product on the right hand side of (2.6) is zero. Therefore (2.12)–(2.14) follow by comparing coefficients of q n in (2.6). Lemma 3. Let the prime factorization of n be given by (1.5). Then r2 (n) = 4 (λ p + 1) p≡1 (mod 4) ⎧ ⎪ ⎨ 8 p r4 (n) = ⎪ ⎩24 r6 (n) = 4 2 p 1 + (−1)λ p , 2 p≡3 (mod 4) p λ p +1 −1 , p−1 if λ2 = 0, p λ p +1 −1 , p−1 if λ2 ≥ 1, 2λ2 +2 − p r8 (n) = (−1) λ p ( p−1)/2 (2.17) (2.18) p 2λ p +2 − (−1)(λ p +1)( p−1)/2 , p 2 − (−1)( p−1)/2 p p 3λ p +3 − 1 16 3λ2 +3 − 15| |2 . 7 p3 − 1 p (2.19) (2.20) If at least one of the exponents λ p is odd for some prime p ≡ 3 (mod 4), then 4(λ p +1) p − (−1)(λ p +1)( p−1)/2 4 4(λ2 +1) λ p ( p−1)/2 r10 (n) = 2 + (−1) , (2.21) 5 p 4 − (−1)( p−1)/2 p p If n is even, then r12 (n) = p 5(λ p +1) − 1 24 (10 × 25λ2 + 21) . 31 p5 − 1 p (2.22) Proof: In Eqs. (2.7)–(2.14), express the divisors of n in terms of their prime factorizations, and sum the resulting geometric series. Formula (2.17) was given in Section 182 of Disquisitiones Arithmeticae by C. F. Gauss in 1801, [13, footnote on p. 149]. It was also given by Jacobi [27] (who stated it for even values of n), Ramanujan [42, p. 281, Eqs. 271 & 272], and Hardy and Springer On the number of primitive representations of integers as sums of squares 17 Wright [21, Theorem 278]. Formulas (2.18)–(2.20) were given by Ramanujan [42, pp. 305–307, Eqs. 387, 388, 393, 394, 399 & 400]. We have not been able to find (2.21) or (2.22) in the literature. Proof of Theorem 1 in the case k = 6 The results in Theorem 1 follow by applying Eq. (1.3) to Eqs. (2.17)–(2.22). We shall p give complete details for r6 (n). The other formulas are proved similarly. Let f (2, λ, ε) = 22λ+2 − g( p, λ) = p 2λ+2 − (−1)(λ+1)( p−1)/2 p 2 − (−1)( p−1)/2 Observe that r6 (n) = 4 f (2, λ2 , ) g( p, λ p ) p where = (−1)λ p ( p−1)/2 , p and g( p, −1) = 0. (2.23) We consider two cases. Case 1. n ≡ 0 (mod 4) Using (1.3) we get p r6 (n) = r6 (n) − r6 p12 |n ⎡ = r6 (n)⎣1 − = 4 f (2, λ2 , ) ×⎣1 − + r6 n/ p12 p12 |n ⎡ n p12 r6 p12 , p22 |n r6 (n) + n p12 p22 − · · · + (−1) r6 n/ p12 p22 p12 , p22 |n r6 (n) j r6 p12 ,... , p 2j |n n p12 . . . p 2j ⎤ r6 n/ p12 . . . p 2j ⎦ − · · · + (−1) j r6 (n) 2 2 p1 ,... , p j |n g( p, λ p ) p|n g( p1 , λ p − 2) g( p2 , λ p − 2) g( p1 , λ p − 2) 1 1 2 + g( p , λ ) g( p1 , λ p1 ) g( p2 , λ p2 ) 1 p1 2 2 2 p1 |n p1 , p2 |n Springer 18 S. Cooper, M. Hirschhorn − · · · + (−1) j p12 ,... , p 2j |n = 4 f (2, λ2 , ) ⎤ g( p j , λ p j − 2) g( p1 , λ p1 − 2) ⎦ ··· g( p1 , λ p1 ) g( p j , λ p j ) g( p, λ p ) 1− p 2 |n p|n g( p, λ p − 2) . g( p, λ p ) Using (2.23), the second product can be extended to all odd primes p, giving p r6 (n) = 4 f (2, λ2 , ) g( p, λ p ) p|n = 4 f (2, λ2 , ) 1− p|n g( p, λ p − 2) g( p, λ p ) [g( p, λ p ) − g( p, λ p − 2)] (2.24) p = 4 f (2, λ2 , ) p 2λ p +2 − (−1)(λ p +1)( p−1)/2 p 2 − (−1)( p−1)/2 p p 2λ p −2 − (−1)(λ p −1)( p−1)/2 − p 2 − (−1)( p−1)/2 p 2 − p −2 p 2 − (−1)( p−1)/2 p (−1)( p−1)/2 = 4 f (2, λ2 , ) . p 2λ p 1 + p2 p = 4 f (2, λ2 , ) p 2λ p (2.25) Now f (2, λ2 , ) = 22λ2 +2 − (−1)λ p ( p−1)/2 p ⎧ 4−1=3 ⎪ ⎪ ⎪ ⎨4 + 1 = 5 = ⎪ 16 − 1 = 15 ⎪ ⎪ ⎩ 16 + 1 = 17 if n ≡ 1 if n ≡ 3 if n ≡ 2 (mod 4) (mod 4) (mod 8) if n ≡ 6 (mod 8). Substituting this into (2.25) gives p r6 (n) = c6 (n)n 2 p (−1)( p−1)/2 1+ p2 where ⎧ 12 ⎪ ⎪ ⎪ ⎨ 20 c6 (n) = ⎪ 15 ⎪ ⎪ ⎩ 17 Springer if n ≡ 1 if n ≡ 3 (mod 4) (mod 4) if n ≡ 2 if n ≡ 6 (mod 8) (mod 8). , On the number of primitive representations of integers as sums of squares 19 This completes the proof of Case 1. Case 2. n ≡ 0 (mod 4) The details are similar, but the prime 2 now plays a role in the Möbius formula (1.3). In place of (2.24) we have p r6 (n) = 4( f (2, λ2 , ) − f (2, λ2 − 2, )) (g( p, λ p ) − g( p, λ p − 2)). (2.26) p Observe that 15 × 22λ2 . 4 (2.27) (−1)( p−1)/2 2λ p 1+ . (g( p, λ p ) − g( p, λ p − 2)) = p p2 p p (2.28) f (2, λ2 , ) − f (2, λ2 − 2, ) = 22λ2 +2 − 22λ2 −2 = From the proof of Case 1, we also have Substitute (2.27) and (2.28) into (2.26) to obtain p r6 (n) (−1)( p−1)/2 15 2λ2 2λ p 1+ = 4× p ×2 4 p2 p (−1)( p−1)/2 2 = 15n 1+ . p2 p This proves Case 2 and completes the proof of Theorem 1 in the case k = 6. 3 Proof of the formulas for sums of an odd number of squares We begin with Lemma 4. Let the prime factorization of n be given by (1.5). Then r3 (n) = r3 (m) p λ p /2+1 − 1 p p−1 − −m p p λ p /2 − 1 , p−1 (3.1) Springer 20 S. Cooper, M. Hirschhorn 3λ2 /2+3 −1 2 23λ2 /2 − 1 r5 (n) = r5 (m) (m) + 5 23 − 1 23 − 1 3λ p /2 p 3λ p /2+3 − 1 −1 m p × − p , p3 − 1 p p3 − 1 p 5λ2 /2+5 −1 2 25λ2 /2 − 1 r7 (n) = r7 (m) (m) + 7 25 − 1 25 − 1 5λ p /2 p 5λ p /2+5 − 1 −1 p 2 −m × − p , p5 − 1 p p5 − 1 p where ⎧ ⎪ ⎨ if m ≡ 1 0 (3.3) (mod 8) −4 if m ≡ 2 or 3 (mod 4) ⎪ ⎩ −16/7 if m ≡ 5 (mod 8), ⎧ if m ≡ 1 or 2 (mod 4) ⎪ ⎨ 8 0 if m ≡ 3 (mod 8) 7 (m) = ⎪ ⎩ −64/37 if m ≡ 7 (mod 8). 5 (m) = (3.2) (3.4) (3.5) Also, 27λ2 /2+7 − 1 r9 (n) = r9 (m) 27 − 1 p p 7λ p /2+7 − 1 − p3 p7 − 1 m p p 7λ p /2 − 1 , p7 − 1 if n ≡ 5 (mod 8), (3.6) if n ≡ 7 (mod 8). (3.7) − 1 p 9λ p /2+9 − 1 2 −m p 9λ p /2 − 1 4 r11 (n) = r11 (m) − p , 29 − 1 p9 − 1 p p9 − 1 p 9λ2 /2+9 Proof: Equation (3.1) was proved in [22], Eqs. (3.2)–(3.6) were proved in [4] and (3.7) was proved in [5]. All of the proofs used the theory of modular forms of half integer weight. Remark . Equation (3.1) was given explicitly by Pall [39]. Various special cases of (3.1)–(3.7) have been given by many authors. For example, (this is by no means a complete list) see Cohen [2], Hurwitz [23, 24], Mordell [35], Olds [36–38], Sandham [43] and Stieltjes [50, 51]. For some additional results on sums of an odd number of squares, see Bateman [1], Hardy [19, 20], Lomadze [30, 31] and Sandham [44]. Proof of Theorem 2 in the case k = 7 All of the formulas in Theorem 2 follow from (3.1)–(3.7) on using (1.3). We give p complete details for r7 (n); the other formulas have similar proofs. Springer On the number of primitive representations of integers as sums of squares 21 For λ ≥ 1, let ⎧ 5λ/2+5 25λ/2 − 1 −1 2 ⎪ ⎪ + 7 (m) 5 ⎪ ⎨ 25 − 1 2 −1 h( p, λ, m) = ⎪ 5λ/2+5 ⎪ −1 −m p 5λ/2 − 1 p ⎪ 2 ⎩ − p p5 − 1 p p5 − 1 if p = 2, if p is an odd prime. Observe that h( p, 1, m) = 1, and therefore Eq. (3.3) is equivalent to 25λ2 /2+5 − 1 25λ2 /2 − 1 + 7 (m) r7 (n) = r7 (m) 25 − 1 25 − 1 p 5λ p /2+5 − 1 −m p 5λ p /2 − 1 2 × − p p5 − 1 p p5 − 1 λ p ≥2 = r7 (m)h(2, λ2 , m) h( p, λ p , m). (3.8) λ p ≥2 We consider two cases. Case 1. n ≡ 0 (mod 4). By Eqs. (1.3), (1.4) and (3.8), we have p r7 (n) = r7 (n) − r7 p12 |n n p12 + r7 p12 , p22 |n n 2 2 p1 p2 − · · · + (−1) j r7 p12 ,... , p 2j |n n 2 p1 . . . p 2j r7 n/ p12 r7 (n/ p 2 p 2 ) r7 (n/ p12 . . . p 2j ) 1 2 j = r7 (n) 1 − + − · · · + (−1) r7 (n) r7 (n) r7 (n) 2 2 2 2 2 = r7 (m) ⎡ p1 |n p1 , p2 |n p1 ,... , p j |n h( p, λ p , m) λ p ≥2 × ⎣1 − h( p1 , λ p − 2, m) h( p1 , λ p − 2, m) h( p2 , λ p − 2, m) 1 1 2 + h( p , λ , m) h( p , λ , m) h( p , λ 1 p1 1 p1 2 p2 , m) 2 2 2 p1 |n − · · · + (−1) j p1 , p2 |n p12 ,··· , p 2j |n ⎤ , λ − 2, m) h( p h( p1 , λ p1 − 2, m) j pj ⎦ ··· h( p1 , λ p1 , m) h( p j , λ p j , m) Springer 22 S. Cooper, M. Hirschhorn p = r7 (m) p = r7 (m) = p r7 (m) h( p, λ p , m) λ p ≥2 1− λ p ≥2 h( p, λ p − 2, m) h( p, λ p , m) [h( p, λ p , m) − h( p, λ p − 2, m)] (3.9) λ p ≥2 5λ p /2 p 5λ p /2+5 − 1 −1 p 2 −m −p 5 5 p −1 p p −1 λ p ≥2 5λ p /2−5 p 5λ p /2 − 1 −1 p 2 −m + p p5 − 1 p p5 − 1 p 5λ p /2 2 −m 5λ p /2−5 = r7 (m) p −p p p λ p ≥2 −m p p 5λ p /2 = r7 (m) 1− p 3 p λ p ≥2 λ p ≥2 −m n 5/2 p p = r7 (m) 5/2 1− . 3 m p n p| − (3.10) m This completes the proof of Case 1. Case 2. n ≡ 0 (mod 4). We proceed as for Case 1, but this time the prime 2 plays a role in the Möbius formula (1.3). In place of (3.9), we have p p r7 (n) = r7 (m)[h(2, λ2 , m) − h(2, λ2 − 2, m)] [h( p, λ p , m) − h( p, λ p − 2, m)]. λ p ≥2 (3.11) Now using (3.5), we have h(2, λ2 , m) − h(2, λ2 − 2, m) = 25λ2 /2+5 − 1 25λ2 /2 − 1 25λ2 /2 − 1 25λ2 /2−5 − 1 (m) (m) + − − 7 7 25 − 1 25 − 1 25 − 1 25 − 1 = 25λ2 /2 + 7 (m)25λ2 /2−5 7 (m) 5λ2 /2 1+ =2 32 ⎧ 5 ⎪ 5λ /2 ⎪ if m ≡ 1 or 2 (mod 4), ⎪2 2 × ⎪ ⎨ 4 if m ≡ 3 (mod 8), = 25λ2 /2 × 1 ⎪ ⎪ ⎪ 35 ⎪ ⎩25λ2 /2 × if m ≡ 7 (mod 8). 37 Springer On the number of primitive representations of integers as sums of squares 23 Now substitute this into (3.11), and continue as in the proof of Case 1. This proves Case 2, and completes the proof of Theorem 2 in the case k = 7. References 1. Bateman, P.T.: On the representations of a number as the sum of three squares. Trans. Amer. Math. Soc. 71, 70–101 (1951) 2. Cohen, H.: Sommes de carrés, fonctions L et formes modulaires. C. R. Acad. Sc. Paris, Sér. A-B 277, 827–830 (1973) 3. Cooper, S.: On sums of an even number of squares, and an even number of triangular numbers: an elementary approach based on Ramanujan’s 1 ψ1 summation formula. In: Berndt, B.C., Ono, K. (eds.) q-Series with Applications to Combinatorics, Number Theory and Physics, Contemporary Mathematics, No. 291. pp. 115–137. American Mathematical Society, Providence, RI (2001) 4. Cooper, S.: Sums of five, seven and nine squares. Ramanuj. J. 6, 469–490 (2002) 5. Cooper, S.: On the number of representations of certain integers as sums of 11 or 13 squares. J. Number Theory 103, 135–162 (2003) 6. Cooper, S., Hirschhorn, M.D., Lewis, R.P.: Powers of Euler’s product and related identities. Ramanuj. J 4, 137–155 (2000). 7. Dickson, L.E.: History of the Theory of Numbers. vol. 2. Chelsea, New York (1952). 8. Dickson, L.E.: History of the Theory of Numbers, vol. 3. Chelsea, New York (1952). 9. Lejeune Dirichlet, G.: Recherches sur diverses applications de l’analyse infinitésimale à la théorie des nombres. Crelle’s Journal 19, 324–369 (1839) and 21, 1–12, 134–155 (1840). Reprinted in Kronecker, L. (ed.) G. Lejeune Dirichlet’s Werke, B. 1, pp. 411–496 (see pp. 492–493, 496) (1889), reprinted by Chelsea, New York (1969) 10. Eisenstein, F.G.M.: Neue Theoreme der höheren Arithmetik. Crelle’s Journal 35, 117–196. (1847). Reprinted in Eisenstein, G. Mathematische Werke, B. 1, pp. 483–502. Chelsea, Now York (1989) 11. Eisenstein, F.G.M.: Note sur la représentation d’un nombre par la somme de cinq carrés. Crelle’s Journal 35, 368 (1847). Reprinted in Eisenstein, G. Mathematische Werke, B. 2, p. 505. Chelsea, New York (1989) 12. Eisenstein, F.G.M.: Lehrsätze. Crelle’s Journal 39, 180–182 (1850). Reprinted in Eisenstein, G. Mathematische Werke, B. 2, pp. 620–622. Chelsea, New York (1989) 13. Gauss, C.F.: Disquisitiones Arithmeticae. Eng. Edition, Translated by Arthur A. Clarke, Yale University Press, New Haven and London, 1966. Revised by William C. Waterhouse and reprinted by SpringerVerlag, New York (1986) 14. Glaisher, J.W.L.: On the representations of a number as the sum of two, four, six, eight, ten and twelve squares. Quart. J. Pure and Appl. Math. 38, 1–62 (1907) 15. Glaisher, J.W.L.: On the representations of a number as the sum of fourteen and sixteen squares. Quart. J. Pure and Appl. Math. 38, 178–236 (1907) 16. Glaisher, J.W.L.: On the numbers of representations of a number as a sum of 2r squares, where 2r does not exceed eighteen. Proc. London Math. Soc. Ser. (2), 5, 479–490 (1907) 17. Glaisher, J.W.L.: On elliptic-function expansions in which the coefficients are powers of the complex numbers having n as norm. Quart. J. Pure and Appl. Math. 39, 266–300 (1908) 18. Grosswald, E.: Representations of Integers as Sums of Squares. Springer-Verlag, New York (1985) 19. Hardy, G.H.: On the representation of a number as the sum of any number of squares, and in particular of five or seven. Proc. Nat. Acad. Sci. 4, 340–344 (1918) 20. Hardy, G.H.: On the representation of a number as the sum of any number of squares, and in particular of five. Trans. Amer. Math. Soc. 21, 255–284 (1920) 21. Hardy, G.H., Wright, E.M.: An Introduction to the Theory of Numbers. 5th edn. Oxford, reprinted (1989) 22. Hirschhorn, M.D., Sellers, J.A.: On representations of a number as a sum of three squares. Discrete Math. 199, 85–101 (1999) 23. Hurwitz, A.: Sur la décomposition des nombres en cinq carrés, Paris, C. R. Acad. Sci. 98, 504–507 (1884). Reprinted in Mathematische Werke, B. 2, pp. 5–7. Birkhauser, Basel (1933) Springer 24 S. Cooper, M. Hirschhorn 24. Hurwitz, A.: L’Intermédiaire des Mathematiciens 14, 107 (1907). Reprinted in Mathematische Werke, B. 2, p. 751, Birkhauser, Basel (1933) 25. Jacobi, C.G.J.: Fundamenta Nova Theoriae Functionum Ellipticarum. 1829. Reprinted in Weierstrass, K. (ed.) C.G.J. Jacobi’s Gesammelte Werke, B. 1, pp. 49–239 (1881); 2nd edn. published by Chelsea, New York (1969) 26. Jacobi, C.G.J.: Note sur la decomposition d’un nombre donne en quatre carrés. Crelle’s Journal 3, 191 (1828). Reprinted in Weierstrass, K. (ed.) C.G.J. Jacobi’s Gesammelte Werke, B. 1, p. 247 (1881). 2nd edn. published by Chelsea, New York (1969) 27. Jacobi, C.G.J.: De compositione numerorum e quatuor quadratis. Crelle’s Journal 12, 167–172 (1834). Reprinted in Weierstrass, K. (eds.) C.G.J. Jacobi’s Gesammelte Werke, B. 6, pp. 245–251 (1891). Second edition published by Chelsea, New York (1969) 28. Liouville, J.: Extrait d’une lettre adressée a M. Besge. Journal de Mathématiques Pures et Appliquées (Liouville’s Journal). Series 2 9, 296–298 (1864) 29. Liouville, J.: Nombre des représentations d’un entier quelconque sous la forme d’une somme de dix carrés, Journal de Mathématiques Pures el Appliquées (Liouville’s Journal). Series 2 11, 1–8 (1866) 30. Lomadze, G.A.: On the representation of numbers by sums of squares. (Russian) Akad. Nauk Gruzin. SSR. Trudy Tbiliss. Mat. Inst. Razmadze 16, 231–275 (1948) 31. Lomadze, G.A.: On the number of representations of natural numbers by sums of nine squares. (Russian) Acta Arith. 68(3), 245–253 (1994) 32. Macdonald, I.G.: Affine root systems and Dedekind’s η-function. Invent. Math. 15, 91–143 (1972) 33. Minkowski, H.: Mémoire sur la théorie des formes quadratiques à coefficients entières. Mémoires présentés par divers savants à l’Académie des Sciences de l’Institut National de France 29(2), 1–178 (1887). Reprinted in Gesammelte Abhandlungen von Hermann Minkowski, B. 1, pp. 3–144, Leipzig, Berlin, B.G. Teubner (1911) 34. Mordell, L.J.: On the representation of numbers as the sum of 2r squares. Quart. J. Pure and Appl. Math. 48, 93–104 (1917) 35. Mordell, L.J.: On the representations of a number as a sum of an odd number of squares. Trans. Camb. Phil. Soc. 22, 361–372 (1919) 36. Olds, C.D.: On the representations, N3 (n 2 ). Bull. Amer. Math. Soc. 47, 499–503 (1941) 37. Olds, C.D.: On the representations, N7 (m 2 ). Bull Amer. Math. Soc. 47, 624–628 (1941) 38. Olds, C.D.: On the number of representations of the square of an integer as the sum of three squares. Amer. J. Math. 63, 763–767 (1941) 39. Pall, G.: On the number of representations of a square, or a constant times a square, as the sum of an odd number of squares. J. London Math. Soc. 5, 102–105 (1930) 40. Rademacher, H.: Topics in Analytic Number Theory. Springer-Verlag, New York (1973) 41. Ramanujan, S.: On certain arithmetical functions. Trans. Camb. Phil. Soc. 22, 159–184 (1916). Reprinted in Collected Papers of Srinivasa Ramanujan, pp. 136–162. AMS Chelsea, Providence, RI (2000) 42. Ramanujan, S.: The Lost Notebook and Other Unpublished Papers. Narosa, New Delhi (1988) 43. Sandham, H.F.: A square as the sum of 7 squares. Quart. J. Math., Oxford Ser. (2), 4, 230–236 (1953) 44. Sandham, H.F.: A square as the sum of 9, 11 and 13 squares. J. London Math. Soc. 29, 31–38 (1954) 45. Serre, J.-P.: Smith, Minkowski et l’Académie des Sciences de Paris, Gazette des Mathématiciens 56, 3–9 (1993) 46. Smith, H.J.S.: Report on the theory of numbers, Part III. Report for the British Association, 1861. Reprinted in Glaisher, J.W.L. (ed.) The Collected Mathematical Papers of H.J.S. Smith vol. 1, pp. 163–228 (1894). See p. 191; reprinted by Chelsea, New York (1979) 47. Smith, H.J.S.: On the orders and genera of quadratic forms containing more than three indeterminates. Proc. Royal Soc. 13, 199–203 (1864), and 16, 197–208 (1867). Reprinted in Glaisher J.W.L (ed.) The Collected Mathematical Papers of H.J.S. Smith, vol. 1, pp. 412–417, 510–523 (1894). See pp. 521–522; reprinted by Chelsea, New York (1979). 48. Smith, H.J.S.: Report on the theory of numbers, Part VI. Report for the British Association, 1865. Reprinted in Glaisher, J.W.L. (eds.) The Collected Mathematical Papers of H.J.S. Smith, vol. 1, pp. 289–358 (1894). See pp. 306–308; reprinted by Chelsea, New York (1979) 49. Smith, H.J.S.: Mémoire sur la représentation des nombres par des sommes de cinq carrés. Mémoires présentés par divers savants à l’Académic des Sciences de l’Institut National de France 29(1), 1–72 (1887). Reprinted in Glaisher, J.W.L. (ed.) The Collected Mathematical Papers of H.J.S. Smith, vol. 2, pp. 623–680 (1894); reprinted by Chelsea, New York (1965) Springer On the number of primitive representations of integers as sums of squares 25 50. Stieltjes, T.J.: Sur le nombrc de décompositions d’un entier en cinq carrés. Paris, C. R. Acad. Sci., 97, 1545–1547 (1883). Reprinted in Oeuvres Complètes de Thomas Jan Stieltjes, Tome 1, pp. 329–331, P. Noordhoff, Groningen (1914) 51. Stieltjes, T.J.: Sur quelques applications arithmétiques de la théorie des fonctions elliptiques. Paris, C. R. Acad. Sci., 98, 663–664 (1884). Reprinted in Oeuvres Complètes de Thomas Jan Stieltjes, Tome 1, pp. 360–361, P. Noordhoff, Groningen (1914) Springer