Recursive formulas for sums of squares and sums of triangular numbers
aa r X i v : . [ m a t h . N T ] J un RECURSIVE FORMULAS FOR SUMS OF SQUARES AND SUMSOF TRIANGULAR NUMBERS
MOHAMED EL BACHRAOUI
Abstract.
We prove recursive formulas for sums of squares and sums of tri-angular numbers in terms of sums of divisors functions and we give a variety ofconsequences of these formulas. Intermediate applications include statementsabout positivity of the coefficients of some infinite products. Introduction
The purpose of this paper is to give inductive formulas for sums of squares, sumsof triangular numbers, and mixed sums of squares and triangular numbers. Ourmain tool is the following theorem. Let N = { , , , . . . } and let N = { , , , . . . } . Theorem 1. [3]
Let α ∈ N . Let A , A , . . . A α ⊆ N and A = ( A , A , . . . , A α ) and let f i : A i → C for i = 1 , , . . . , α be arithmetic functions and let f =( f , f , . . . , f α ) . If both F A ( x ) = α Y i =1 Y n ∈ A i (1 − x n ) − fi ( n ) n = ∞ X n =0 p A,f ( n ) x n and α X i =1 X n ∈ A i f i ( n ) n x n converge absolutely and represent analytic functions in the unit disk | x | < , then np A,f ( n ) = n X k =1 p A,f ( n − k ) α X i =1 f i,A i ( k ) ! , where p A,f (0) = 1 and f i,A i ( k ) = X d | kd ∈ A i f i ( d ) . We note that Theorem 1 for the special case α = 1, has been given in Apostol[1] and in Robbins in [6] to give formulas relating arithmetic functions to sums ofdivisors functions. The authors’ key argument is that generating functions for thearithmetic functions they considered have the form of infinite products ranging overa single set of natural numbers. In our previous work [3] we used Theorem 1 to dealwith arithmetic functions whose generating functions involve finitely many infinite Date : September 30, 2018 .1991
Mathematics Subject Classification.
Key words and phrases.
Sums of squares; Sums of triangular numbers; Divisor functions;Inductive formulas; Infinite products; Arithmetic functions; products ranging over different sets of natural numbers. We derived a variety ofinductive formulas for such functions. In the present note we shall continue employ-ing Theorem 1 to deduce inductive formulas for sums of squares, sums of triangularnumbers, and mixed sums of squares and triangular numbers, see Section 2. Wenotice at this point that there is a large literature on sums of squares and sumsof triangular numbers. The interested reader is referred to the classical volumes ofDickson [2] and the recent book of Williams [7] along with their references. Withan essential help of identities given in Williams in [7], we will give a variety ofconsequences of our recursive formulas, see Section 3. Further, we shall prove thatthe coefficients of some infinite products are all positive, see Section 4. By way ofexample, we will prove the following results:(1) X n =1 ( σ ( n ) − σ ( n/ x n ! X n =1 ( σ ∗ ( n ) − σ ∗ ( n/ x n ! = ∞ X n =1 (cid:0) n ( σ ( n ) − σ ( n/ − ( σ ∗ ( n ) − σ ∗ ( n/ (cid:1) x n , see Corollary 1 below. Here σ ( n ) and σ ∗ ( n ) are as in Definitions 1 and 3 below.(2) If p ≡ p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) = p − , refer to Theorem 6 below. Here r ( n ) is the number of representations of n as asum of two squares.(3) If p and 4 p + 1 are primes, then p − X j =1 t ( j ) (cid:18) σ ( p − j ) − σ ( p − j (cid:19) = − , see Theorem 8 below. Here t ( n ) is the number of representations of n as a sum oftwo triangular numbers.(4) The following is a direct consequence of Theorem 11 below. If x ∈ C with | x | < a ∈ N , then the coefficients of the infinite series ∞ Y n =1 (1 − x n ) − a (1 − x n ) a , ∞ Y n =1 (1 − x n ) − a (1 − x n − ) a , and ∞ Y n =1 (1 − x n ) − a (1 − x n ) a (1 − x n − ) a are all positive.Our identities involve sums of divisors functions which are introduced in thefollowing three definitions. Definition 1.
Let the function σ be defined on Q as follows: σ (0) = 1, if q ∈ Q \ N ,then σ ( q ) = 0 , and if q ∈ N , then σ ( q ) = X d | q d. ECURSIVE FORMULAS FOR SUMS OF SQUARES... 3
Definition 2.
Let n, r ∈ N , let m ∈ N , and let σ r,m ( n ) = X d | nd ≡ r mod m d If m = 2 and r = 1 we often write σ o ( n ) rather than σ , ( n ) and if m = 2 and r = 0 we often write σ E ( n ) rather than σ , ( n ).We have the following basic facts: for m, n ∈ N (1) σ ( n ) = σ o ( n ) + σ E ( n ) , σ m, m ( n ) = mσ o ( n/m ) , and σ ,m ( n ) = mσ ( n/m ) . Definition 3.
Let the function σ ∗ be defined on Q as follows: if q ∈ Q \ N , then σ ∗ ( q ) = 0 and if q ∈ N , then σ ∗ ( q ) = X d | q, qd odd d. By [7, Theorem 3.4] we have for all n ∈ N that(2) σ ∗ ( n ) = σ ( n ) − σ ( n/ . Further we will need the following two identities due to Jacobi and Gauss respec-tively:(3) ∞ Y n =1 (1 − x n )(1 + x n − ) = ∞ X n = −∞ x n . (4) ∞ Y n =1 (1 − x n )(1 − x n − ) − = ∞ X n =0 x n ( n +1)2 . Identities (3) and (4) can be found for instance in Hardy and Wright [4].2.
General formulas
In this section we give inductive formulas for sums of squares, sums of triangularnumbers, and mixed sums of squares and triangular numbers.
Definition 4.
Let k ∈ N and let the function r k ( n ) be defined on N as follows: r k ( n ) = { ( x , x , . . . , x k ) ∈ Z k : n = x + x + . . . + x k } . Theorem 2. If n ∈ N , then nr k ( n ) = 2 k σ ∗ ( n ) − σ ∗ ( n/
2) + n − X j =1 r k ( j ) (cid:18) σ ∗ ( n − j ) − σ ∗ ( n − j (cid:19) . Proof.
Taking k powers in identity (3) we have ∞ Y n =1 (1 − x n ) k (1 + x n − ) k = ∞ X n = −∞ x n ! k = 1 + ∞ X n =1 r k ( n ) x n , or equivalently, ∞ Y n =1 (1 − x n ) k (1 − x n − ) k (1 − x n − ) − k = 1 + ∞ X n =1 r k ( n ) x n . MOHAMED EL BACHRAOUI
Let in Theorem 1, A = 2 N and f ( n ) = − kn , A = 4 N − f ( n ) = − kn ,and A = 2 N − f ( n ) = 2 kn . Then for n ≥ nr k ( n ) = − kσ E ( n ) − kσ , ( n ) + 2 kσ o ( n )+ n − X j =1 r k ( j ) (cid:0) − kσ E ( n − j ) − kσ , ( n − j ) + 2 kσ o ( n − j ) (cid:1) . (5)Identities (1) and formula (2) yield − σ E ( n ) − σ , ( n ) + 2 σ o ( n ) = 2 ( σ ( n ) − σ ( n/ − σ ( n/ − σ ( n/ σ ∗ ( n ) − σ ∗ ( n/ . Now put in formula (5) to conclude the desired identity. (cid:3)
Definition 5.
Let k ∈ N and let the function t k be defined on N as follows: t k ( n ) = ( ( x , x , . . . , x k ) ∈ N k : n = k X i =1 x i ( x i + 1)2 ) . Theorem 3. If n ∈ N , then nt k ( n ) = k n − X j =0 t k ( j ) (cid:18) σ ( n − j ) − σ ( n − j (cid:19) . Proof.
Taking k powers in identity (4) we have ∞ Y n =1 (1 − x n ) k (1 − x n − ) − k = ∞ X n =0 x n ( n +1)2 ! k = ∞ X n =0 t k ( n ) x n , and the result follows by Theorem 1 applied to A = 2 N , f ( n ) = − kn , A = 2 N − f ( n ) = kn . (cid:3) Definition 6.
Let k, l ∈ N and let the function u k,l be defined on N as follows: u k,l ( n ) = ( ( x , . . . , x k , y , . . . , y l ) ∈ Z k × N l : n = k X i =1 x i + l X i =1 y i ( y i + 1)2 ) . Theorem 4. If k, l, n ∈ N , then nu k,l ( n ) = (2 k + l ) σ ( n ) − k + 2 l ) σ ( n/
2) + 8 kσ ( n/ n − X j =1 u k,l ( j ) (cid:18) (2 k + l ) σ ( n − j ) − k + 2 l ) σ ( n − j kσ ( n − j (cid:19) . Proof.
Clearly ∞ Y n =1 (1 − x n ) k + l (1 + x n − ) k (1 − x n − ) − l = 1 + ∞ X n =1 u k,l ( n ) x n , that is, ∞ Y n =1 (1 − x n ) k + l (1 − x n − ) k (1 − x n − ) − k (1 − x n − ) − l = 1 + ∞ X n =1 u k,l ( n ) x n , ECURSIVE FORMULAS FOR SUMS OF SQUARES... 5 equivalently, ∞ Y n =1 (1 − x n ) k + l (1 − x n ) − k (1 − x n − ) − k − l = 1 + ∞ X n =1 u k,l ( n ) x n , which by Theorem 1 gives the desired identity. (cid:3) Sums of two, four, and eight squares
The following formulas for r ( n ), r ( n ), and r ( n ) are well-known and can befound for instance in Williams [7]. If n ∈ N , then r ( n ) = 4 X d | n (cid:18) − d (cid:19) ,r ( n ) = 8 σ ( n ) − σ ( n/ ,r ( n ) = 16( − n X d | n ( − d d , (6)where (cid:18) − d (cid:19) = , if d ≡ , − , if d ≡ , , otherwise.We start by evaluating a convolution. Theorem 5. If n ∈ N , then n − X j =1 (cid:18) σ ( j ) − σ ( j (cid:19) (cid:18) σ ∗ ( n − j ) − σ ∗ ( n − j (cid:19) = n (cid:16) σ ( n ) − σ ( n (cid:17) − (cid:16) σ ∗ ( n ) − σ ∗ ( n (cid:17) . Proof.
By Theorem 2(7) nr ( n ) = 8 σ ∗ ( n ) − σ ∗ ( n/
2) + n − X j =1 r ( j ) (cid:18) σ ∗ ( n − j ) − σ ∗ ( n − j (cid:19) , which combined with (6) for r ( n ) yields the result. (cid:3) Corollary 1. ∞ X n =1 ( σ ( n ) − σ ( n/ x n ! ∞ X n =1 ( σ ∗ ( n ) − σ ∗ ( n/ x n ! = ∞ X n =1 (cid:0) nσ ( n ) − nσ ( n/ − σ ∗ ( n ) + 4 σ ∗ ( n/ (cid:1) x n . Proof.
Immediate from Theorem 5. (cid:3)
Theorem 6.
Let p be prime.(a) If p ≡ , then p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) = p − . MOHAMED EL BACHRAOUI (b) If p ≡ , then p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) = − p − . Proof. by Theorem 2 we have(8) nr ( n ) = 4 σ ∗ ( n ) − σ ∗ ( n/
2) + n − X j =1 r ( j ) (cid:18) σ ∗ ( n − j ) − σ ∗ ( n − j (cid:19) . Further, if p is prime, then clearly σ ∗ ( p ) = 1 + p and σ ∗ ( p/
2) = 0. Moreover, byvirtue of formulas (6) we have that r ( p ) = 0 for p ≡ r ( p ) = 8 for p ≡ (cid:3) Corollary 2.
Let ( p, p + 2) be a twin-prime.(a) If p ≡ , then p +1 X j =1 r ( j ) (cid:18) σ ∗ ( p + 2 − j ) − σ ∗ ( p + 2 − j (cid:19) = − − p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) . (b) If p ≡ , then p +1 X j =1 r ( j ) (cid:18) σ ∗ ( p + 2 − j ) − σ ∗ ( p + 2 − j (cid:19) = − p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) . Proof.
Immediate from Theorem 6. (cid:3)
Theorem 7.
Let p be an odd prime. Then ( a ) p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) = p − . ( b ) p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) = p − . Proof. (a) As mentioned before σ ∗ ( p ) = 1 + p and σ ∗ ( p/
2) = 0. By identity (6) wehave r ( p ) = 8(1 + p ). Putting in formula (7) we get8 p (1 + p ) = 8( p + 1) + p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) , which gives the desired identity.(b) By Theorem 2(9) nr ( n ) = 16 σ ∗ ( n ) − σ ∗ ( n/
2) + n − X j =1 r ( j ) (cid:18) σ ∗ ( n − j ) − σ ∗ ( n − j (cid:19) . ECURSIVE FORMULAS FOR SUMS OF SQUARES... 7 If p is an odd prime, then by formulas (6) we have r ( p ) = 16(1 + p ), whichcombined with identity (9) gives the result. (cid:3) Corollary 3.
Let p be an odd prime. Then ( a ) p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) =1 + p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) . ( b ) p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) =1 + p − X j =1 r ( j ) (cid:18) σ ∗ ( p − j ) − σ ∗ ( p − j (cid:19) . Proof.
Immediate from Theorems 6 and 7. (cid:3) Sums of two, four, and six triangular numbers
The following formula for t ( n ), t ( n ), and t ( n ) can be found in Ono, Robins,and Wahl [5] and in Williams [7]. t ( n ) = X d | n +1 (cid:18) − d (cid:19) ,t ( n ) = σ (2 n + 1) ,t ( n ) = − X d | n +3 (cid:18) − d (cid:19) d . (10) Theorem 8. If p and p + 1 are prime numbers, then p − X j =1 t ( j ) (cid:18) σ ( p − j ) − σ ( p − j (cid:19) = − . Proof.
Suppose that p and 4 p + 1 are primes. Clearly σ ( p ) = 1 + p , and by formulas(10) we have t ( p ) = 2. Further by Theorem 3(11) pt ( p ) = 2 σ ( p ) − σ ( p/
2) + p − X j =1 t ( j ) (cid:18) σ ( p − j ) − σ ( p − j (cid:19) . Thus 2 p = 2(1 + p ) + 2 p − X j =1 t ( j ) (cid:18) σ ( p − j ) − σ ( p − j (cid:19) . (cid:3) Theorem 9. If n + 1 is prime, then n − X j =0 t ( j ) (cid:18) σ ( n − j ) − σ ( n − j (cid:19) = n ( n + 1)2 (= n X j =1 j ) . MOHAMED EL BACHRAOUI
Proof.
Assume that 2 n +1 is prime. Then by identities (10) we have t ( n ) = 2 n +2.Moreover, from Theorem 3 we get(12) nt ( n ) = 4 n − X j =0 t ( j ) (cid:18) σ ( n − j ) − σ ( n − j (cid:19) . Combining these two identities proves the result. (cid:3)
Theorem 10. If n + 3 is prime, then n − X j =0 t ( j ) (cid:18) σ ( n − j ) − σ ( n − j (cid:19) = n ( n + 1)(2 n + 1)6 (= n X j =1 j ) . Proof.
If 4 n + 3 is prime, then by (10) we have t ( n ) = −
18 (1 − (4 n + 3) ) = ( n + 1)(2 n + 1) . Next by Theorem 3 we have nt ( n ) = 6 n − X j =0 t ( j ) (cid:18) σ ( n − j ) − σ ( n − j (cid:19) . Using the previous two formulas we obtain the result. (cid:3) Facts on some infinite products
Throughout this section we suppose that x is a complex number such that | x | < Theorem 11.
Let a, b, n ∈ N and let I be a nonempty subset of { , , , . . . , b − } .Then the coefficients of the infinite product ∞ Y n =1 Y i ∈ I (1 − x n ) − a (1 − x bn − i ) a are all positive.Proof. Write ∞ Y n =1 Y i ∈ I (1 − x n ) − a (1 − x bn − i ) a = ∞ X n =0 A ( n ) x n . We show by induction that A ( n ) = 0 for all n ∈ N . Clearly A (0) = 1 >
0. Nowassume that the assertion is true for j = 0 , , . . . , n −
1. By Theorem 1 we have nA ( n ) = aσ ( n ) − a X i ∈ I σ i,b ( n ) + n − X j =1 A ( j ) aσ ( n − j ) − a X i ∈ I σ i,b ( n − j ) ! . But aσ ( n ) − a X i ∈ I σ i,b ( n ) = a b − X i =0 σ i,b ( n ) − a X i ∈ I σ i,b ( n ) ≥ a ,b ( n ) > . Thus by the induction hypothesis we have nA ( n ) > A ( n ) > (cid:3) For our next result we will need the following lemma.
Lemma 7. [7, Exercise 22, p. 248] If n ∈ N , then R ( n ) = 4 σ ( n ) − σ ( n/
2) + 8 σ ( n/ − σ ( n/ > . ECURSIVE FORMULAS FOR SUMS OF SQUARES... 9
Proof.
If 8 ∤ n , then R ( n ) = 4 σ ( n ) − σ ( n/
2) + 8 σ ( n/ ≥ σ ( n ) − σ ( n/ > . If 8 | n , say n = 8 k , then repeatedly application of identities (1) we obtain r (8 k ) = 4 σ (8 k ) − σ (4 k ) + 8 σ (2 k ) − σ ( k )= 4 σ o (8 k ) + 4 σ o (4 k ) + 16 σ o (2 k ) > . This proves the lemma. (cid:3)
Theorem 12. If ∞ Y n =1 (1 + x n ) (1 + x n ) (1 + x n ) = ∞ X n =0 α ( n ) x n , then α ( n ) > for all n ∈ N .Proof. By induction on n . Clearly α (0) = 1 >
0. Suppose now that the statementholds for j = 0 , , . . . , n −
1. Note that ∞ Y n =1 (1 + x n ) (1 + x n ) (1 + x n ) = ∞ Y n =1 (1 − x n ) − (1 − x n ) (1 − x n ) − (1 − x n ) , which by Theorem 1 leads to nα ( n ) = 4 σ ( n ) − σ E ( n ) + 2 σ , ( n ) − σ , ( n )+ n − X j =1 α ( j ) (cid:0) σ ( n − j ) − σ E ( n − j ) + 2 σ , ( n − j ) − σ , ( n − j ) (cid:1) . Further, by (1) and Lemma 7 we get4 σ ( n ) − σ E ( n ) + 2 σ , ( n ) − σ , ( n ) = 4 σ ( n ) − σ ( n/
2) + 8 σ ( n/ − σ ( n/ > . Then by the induction hypothesis we have nα ( n ) >
0, and thus α ( n ) > (cid:3) References [1] T. M. Apostol,
Introduction to Analytic Number Theory , Undergraduate Texts in Mathemat-ics, Springer, 1 edition, 1976.[2] L. E. Dickson,
History of the Theory of Numbers , Vols. I-III, Chelsea Publ. Co., New York,1952.[3] M. El Bachraoui,
Inductive Formulas for some Arithmetic Functions , Int. Journal of NumberTheory, To appear (available on arXiv. 1103.5227).(1995).[4] G. H. Hardy and E. M. Wright,
An Introduction to the Theory of Numbers , Oxford UniversityPress, USA, 6th edition, 2008.[5] K. Ono, S. Robins, and P. T. Wahl,
On representation of integers as sums of triangularnumbers , Aequationes Mathematicae, Volume 50, (1995), 73-94.[6] N. Robbins,
Some identities connecting partition functions to other number theoretic func-tions , Rocky Mountain Journal of Mathematics, Volume 29, Number 1, (1999), 335-345.[7] K. S. Williams,
Number Theory in the Spirit of Liouville , Cambridge University Press, NewYork, First edition, 2011.
Dept. Math. Sci, United Arab Emirates University, PO Box 17551, Al-Ain, UAE
E-mail address ::