<<

Chapter 25

Figurate numbers

25.1 Triangular numbers

1 The nth is Tn =1+2+3+ + n = 2 n(n + 1). The first few of these are 1, 3, 6, 10, 15, 21, 28,···36, 45, 55, ... .

25.1.1 Palindromic triangular numbers

n Tn n Tn n Tn 1 1 109 5995 3185 5073705 2 3 132 8778 3369 5676765 3 6 173 15051 3548 6295926 10 55 363 66066 8382 35133153 11 66 1111 617716 11088 61477416 18 171 1287 828828 18906 178727871 34 595 1593 1269621 57166 1634004361 36 666 1833 1680861 102849 5289009825 77 3003 2662 3544453 111111 6172882716 902 Figurate numbers

25.2 Pentagonal numbers

The pentagonal numbers are the sums of the

1+4+7+ + (3n 2) + ··· − ··· 1 The nth is Pn = n(3n 1). 2 −

25.2.1 Palindromic pentagonal numbers

n Pn n Pn n Pn 1 1 101 12521 6010 54177145 2 5 693 720027 26466 1050660501 4 22 2173 7081807 26906 1085885801 26 1001 2229 7451547 31926 1528888251 44 2882 4228 26811862 44059 2911771192

25.3 The polygonal numbers Pk,n

More generally, for a fixed k, the k-gonal numbers are the sums of the arithmetic progression 1+(k 1) + (2k 3) + . The nth k-gonal 1 − − ··· number is Pk,n = n((k 2)n (k 4)). 2 − − − 25.4 Which triangular numbers are squares? 903

Exercise

1 + 2 =3, 4+5+6=7+8, 9 + 10 + 11 + 12 =13 + 14 + 15, 16 + 17 + 18 + 19 + 20 =21 + 22 + 23 + 24, . .

25.4 Which triangular numbers are squares?

Which triangular numbers are squares ? Suppose the k th triangular 1 2 1 − 2 number Tk = 2 k(k+1) is the square of n. n = 2 k(k+1); 4k +4k+1 = 8n2 + 1; (2k + 1)2 8n2 = 1. The smallest positive solution of the Pell 2 2 − equation x 8y = 1 being (3, 1), we have the solutions (ki, ni) of the equation given− by

2ki+1 + 1 = 3(2ki + 1) + 8ni, ni+1 = (2ki + 1) + 3ni, k0 = 1, n0 = 1. This means

ki+1 = 3ki + 4ni + 1, ni+1 = 2ki + 3ni + 1, k0 = 1, n0 = 1. The beginning values of k and n are as follows.

i 012345 6 7 8 9 10 ... ki 1 8 49 288 1681 9800 57121 332928 1940449 11309768 65918161 ... ni 1 6 35 204 1189 6930 40391 235416 1372105 7997214 46611179 ... Chapter 26

Sums of consecutive squares

26.1 Sum of squares of natural numbers

Theorem 26.1. 1 12 + 22 + 32 + + n2 = n(n + 1)(2n + 1). ··· 6 1 Proof. Let Tn =1+2+3 + n = n(n + 1) and ··· 2 2 2 2 2 Sn = 1 + 2 + 3 + + n . ···

23 = 13 + 3 12 + 3 1 + 1 33 = 23 + 3 · 22 + 3 · 2 + 1 43 = 33 + 3 · 32 + 3 · 3 + 1 . · · . n3 = (n 1)3 + 3(n 1)2 + 3(n 1) + 1 (n + 1)3 = −n3 + 3 −n2 + 3 −n + 1 · · Combining these equations, we have

3 3 (n + 1) = 1 + 3Sn + 3Tn + n.

Since Tn is known, we have

1 3 3 1 Sn = (n + 1) n 1 n(n + 1) = n(n + 1)(2n + 1). 3 − − − 2 6   906 Sums of consecutive squares

Exercise (1) Find 12 + 32 + 52 + + (2n 1)2. (2) ··· − 32 + 42 =52, 102 + 112 + 122 =132 + 142, 212 + 222 + 232 + 242 =252 + 262 + 272, 362 + 372 + 382 + 392 + 402 =412 + 422 + 432 + 442, . .

26.2 Sums of powers of consecutive integers

Consider the sum of the k-powers of the first natural numbers: k k k Sk(n) := 1 + 2 + + n . ···

Theorem 26.2 (Bernoulli). Sk(n) is a polynomial in n of degree k + 1 without constant term. It can be obtained recursively as

Sk+1(n)= (k + 1)Sk(n)dn + cn, Z where c is determined by the condition that the sum of the coefficients is 1.

Examples

1 (1) S2(n)= 6 n(n + 1)(2n + 1). (2) S (n) = 13 + 23 + + n3 = 1 n2(n + 1)2. 3 ··· 4 (3) S (n)= 1 n5 + 1 n4 + 1 n3 1 n. 4 5 2 3 − 30 Exercise Show that 1k + 2k + + nk =(1+2+ + n)p ··· ··· for all integers n if and only if (k,p)=(1, 1) or (3, 2). 1

1Math. Mag. 82:1 (2009) 64, 67. Chapter 27

Counting

27.1 An equilateral cut up into smaller equi- lateral triangles

Let T (n) be the number of triangles in an equilateral lattice of order n. Consider this as resulting from a lattice of order n 1 by adding a new base line of length n. There are two new types of triangles− added: (1) Upright ones with bases along the bottom line: since there are n+1 n + 1 points, there are 2 such triangles. (2) Inverted ones with exactly one vertex on the new base line: there  are 1+2+ +2+1 such triangles. ··· n 1 terms − n + 1 | T (n{z)= T (n } 1) + +1+2+ +2+1 . − 2 ···   n 1 terms − | {z } 908 Counting triangles

For example, 4 T (3) = T (2) + +1+1=5+6+2=13, 2   5 T (4) = T (3) + +1+2+1=13+10+4=27, 2   6 T (5) = T (4) + +1+2+2+1=27+15+6=48. 2   Exercise The palindromic sum 1+2+ +2+1, first increasing steadily by 1 ··· n 1 terms − 2 n εn and then decreasing by 1, is equal to − , where | {z 4 } 1, if n is odd, εn = . (0, if n is even.

2 n + 1 n εn T (n)= T (n 1) + + − − 2 4  2  3n + 2n εn = T (n 1) + − − 4 n 2 3k + 2k εk = − 4 k X=1 1 n(n + 1)(2n +1)+ n(n + 1) n+εn = 2 − 2 4 n(n + 2)(2n + 1) εn = − . 8 Here are some of the beginning values:

n 1 2 3 4 5 6 7 8 9 10 11 12 T (n) 1 5 13 27 48 78 118 170 235 315 411 525 ··· ···

Exercise How many parallelograms are there? 27.2 Scalene triangles of sidelengths n 909 ≤ 27.2 Scalene triangles of sidelengths n ≤ How many different triangles can be formed from n straight rods of lengths 1, 2, 3,... n units ? We begin with some small cases. For n = 3, the lengths 1, 2, 3 clearly do not form a triangle. The answer is 0. For n = 4, the only possible triangle has lengths 2, 3, 4. The answer is 1. Note that because of the triangle inequality, 1 cannot be used as the length of a side. If we denote by vn the number of triangles can be formed from n straight rods of lengths 1, 2, 3, ... n units, then, v3 = 0, v4 = 1. More generally, vn+1 = vn+ number of triangles with longest side n + 1 (and the other two sides unequal). Let this latter number be wn. That is, wn is the number of pairs (a, b) with a < b n such that a + b > n + 1. ≤ If we know w3,..., wn 1, then from −

v3 =0,

v4 =v3 + w3,

v5 =v4 + w4, . .

vn 1 =vn 2 + wn 2, − − − vn =vn 1 + wn 1, − − by addition, we get

vn = w3 + w4 + + wn 2 + wn 1. ··· − −

These w’s are easier to find. Think of (a, b) as a point in the square of lattice points with positive integer coordinates n. Note that wn is the number of points above the diagonals. This is one≤ quarter of the number of points in the square, less those on the two diagonals. There are 2n or 2n 1 points on the two diagonals, according as n is even or odd. − If we write this number (of points on the two diagonals) as 2n 1+εn, − with εn = 1 or 0 according as n is even or odd, then

1 2 1 2 wn = n (2n 1) εn = (n 1) εn . 4 − − − 4 − −   910 Counting triangles

Now,

vn = w3 + w4 + + wn 2 + wn 1 ··· − − 1 2 2 2 1 = 2 + 3 + +(n 2) (ε3 + ε4 + + εn 1) 4 ··· − − 4 ··· − 1 1  n 3 = (n 3)(2n2 3n + 4) − . 4 6 − − − ⌊ 2 ⌋   This can also be put into the form 1 (n 3)(n 1)(2n 1) v = − − − . n 4 6   Here are the beginning values:

n 3 4 5 6 7 8 9 10 11 12 13 14 ··· vn 0 1 3 7 13 22 34 50 70 95 125 161 ··· 27.2 Scalene triangles of sidelengths n 911 ≤

Exercise (1) In the following diagram, there are n small squares along each row and each column. How many squares of all sizes are there?

(2) In the following diagram, there are a small squares along each column and b small squares along each row. Given a b, how many squares of all sizes are there? ≤