GENERAL ¨ ARTICLE 'Triangular Numbers '
Anuradha S Garge and Shailesh A Shirali
The triangularnumbers, which are numbers as- sociatedwithcertain arrays of dots, were known to the ancient Greeks and viewed by them with reverence. Though possessing a simple de¯ni- tion, they are astonishingly rich in properties of Left: Anuradha S Garge various kinds, ranging from simple relationships completed her PhD from between them and the square numbers to very Pune University in 2008 under the supervision of Prof. complex relationships involving partitions, mod- S A Katre. Her research ular forms, etc. { topics which belong to advanc- interests include K-theory ed mathematics. They also possess many pretty and number theory.Besides combinatorialproperties. In this expository ar- mathematics, she is interested ticlewesurveya few of these properties. in (singing) indian classical music and yoga. Triangularnumbers are numbers associated with trian- Right: Shailesh Shirali is gular arrays of dots. The idea is easier to convey using Director of Sahyadri School (KFI), Pune, and also Head of pictures rather thanwords;seeFigure 1. We see from the Community Mathematics the ¯gure thatif Tn denotes the n-th triangularnumber, Centre in Rishi Valley School then T1 =1,T2 = T1 +2,T3 = T2 +3,T4 = T3 +4,.... (AP).Hehasbeeninthefield Thus Tn = Tn 1 + n,leadingto: of mathematics education for ¡ three decades, and has been n(n +1) closely involved with the Tn =1+2 + +(n 1) + n = : (1) Math Olympiad movement in ¢¢¢ ¡ 2 India. He is the author of The triangular numbers appearinthePascal's triangle many mathematics books addressed to highschool along the third diagonal; in Figure 2they are the num- students, and serves as an bers in bold type. editor for Resonance and for At Right Angles.Heis engaged in many outreach Figure 1. The first four triangular numbers. projects in teacher education.
Keywords Triangular number, figurate num- ber, rangoli, Brahmagupta–Pell equation, Jacobi triple product T1=1 T2=3 T3=6 T4=10 identity.
672 RESONANCE ¨July 2012 GENERAL ¨ ARTICLE
Figure 2. Pascal’s triangle.
Triangular numbers were known to the ancient Greeks Triangular numbers and were viewed by them with mysticalreverence. The are numbers triangularnumber10wasconsideredtobe a symbol of associated with `perfection', being the sum of 1(a point), 2(a line),3 triangular arrays of (a plane) and 4 (a solid). dots. For a sequence de¯ned in such a simple manner, the se- quence of triangularnumbersabbreviated as T-numbers is astonishingly rich in properties. We explore many of them in this article. 1. Some Properties of TriangularNumbers 1.1 Triangular Numbers Moduloan Integer Here we look at the triangularnumbersmoduloa posi- tive integer k.Reading the triangularnumbers modulo 2, we get the following pattern which repeats every 4 steps:
1; 1; 0; 0; 1; 1; 0; 0; 1; 1; 0; 0; ::::
Similarly, reading the numbers modulo 3 gives the fol- lowing pattern of numbers which repeats every 3 steps:
1; 0; 0; 1; 0; 0; 1; 0; 0; 1; 0; 0; :::; Triangular numbers modulo 4 we get a sequence thatrepeats every 8 steps: were known to the ancient Greeks and 1; 3; 2; 2; 3; 1; 0; 0; 1; 3; 2; 2; 3; 1; 0; 0; :::; were viewed by them with mystical modulo 5 we get a sequence thatrepeats every 5 steps: reverence.
RESONANCE ¨ July 2012 673 GENERAL ¨ ARTICLE
1; 3; 1; 0; 0; 1; 3; 1; 0; 0; :::; and modulo 6, we get this pattern:
1; 3; 0; 4; 3; 3; 4; 0; 3; 1; 0; 0; 1; 3; 0; 4; ::::
After some experimentation,weare able to guess that 52 = T +T 4 5 the T-residues mod k repeateveryk steps if k is odd, and every 2k stepsif k is even (see [1]). Once noticed, it is rather easy toprove. 1.2 Triangular Numbers and Squares The Greeks knew thatthesum of a pair of consecutive triangularnumbers is a perfect square. The proof of this 62 = T +T using algebra is trivial, but Figure 3shows a nice `proof 5 6 without words' which clearly generalizes. The relation 2 Figure 3. Pictorial patterns in Figure 4(8T3 +1 = 49 = 7 ) also generalizes in an explaining why the sum of obvious way; it too wasknown to the Greeks. Proba- two consecutive T-numbers bly hidden inside some well-known `rangoli patterns' are is a perfect square. more such identities for triangularnumbers. 1.3 Some Identities The following combinatorialinterpretation maybegiven to the T-numbers: Tn is the number of ordered pairs (x; y), where 1 dddx y n; x; y N. Using this we may provesomeidentities. For example,2 the identity
Figure 4. A ‘rangoli’ pattern T = T + T + mn; (2) with 4-fold rotational sym- m+n m n metry; it explains why eight is proved as follows: counts the number of pairs times a T-number plus 1 is a Tm+n perfect square. (x; y)with1dddxym+n.Wepartitionthecollection of all such pairs into three classes: (i) pairs (x; y)with 1dddxym;(ii)pairs (x; y) with m+ 1 dddxym+n; and (iii) pairs (x; y)with1dddxm 674 RESONANCE ¨July 2012 GENERAL ¨ ARTICLE the product of the sizes of the two new heapsisrecorded. There exist many This step is then iterated: each of the resulting heaps connections within is subdivided into two new heaps, etc. After some steps the sequence of T- each heapwillhave just one bead and no further divi- numbers, and sion is possible. Now let all the products recorded be between the T- summed. It will be found that whichever wayonedoes numbers and the it, the totalobtained in the end is the same; it depends squares. only on the number of beads in the starting heap. Try it out, and explain how it follows from (2). Another such relation is: Tmn = TmTn + Tm 1Tn 1;(3) ¡ ¡ it hasthefollowing corollary, which is obtained by putting m = n: 2 2 Tn2 =(Tn) +(Tn 1) : (4) ¡ Thus, there exist many connections within the sequence of T-numbers, and between the T -numbers and the squa- res. For more such examples see [2]. These properties, once spotted, are easy to prove, but the greater chal- lenge lies in ¯nding them. 1.4 Relations Among the Triangular Numbers Here are some more relations among the triangularnum- bers which are easy to verify algebraically: If n is a triangular number, then so is 9n +1. (5) If n is a triangular number, then so is 25n + 3. (6) 1 For example, for (5): if n = 2 k(k +1),then 9n + 1 = 9 1 2 k(k +1)+1 = 2 (3k + 1)(3k +2). Eulerposed (and answered) the following problem: Find all integer pairs (r; s) which satisfy the following condition: If n is a triangular number, then so is rn+s. Going deeper, we get the following result whose proof we leave as anexercise: RESONANCE ¨ July 2012 675 GENERAL ¨ ARTICLE It is of interest to Theorem 1.1. The integer pairs (r; s) for which the know which property`n triangular implies rn + s triangular' holds triangular numbers are those for which r is an odd square, and s = 1 (r 1). 8 ¡ are themselves Fittingly, each such s is a triangularnumber. For more squares. such relations, see[3]. 2. Which TriangularNumbersare Squares? Having seen some connections between triangularnum- bers and squares, it is of interest to know which tri- angularnumbers are themselves squares. This question See Resonance issues on Euler, Gauss, Brahmagupta: has been well-studied, and one hasthefollowing striking Vol.2, Nos 5 & 6, 1997; result originally provedbyEulerin1730. Vol.17, No.3, 2012. Theorem 2.1. A triangular number Tn is a square if andonly if n has the form 2k 2k p2 + 1 + p2 1 2 n = ¡ ¡ ; 4 ¡ ¢ ¡ ¢ where k is an integer. In particular, there exist in¯nitely many triangular numbers which are squares. 1 2 Aquickproof goes as follows: if 2 n(n+1)=m for some m,then(2n +1)2 8m2 =1.Bya suitable change of variables (x =2n+1,¡ y =2n), we get theBrahmagupta{ Pell equation which hasboth a rich history and a rich theory behind it: x2 2y2 =1: ¡ Solving this we get the ¯rst few values of n as1,8,49 and 288, with corresponding T -values 1, 36, 1225 = 352; and 41616 = 2042. There are many ways of arriving at the generalsolution of the Brahmagupta{Pell equation. One approach is to The Brahmagupta– consider the number ¯eld Q(p2) and to de¯ne a function Pell equation has f on this ¯eld as follows: if x = a + bp2 where a; b Q, both a rich history 2 then f(x)=a2 2b2. We seek all elements of Z(p2) with and a rich theory unit value for f¡.Itis easy to check that f is multiplica- behind it. tive; i.e., if x; y Q(p2), then f(xy) = f(x)f(y). Let 2 676 RESONANCE ¨July 2012 GENERAL ¨ ARTICLE u =1+p2. Since f(u)= 1, it follows that f(u2k)=1 The equation in ¡ for any integer k. Following through with this observa- Section 2.2 is more tion we get the `if'part of the above result. The `only difficult to solve than if'part is obtained by a descent procedure, in which the Brahmagupta– from any given solution we construct a smalleroneby Pell equation; it multiplying by v =1 p2. involveselliptic ¡ 2.2 ...and Cubes? curves. Anaturalquestiontoask now is: do there exist tri- angular numbers that are perfect cubes? If there are such numbers, then one cansimplify as above togetan equation of the form: (2n +1)2 (2m)3 =1: ¡ This equation is more di±cult to solve than the Brahma- gupta{Pell equation;indeed,itinvolvesquestions about elliptic curves. It leads naturally to the famous Cata- lanconjecture(posedin1844,and provedin2002by Preda Mih¸ailescu) which makes an assertion about pairs of perfect powers thatdi®erby1.Theunexpectedly simple answer to this (that the only non-trivialinstance is 32 23 =1)tellsusthat the only triangular number ¡ which is a cube is T1 =1. 3. TriangularNumbersand Sums of Squares Carl Friedrich Gauss (1777{1855), one of history's most in°uentialmathematicians, discovered thateveryposi- tive integer can be written as a sum of atmostthree triangular numbers; on 10 July 1796 he wrote these fa- mous words in his diary: E¨PHKA! num=¢+¢+¢: Every positive integer can be However there is no simple proof of this statement, which written as a sum of is sometimes called the `Eureka Theorem'. at most three It is easy to prove the following characterizationof tri- triangular angularnumbers: k is a triangular number if andonly numbers. RESONANCE ¨ July 2012 677 GENERAL ¨ ARTICLE if 8k +1 is a square.For: x(x +1) n = 8n = 4x2 +4x 8n +1 2 () () =(2x +1)2: More generally we have (see [4], Proposition 2): Apos- itive number n is a sum of k triangular numbers if and only if 8n + k is a sum of k odd squares. For the partic- ularcase k =2,wehave the following result (see [5]): Theorem 3.1. A natural number n is a sum of two triangular numbers if andonly if in theprime factoriza- tion of 4n +1,every prime factor p 3(mod 4) occurs with an even exponent. ´ 1 We justifythe`only if'part as follows: if n = 2 x(x +1) then 4n +1 = x2 +(x + 1)2 is a sum of two squares, and the laws concerning such numbers are well known: Apositive integer N is a sum of two squares if andonly if every prime p 3(mod 4) which divides N does so to ´ an even power. Hencethestated result. The `if'part, asinmostsuchresults, is more challenging. Gauss's Eureka theorem shows that every positive inte- ger is a sum of at most three triangularnumbers.Given a positive number, we may ask: how many ways are there to write it as a sum of triangularnumbers?For example, the (unlucky!) number 13 can be written as such a sum in two ways: 13 =3+10= 1+6+6.This question is di±cult to answer, but there are nice results about the numberof representations of a given number as a sum of two triangularnumbers,expressed in terms of certain divisor functions. Such a relation could have Gauss’s Eureka been anticipated:suchformulae are already known in theorem shows the context of expressing positive integers assumsof that every positive squares, and we also know that triangularnumbersare integer is a sum of closely related to squares. (The problem of number of at most three representations of a given number assumsof squares triangular was¯rststudied by Greek mathematicians and hasin- numbers. teresting connections to thestudyof the geometry of 678 RESONANCE ¨July 2012 GENERAL ¨ ARTICLE lattice points in a plane. For an interesting account see [6].) We now ¯x some notation and recall some relevant re- sults from [7]. Let r2(n)bethenumberof representa- tions of n as a sum of two squares, and let t2(n)denote the number of representations of n as a sumof two tri- angularnumbers: 2 2 2 r2(n)= (x; y) Z : x + y = n ; f 2 g 2 t2(n)=¯ (x; y) Z : x(x +1)+y(¯y +1)= 2n : ¯f 2 ¯ g Further, let¯ d (n)bethenumberof divisors of n which¯ ¯ i ¯ are of the form i(mod 4). Then one hasthefollowing nice connections (see [2]): Theorem 3.2. t (n)=d (4n +1) d (4n +1);r(4n +1)= 4t (n): 2 1 ¡ 3 2 2 One may ask, more generally, about how many repre- sentations n has as a sum of k triangular numbers. The analysis of this question is di±cult and reveals connec- tions with the theory of modular forms, an extremely active area of current research. For details see [4]. One of the results used in the analysis of this problem is Jacobi's well-known tripleproduct identity (see [8], page 238). Another theorem of Jacobi which arisesinthe context of partitions of numbers (see [9], Theorem 357) and involves the triangularnumbersis: 1 1 (1 xn)3 = ( 1)m(2m +1)xm(m+1)=2: ¡ ¡ n=1 m=0 Y X The relation between triangularnumbersand partitions The relation of natural numbers is very deep, and we o®er the follow- between triangular ing result as another example (see [9], Theorem355). numbers and We know that the generating function partitions of 1 natural numbers is (1 x)(1 x3)(1 x5) very deep. ¡ ¡ ¡ ¢¢¢ RESONANCE ¨ July 2012 679 GENERAL ¨ ARTICLE enumerates the partitions of naturalnumbers into odd parts, whereas 1 (1 x2)(1 x4)(1 x6) ¡ ¡ ¡ ¢¢¢ enumerates the partitions into even parts. The aston- ishing formula which ties these two generating functions to triangularnumbersreads: (1 x2)(1 x4)(1 x6) 1 ¡ ¡ ¡ ¢¢¢ = xn(n+1)=2: (1 x)(1 x3)(1 x5) n=0 ¡ ¡ ¡ ¢¢¢ X Thus, these simple looking numbers takeusa long way into the current areas of researchinnumber theory. 4. Other Figurate Numbers Questions similartothose asked above canbeasked for numbers arising from geometrical¯gures like squares, pentagons, hexagons, etc.; see Figure 5. Numbers re- lated to such ¯gures are called ¯gurate numbers and they exhibit many interesting properties. Thus, one cande- ¯ne pentagonal numbers, hexagonalnumbers, heptago- nalnumbers,and so on. The formula for the r-th k-gonal number is: r (k 2)r (k 4) ¡ ¡ ¡ : 2 ¡ ¢ Figure 5. Square numbers 1, 4, 9, 16, ... 1, 5, 12, 22, ... and pentagonal numbers. 680 RESONANCE ¨July 2012 GENERAL ¨ ARTICLE We refer the reader to an article by Richard K Guy [10] for a list of some unsolved problems associated with these families of numbers. There are many interesting relations between these numbers and we leave it to the reader to ¯nd algebraic and pictorialproofs for them. Acknowledgements The authors thank Prof.ShripadGarge and Prof. Ajit Kumar for their help in making this article colourful. They also thank the anonymous referee foruseful sug- gestions that helped to improve the contentof this arti- cle. Suggested Reading [1] David M Burton, Elementary Number Theory, Second Edition, W C Brown Publishers, Dubuque, IA, 1989. [2] S A Shirali, http://www.mathcelebration.com/PDF/Triangle NumPDF.pdf [3] T Trotter, Some identities for the triangular numbers, Journal of Recreational Mathematics, Vol.6, No.2, Spring 1973. Address for Correspondence [4] Ono Ken, Robins Sinai and Patrick T Wahl, On the representation of Anuradha S Garge integers as sums of triangular numbers, Aequationes Math., Vol.50, Centre for Excellence in Nos 1-2, pp.73–94, 1995. Basic Sciences, [5] John A Ewell, On representations of numbers by sums of two trian- Kalina Campus gular numbers, Fibonacci Quart., Vol.30, No.2, pp.175–178, 1992. Mumbai University [6] S A Shirali, Madhava, Gregory,Leibnitz,andsumsoftwosquares, Mumbai 400 098, India. Resonance,Vol.15,No.2,pp.116–123, 2010. Email: [email protected] [7] John A Ewell, On sums of triangular numbers and sums of squares, Amer. Math. Monthly., Vol.99, No.8, pp.752–757, 1992. Shailesh A Shirali [8] N Juluru and Arni S R Srinivasa Rao, Mahlburg’s work on crank Community Mathematics functions, Ramanujan’s Partitions visited, Resonance,Vol.15,No.3, Center pp.232–243, 2010. Rishi Valley School (KFI) [9] G H Hardy and E M Wright, An Introduction to the Theory of Rishi Valley 517 352 Numbers, Sixth Edition, Oxford University Press, 2008. Andhra Pradesh, India. [10] Richard K Guy,Every number is expressible as the sum of how many Email: polygonal numbers? Amer. Math. Monthly., Vol.101, No.2, pp.169– [email protected] 172, 1994. RESONANCE ¨ July 2012 681