Problem Solvingand Recreational...

299
Problem Solving and Recreational Mathematics Paul Yiu Department of Mathematics Florida Atlantic University Summer 2012 Chapters 1–44 August 1 Monday 6/25 7/2 7/9 7/16 7/23 7/30 Wednesday 6/27 *** 7/11 7/18 7/25 8/1 Friday 6/29 7/6 7/13 7/20 7/27 8/3

Transcript of Problem Solvingand Recreational...

Page 1: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Problem Solving andRecreational Mathematics

Paul Yiu

Department of MathematicsFlorida Atlantic University

Summer 2012

Chapters 1–44

August 1

Monday 6/25 7/2 7/9 7/16 7/23 7/30Wednesday 6/27 *** 7/11 7/18 7/25 8/1Friday 6/29 7/6 7/13 7/20 7/27 8/3

Page 2: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

ii

Page 3: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Contents

1 Digit problems 1011.1 When can you cancel illegitimately and yet get the cor-

rect answer? . . . . . . . . . . . . . . . . . . . . . . . 1011.2 Repdigits . . . . . . . . . . . . . . . . . . . . . . . . . 1031.3 Sorted numbers with sorted squares . . . . . . . . . . . 1051.4 Sums of squares of digits . . . . . . . . . . . . . . . . 108

2 Transferrable numbers 1112.1 Right-transferrable numbers . . . . . . . . . . . . . . . 1112.2 Left-transferrable integers . . . . . . . . . . . . . . . . 113

3 Arithmetic problems 1173.1 A number game of Lewis Carroll . . . . . . . . . . . . 1173.2 Reconstruction of multiplications and divisions . . . . .120

3.2.1 A multiplication problem . . . . . . . . . . . . . 1203.2.2 A division problem . . . . . . . . . . . . . . . . 121

4 Fibonacci numbers 2014.1 The Fibonacci sequence . . . . . . . . . . . . . . . . . 2014.2 Some relations of Fibonacci numbers . . . . . . . . . . 2044.3 Fibonacci numbers and binomial coefficients . . . . . . 205

5 Counting with Fibonacci numbers 2075.1 Squares and dominos . . . . . . . . . . . . . . . . . . 2075.2 Fat subsets of[n] . . . . . . . . . . . . . . . . . . . . . 2085.3 An arrangement of pennies . . . . . . . . . . . . . . . 209

6 Fibonacci numbers 3 2116.1 Factorization of Fibonacci numbers . . . . . . . . . . . 211

Page 4: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

iv CONTENTS

6.2 The Lucas numbers . . . . . . . . . . . . . . . . . . . 2146.3 Counting circular permutations . . . . . . . . . . . . . 215

7 Subtraction games 3017.1 The Bachet game . . . . . . . . . . . . . . . . . . . . 3017.2 The Sprague-Grundy sequence . . . . . . . . . . . . . 3027.3 Subtraction of powers of2 . . . . . . . . . . . . . . . . 3037.4 Subtraction of square numbers . . . . . . . . . . . . . 3047.5 More difficult games . . . . . . . . . . . . . . . . . . . 305

8 The games of Euclid and Wythoff 3078.1 The game of Euclid . . . . . . . . . . . . . . . . . . . 3078.2 Wythoff’s game . . . . . . . . . . . . . . . . . . . . . 3098.3 Beatty’s Theorem . . . . . . . . . . . . . . . . . . . . 311

9 Extrapolation problems 3139.1 What isf(n + 1) if f(k) = 2k for k = 0, 1, 2 . . . , n? . . 3139.2 What isf(n + 1) if f(k) = 1

k+1for k = 0, 1, 2 . . . , n? . 315

9.3 Why isex not a rational function? . . . . . . . . . . . . 317

10 The Josephus problem and its generalization 40110.1 The Josephus problem . . . . . . . . . . . . . . . . . . 40110.2 Chamberlain’s solution . . . . . . . . . . . . . . . . . 40310.3 The generalized Josephus problemJ(n, k) . . . . . . . 404

11 The nim game 40711.1 The nim sum . . . . . . . . . . . . . . . . . . . . . . . 40711.2 The nim game . . . . . . . . . . . . . . . . . . . . . . 408

12 Prime and perfect numbers 41112.1 Infinitude of prime numbers . . . . . . . . . . . . . . . 411

12.1.1 Euclid’s proof . . . . . . . . . . . . . . . . . . . 41112.1.2 Fermat numbers . . . . . . . . . . . . . . . . . 411

12.2 The sieve of Eratosthenes . . . . . . . . . . . . . . . . 41212.2.1 A visualization of the sieve of Eratosthenes . . . 412

12.3 The prime numbers below 20000 . . . . . . . . . . . . 41412.4 Perfect numbers . . . . . . . . . . . . . . . . . . . . . 41512.5 Mersenne primes . . . . . . . . . . . . . . . . . . . . . 41612.6 Charles Twigg on the first 10 perfect numbers . . . . . 41712.7 Primes in arithmetic progression . . . . . . . . . . . . 421

Page 5: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

CONTENTS v

12.8 The prime number spirals . . . . . . . . . . . . . . . . 42112.8.1 The prime number spiral beginning with 17 . . . 42212.8.2 The prime number spiral beginning with 41 . . . 423

13 Cheney’s card trick 50113.1 Three basic principles . . . . . . . . . . . . . . . . . . 501

13.1.1 The pigeonhole principle . . . . . . . . . . . . . 50113.1.2 Arithmetic modulo13 . . . . . . . . . . . . . . 50113.1.3 Permutations of three objects . . . . . . . . . . . 502

13.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 503

14 Variations of Cheney’s card trick 50514.1 Cheney card trick with spectator choosing secret card .50514.2 A3-card trick . . . . . . . . . . . . . . . . . . . . . . 507

15 The Catalan numbers 51115.1 Number of nonassociative products . . . . . . . . . . . 511

16 The golden ratio 60116.1 Division of a segment in the golden ratio . . . . . . . . 60116.2 The regular pentagon . . . . . . . . . . . . . . . . . . 60316.3 Construction of36◦, 54◦, and72◦ angles . . . . . . . . 60416.4 The most non-isosceles triangle . . . . . . . . . . . . . 608

17 Medians and angle Bisectors 60917.1 Apollonius’ Theorem . . . . . . . . . . . . . . . . . . 60917.2 Angle bisector theorem . . . . . . . . . . . . . . . . . 61117.3 The angle bisectors . . . . . . . . . . . . . . . . . . . 61217.4 Steiner-Lehmus Theorem . . . . . . . . . . . . . . . . 613

18 Dissections 61518.1 Dissection of the6× 6 square . . . . . . . . . . . . . . 61518.2 Dissection of a7× 7 square into rectangles . . . . . . . 61718.3 Dissect a rectangle to form a square . . . . . . . . . . . 61918.4 Dissection of a square into three similar parts . . . . . . 620

19 Pythagorean triangles 70119.1 Primitive Pythagorean triples . . . . . . . . . . . . . . 701

19.1.1 Rational angles . . . . . . . . . . . . . . . . . . 702

Page 6: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

vi CONTENTS

19.1.2 Some basic properties of primitive Pythagoreantriples . . . . . . . . . . . . . . . . . . . . . . . 702

19.2 A Pythagorean triangle with an inscribed square . . . . 70419.3 When arex2 − px± q both factorable? . . . . . . . . . 70519.4 Dissection of a square into Pythagorean triangles . . . .705

20 Integer triangles with a60◦ or 120◦ angle 70720.1 Integer triangles with a60◦ angle . . . . . . . . . . . . 70720.2 Integer triangles with a120◦ angle . . . . . . . . . . . 710

21 Triangles with centroid on incircle 71321.1 Construction . . . . . . . . . . . . . . . . . . . . . . . 71421.2 Integer triangles with centroid on the incircle . . . . . .715

22 The area of a triangle 80122.1 Heron’s formula for the area of a triangle . . . . . . . . 80122.2 Heron triangles . . . . . . . . . . . . . . . . . . . . . . 803

22.2.1 The perimeter of a Heron triangle is even . . . . 80322.2.2 The area of a Heron triangle is divisible by6 . . 80322.2.3 Heron triangles with sides< 100 . . . . . . . . . 804

22.3 Heron triangles with sides in arithmetic progression .. 80522.4 Indecomposable Heron triangles . . . . . . . . . . . . 80722.5 Heron triangle as lattice triangle . . . . . . . . . . . . . 809

23 Heron triangles 81123.1 Heron triangles with area equal to perimeter . . . . . . 81123.2 Heron triangles with integer inradii . . . . . . . . . . . 81223.3 Division of a triangle into two subtriangles with equal

incircles . . . . . . . . . . . . . . . . . . . . . . . . . 81323.4 Inradii in arithmetic progression . . . . . . . . . . . . . 81723.5 Heron triangles with integer medians . . . . . . . . . . 81823.6 Heron triangles with square areas . . . . . . . . . . . . 819

24 Triangles with sides and one altitude in A.P. 82124.1 Newton’s solution . . . . . . . . . . . . . . . . . . . . 82124.2 The general case . . . . . . . . . . . . . . . . . . . . . 822

25 The Pell Equation 90125.1 The equationx2 − dy2 = 1 . . . . . . . . . . . . . . . 90125.2 The equationx2 − dy2 = −1 . . . . . . . . . . . . . . 903

Page 7: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

CONTENTS vii

25.3 The equationx2 − dy2 = c . . . . . . . . . . . . . . . 903

26 Figurate numbers 90726.1 Which triangular numbers are squares ? . . . . . . . . . 90726.2 Pentagonal numbers . . . . . . . . . . . . . . . . . . . 90926.3 Almost square triangular numbers . . . . . . . . . . . . 911

26.3.1 Excessive square triangular numbers . . . . . . . 91126.3.2 Deficient square triangular numbers . . . . . . . 912

27 Special integer triangles 91527.1 Almost isosceles Pythagorean triangles . . . . . . . . . 915

27.1.1 The generators of the almost isosceles Pythagoreantriangles . . . . . . . . . . . . . . . . . . . . . . 916

27.2 Integer triangles(a, a + 1, b) with a120◦ angle . . . . . 917

28 Heron triangles 100128.1 Heron triangles with consecutive sides . . . . . . . . . 100128.2 Heron triangles with two consecutive square sides . . . 1002

29 Squares as sums of consecutive squares 100529.1 Sum of squares of natural numbers . . . . . . . . . . . 100529.2 Sums of consecutive squares: odd number case . . . . . 100829.3 Sums of consecutive squares: even number case . . . . 101029.4 Sums of powers of consecutive integers . . . . . . . . . 1012

30 Lucas’ problem 101330.1 Solution ofn(n + 1)(2n + 1) = 6m2 for evenn . . . . 101330.2 The Pell equationx2 − 3y2 = 1 revisited . . . . . . . . 101430.3 Solution ofn(n + 1)(2n + 1) = 6m2 for oddn . . . . . 1015

31 Some geometry problems 1101

32 Basic geometric constructions 110932.1 Some basic construction principles . . . . . . . . . . . 110932.2 Geometric mean . . . . . . . . . . . . . . . . . . . . . 111032.3 Harmonic mean . . . . . . . . . . . . . . . . . . . . . 111132.4 A.M≥ G.M.≥ H.M. . . . . . . . . . . . . . . . . . . 1112

Page 8: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

viii CONTENTS

33 Construction of a triangle from three given points 111533.1 Some examples . . . . . . . . . . . . . . . . . . . . . 111533.2 Wernick’s construction problems . . . . . . . . . . . . 1117

34 The classical triangle centers 120134.1 The centroid . . . . . . . . . . . . . . . . . . . . . . . 120134.2 The circumcircle and the circumcenter . . . . . . . . . 120234.3 The incenter and the incircle . . . . . . . . . . . . . . 120334.4 The orthocenter and the Euler line . . . . . . . . . . . . 120434.5 The excenters and the excircles . . . . . . . . . . . . . 1205

35 The nine-point circle 120735.1 The nine-point circle . . . . . . . . . . . . . . . . . . . 120735.2 Feuerbach’s theorem . . . . . . . . . . . . . . . . . . . 120835.3 Lewis Carroll’s unused geometry pillow problem . . . . 120935.4 Johnson’s theorem . . . . . . . . . . . . . . . . . . . . 121135.5 Triangles with nine-point center on the circumcircle .. 1212

36 The excircles 121336.1 A relation among the radii . . . . . . . . . . . . . . . . 121336.2 The circumcircle of the excentral triangle . . . . . . . . 121436.3 The radical circle of the excircles . . . . . . . . . . . . 121536.4 Apollonius circle: the circular hull of the excircles .. . 121636.5 Three mutually orthogonal circles with given centers .. 1217

37 The Arbelos 130137.1 Archimedes’ twin circle theorem . . . . . . . . . . . . 130137.2 Incircle of the arbelos . . . . . . . . . . . . . . . . . . 1302

37.2.1 Construction of incircle of arbelos . . . . . . . . 130437.3 Archimedean circles in the arbelos . . . . . . . . . . . 130437.4 Constructions of the incircle . . . . . . . . . . . . . . . 1307

38 Menelaus and Ceva theorems 130938.1 Menelaus’ theorem . . . . . . . . . . . . . . . . . . . 130938.2 Ceva’s theorem . . . . . . . . . . . . . . . . . . . . . . 1311

39 Routh and Ceva theorems 131739.1 Barycentric coordinates . . . . . . . . . . . . . . . . . 131739.2 Cevian and traces . . . . . . . . . . . . . . . . . . . . 131839.3 Area and barycentric coordinates . . . . . . . . . . . . 1320

Page 9: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

CONTENTS ix

40 Elliptic curves 140140.1 A problem from Diophantus . . . . . . . . . . . . . . . 140140.2 Dudeney’s puzzle of the doctor of physic . . . . . . . . 140340.3 Group law ony2 = x3 + ax2 + bx + c . . . . . . . . . 1404

41 Applications of elliptic curves to geometry problems 140741.1 Pairs of isosceles triangle and rectangle with equal perime-

ters and equal areas . . . . . . . . . . . . . . . . . . . 140741.2 Triangles with a median, an altitude, and an angle bi-

sector concurrent . . . . . . . . . . . . . . . . . . . . . 1409

42 Integer triangles with an altitude equal to a bisector 141142.1 A quartic equation . . . . . . . . . . . . . . . . . . . . 141142.2 Transformation of a quartic equation into an elliptic curve1413

43 The equilateral latticeL (n) 150143.1 Counting triangles . . . . . . . . . . . . . . . . . . . . 150143.2 Counting parallelograms . . . . . . . . . . . . . . . . . 150443.3 Counting regular hexagons . . . . . . . . . . . . . . . 1505

44 Counting triangles 150944.1 Integer triangles of sidelengths≤ n . . . . . . . . . . . 150944.2 Integer scalene triangles with sidelengths≤ n . . . . . 151044.3 Number of integer triangles with perimetern . . . . . . 1511

44.3.1 The partition numberp3(n) . . . . . . . . . . . . 1511

Page 10: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department
Page 11: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 1

Digit problems

1.1 When can you cancel illegitimately and yet get thecorrect answer?

Let ab andbc be2-digit numbers. When do such illegitimate cancella-tions as

abbc

= a 6b6bc = a

c,

allowing perhaps further simplifications ofac?

Answer. 1664

= 14, 19

95= 1

5, 26

65= 2

5, 49

98= 4

8.

Solution. We may assumea, b, c not all equal.Supposea, b, c are positive integers≤ 9 such that10a+b

10b+c= a

c.

(10a + b)c = a(10b + c), or (9a + b)c = 10ab.If any two ofa, b, c are equal, then all three are equal.We shall therefore assumea, b, c all distinct.9ac = b(10a− c).If b is not divisible by3, then9 divides10a − c = 9a + (a − c). It

follows thata = c, a case we need not consider.It remains to considerb = 3, 6, 9.Rewriting (*) as(9a + b)c = 10ab.If c is divisible by5, it must be5, and we have9a + b = 2ab. The

only possibilities are(b, a) = (6, 2), (9, 1), giving distinct

(a, b, c) = (1, 9, 5), (2, 6, 5).

Page 12: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

102 Digit problems

If c is not divisible by5, then9a + b is divisible by 5. The onlypossibilities of distinct(a, b) are(b, a) = (3, 8), (6, 1), (9, 4). Only thelatter two yield

(a, b, c) = (1, 6, 4), (4, 9, 8).

Exercise

1. Find all possibilities of illegitimate cancellations of each of the fol-lowing types, leading to correct results, allowing perhapsfurthersimplifications.

(a) 6a6bc6b6ad

= cd,

(b) c 6a6bd6b 6a = c

d,

(c) a6b 6c6b6cd = a

d.

2. Find all4-digit numbers like1805 = 192× 5, which, when dividedby the its last two digits, gives the square of the number one morethan its first two digits.

Page 13: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1.2 Repdigits 103

1.2 Repdigits

A repdigit is a number whose decimal representation consists of a rep-etition of the same decimal digit. Leta be an integer between0 and9.For a positive integern, the repdigitan consists of a string ofn digitseach equal toa. Thus,

an =a

9(10n − 1).

Exercise

1. Show that

16n

6n4=

1

4,

19n

9n5=

1

5,

26n

6n5=

2

5,

49n

9n8=

4

8.

Solution. More generally, we seek equalities of the formabn

bnc= a

cfor

distinct integer digitsa, b, c. Here,abn is digit a followed by n digitseach equal tob. To avoid confusion, we shall indicate multiplicationwith the sign×.

The condition(abn)× c = (bnc)× a is equivalent to(

10na +b

9(10n − 1)

)

c =

(10b

9(10n − 1) + c

)

a,

(

(10n − 1)a +b

9(10n − 1)

)

c =

(10b

9(10n − 1)

)

a.

Cancelling a common divisor10n−19

, we obtain(9a + b)c = 10ab, whichis the same condition forab

bc= a

c.

Page 14: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

104 Digit problems

Exercise

1. Prove that for1 ≤ a, b ≤ 9, a× bn = b× an.

2. Complete the following multiplication table of repdigits.

1n 2n 3n 4n 5n 6n 7n 8n 9n

1 1n 2n 3n 4n 5n 6n 7n 8n 9n

2 4n 6n 8n 1n0 13n−12 15n−14 17n−16 19n−183 9n 13n−12 16n−15 19n−18 23n−11 26n−14 29n−174 17n−16 2n0 26n−14 31n−208 35n−12 39n−165 27n−15 3n0 38n−15 4n0 49n−156 39n−16 46n−12 53n−228 59n−147 54n−239 62n−216 69n−138 71n−204 79n−129 98n−201

3. Verify 26n

6n5= 2

5.

Solution. It is enough to verify5× (26n) = 2× (6n5).

5× (26n) = 5(20n + 6n) = 10n+1 + 3n0 = 13n0;

2× (6n5) = 2(6n0 + 5) = 13n−120 + 10 = 13n0.

4. Simplify (1n)(10n−15).

Answer. (1n)(10n−15) = 1n5n.

Page 15: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1.3 Sorted numbers with sorted squares 105

1.3 Sorted numbers with sorted squares

A number issortedif its digits are nondecreasing from left to right. Itis strongly sorted if its square is also sorted. It is known that the onlystrongly sorted integers are given in the table below.1

• 1, 2, 3, 6, 12, 13, 15, 16, 38, 116, 117.

• 16n7.

• 3n4.

• 3n5.

• 3m6n7.

(3n51)2 =(10 · 3n + 5)2

=100 · (3n)2 + 100 · (3n) + 25

=1n−108n−19102 + 3n25

=1n−112n−1225

=1n2n+15.

If x = 3m6n7, then3x = 10m−110n1, and it is easy to find its square.

(3m6n7)2 =

{

1m3m4n−m+16m8n9, if n + 1 ≥ m,

1m3n+15m−n−16n+18n9, if n + 1 < m.

More generally, the product of any two numbers of the form3m6n7is sorted.

1Problem 1234,Math. Mag., 59 (1986) 1, solution, 60 (1987)1. See also R. Blecksmith and C. Nicol,Monotonic numbers,Math. Mag., 66 (1993) 257–262.

Page 16: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

106 Digit problems

Exercise

1. Find all natural numbers whose square (in base10) is representedby odd digits only.

2. Find the three3-digit numbers each of which is equal to the productof the sum of its digits by the sum of the squares of its digits.

Answer. 133, 315, 803.

3. Find all4-digit numbersabcd such that3√

abcd = a + b + c + d.

Answer. 4913 and5832.

Solution. There are only twelve4-digit numbers which are cubes.For only two of them is the cube root equal to the sum of digits.

n 10 11 12 13 14 17 16 17 18 19 20 21n3 1000 1331 1728 2197 2744 3375 4096 4913 5832 6859 8000 9261

∗ ∗ ∗ ∗ ∗ ∗

4. Use each digit1, 2, 3, 4, 5, 6, 7, 8, 9 exactly once to form primenumbers whose sum is smallest possible.

What if we also include the digit0?

5. There are exactly four3-digit numbers each equal to the sum of thecubes of its own digits. Three of them are153, 371, and407. Whatis the remaining one?

6. Find all possibilities of a3-digit number such that the three num-bers obtained by cyclic permutations of its digits are in arithmeticprogression.

Answer. 148, 185, 259, 296.

Solution. Let abc be one such3-digit numbers, witha smallestamong the digits (which are not all equal). The other two numbersarebca andcab. Their sumabc + bca + cab = 111× (a + b + c).Therefore the middle number= 37× (a + b + c).

We need therefore look for numbers of the formabc = 37× k withdigit sum equal tos, and check if37 × s = bca or cab. We mayignore multiples of3 for k (giving repdigits for37× k). Note that3k < 27. We need only considerk = 4, 5, 7, 8.

Page 17: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1.3 Sorted numbers with sorted squares 107

k 37× k s 37× s arithmetic progression4 148 13 13× 37 = 481 148, 481, 8145 185 14 14× 37 = 518 185, 518, 8517 259 16 16× 37 = 592 259, 592, 9258 296 17 17× 37 = 629 296, 629, 962

7. A 10-digit number is calledpandigitalif it contains each of the dig-its 0, 1, . . . , 9 exactly once. For example,5643907128 is pandigi-tal. We regard a9-digit number containing each of1, . . . ,9 exactlyonce as pandigital (with0 as the leftmost digit). In particular, thenumberA := 123456789 is pandigital.

There are exactly33 positive integersn for whichnA are pandigitalas shown below.

n nA n nA n nA

1 123456789 2 246913578 4 4938271565 617283945 7 864197523 8 98765431210 1234567890 11 1358024679 13 160493825714 1728395046 16 1975308624 17 209876541320 2469135780 22 2716049358 23 283950614725 3086419725 26 3209876514 31 382716045932 3950617248 34 4197530826 35 432098761540 4938271560 41 5061728349 43 530864192744 5432098716 50 6172839450 52 641975302853 6543209817 61 7530864129 62 765432091870 8641975230 71 8765432019 80 9876543120

How would you characterize these values ofn?

8. Find the smallest natural numberN , such that, in the decimal nota-tion, N and2N together use all the ten digits0, 1, . . . ,9.

Answer. N = 13485 and2N = 26970.

Page 18: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

108 Digit problems

1.4 Sums of squares of digits

Given a numberN = a1a2 · · ·an of n decimal digits, consider the “sumof digits” function

s(N) = a21 + a2

2 + · · ·+ a2n.

For example

s(11) = 2, s(56) = 41, s(85) = 89, s(99) = 162.

For a positive integerN , consider the sequence

S(N) : N, s(N), s2(N), . . . , sk(N), . . . ,

wheresk(N) is obtained fromN by k applications ofs.

Theorem 1.1.For every positive integerN , the sequenceS(N) is eithereventually constant at or periodic. The period has length8and form a cycle

Exercise

1. Prove by mathematical induction that10n−1 > 81n for n ≥ 4.

Solution. Clearly this is true forn = 4: 103 > 81 · 4.Assume10n−1 > 81n. Then

10n = 10 · 10n−1 > 10 · 81n > 81(n + 1).

Therefore,10n−1 > 81n for n ≥ 4.

Page 19: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1.4 Sums of squares of digits 109

2. Prove that ifN has4 or more digits, thens(N) < N .

Solution. If N hasn digits, then(i) N ≥ 10n−1,(ii) s(N) ≤ 81n.

From the previous exercise, forn ≥ 4, N ≥ 10n−1 > 81n ≥ s(N).

3. Verify a stronger result: ifN has3 digits, thens(N) < N .

Solution. We seek all3-digit numbersN = abc for whichs(N) ≥N .

(i) Sinces(N) ≤ 243, we need only considern ≤ 243.

(ii) Now if a = 2, thens(N) = 4 + b2 + c2 ≤ 186 < N . Thereforea = 1.

(iii) s(N) = 12 +b2 +c2 is a3-digit number if and only ifb2 +c2 ≥99. Here are the only possibilities:

(b, c) (5, 9) (6, 9) (7, 9) (8, 9) (9, 9) (6, 8) (7, 8) (8, 8)(9, 5) (9, 6) (9, 7) (9, 8) (8, 6) (8, 7)

s(N) 107 118 131 146 183 101 114 129

Therefore there is no3-digit numberN satisfyings(N) ≥ N .

4. For a given integerN , there isk for which sk(N) is a2-digit num-ber.

5. If n is one of the integers

1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97,

thensk(N) = 1 for somek.

68

86

28

82

19 91

1

10 100

13

31

130

23

32

79

97

44

49

94

7 70

Page 20: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

110 Digit problems

6. If N is a2-digit integer other than

1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97,

then the sequenceS(N) is eventually cycling between

4, 16, 37, 58, 89, 145, 42, 20.

89

85

29

927667

52 25

64

46

34

43 5

50

80 8

35

53

71

17

84 48 22

72

27 14

41

66

45

54

36

63

660

4

2

11

113

78 87

42

20

145 58

16

37

24

98

77

73

38

83

40

62

26

51

117

69

128

88

61

106

59

95

56

65

81

47

18

74

33

57

75

9

90

3

30

39

93

Page 21: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 2

Transferrable numbers

2.1 Right-transferrable numbers

A positive integer is right-transferrable if in moving its leftmost digitto the rightmost position results in a multiple of the number. Supposea right-transferrable numberX hasn digits, with leftmost digita. Wehave

10(X − a · 10n−1) + a = kX

for some integerk satisfying1 ≤ k ≤ 9. From this,

(10− k)X = a(10n − 1) = 9× an,

and

X =9× a× 1n

10− k.

Clearly,k = 1 if and only if X = an, a repdigit. We shall henceforthassumek > 1.

SinceX is ann-digit number, we must havea < 10− k. Most of thecombinations of(a, k) are quickly eliminated. In the table below,N indicates thatX is not an integer, andR indicates thatX is a repdigit (so thatk cannot be greater than1).

Page 22: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

112 Transferrable numbers

k \ a 1 2 3 4 5 6 7 8 92 N N N N N N N ∗ ∗3 ∗ ∗ ∗4 N R N R N ∗ ∗ ∗ ∗5 N N N N ∗ ∗ ∗ ∗ ∗6 N N N ∗ ∗ ∗ ∗ ∗ ∗7 R R ∗ ∗ ∗ ∗ ∗ ∗ ∗8 N ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗9 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗

This table shows thatk must be equal to3, and

X =a(10n − 1)

7.

Sincea < 7, we must have7 dividing 10n − 1. This is possible only ifn is a multiple of 6. ThereforeX = a · 106m−1

7and has first digita.

Now,106m − 1

7= (142857)m.

It is easy to see thata can only be 1 or 2.Therefore, the only right-transferrable numbers are(142857)m and

(285714)m with k = 3:

3× (142857)m = (428571)m,

3× (285714)m = (857142)m.

Page 23: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

2.2 Left-transferrable integers 113

2.2 Left-transferrable integers

A positive integer is left-transferrable if moving its rightmost digit tothe leftmost results in a multiple of the number. SupposeY is a left-transferrable with rightmost digitb. Then

b · 10n−1 +Y − b

10= kY

for an integerk. From this,

(10k − 1)Y = b(10n − 1).

Again,k = 1 if and only if Y = bn. We shall assumek > 1.Note that fork = 2, 3, 6, 8, 9, p = 10k − 1 is a prime numberp >

10 > b. It divides10n − 1. By Fermat’s theorem, the order of10 mod pis a divisor ofp− 1.

k n

2 19Y = b(10n − 1) 19|10n − 1 18m3 29Y = b(10n − 1) 29|10n − 1 28m4 39Y = b(10n − 1) b 6= 3, 6, 9; 39|10n − 1 6m5 49Y = b(10n − 1) b 6= 7; 49|10n − 1 42m

b = 7; 7|10n − 1 6m6 59Y = b(10n − 1) 59|10n − 1 58m7 69Y = b(10n − 1) b 6= 3, 6, 9; 69|10n − 1 22m8 79Y = b(10n − 1) 79|10n − 1 13m9 89Y = b(10n − 1) 89|10n − 1 44m

Consider the casek = 2. We haven = 18m. If we taken = 18, then

Y =b(1018 − 1)

19= b× 52631578947368421.

Note thatA = 1018−119

= 52631578947368421 has only17 nonzerodigits, we treat it as an18-digit number052631578947368421. For eachb = 1, . . . , 9, the numberYb = b(1018−1)

19is right-transferrable withk = 2:

Page 24: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

114 Transferrable numbers

b b× A rightmost digit to leftmost1 052631578947368421 1052631578947368422 105263157894736842 2105263157894736843 157894736842105263 3157894736842105264 210526315789473684 4210526315789473685 263157894736842105 5263157894736842106 315789473684210526 6315789473684210527 368421052631578947 7368421052631578948 421052631578947368 8421052631578947369 473684210526315789 947368421052631578

More generally, for each of theseYb and arbitrary positive integerm,

Yb,m = Yb × ((1017)m−1)1 = (Yb)m

is also left-transferrable withk = 2.

Proof. Write Yb = Xbb for a17-digit numberXb. Transferring the right-most digit of(Yb)m to the leftmost, we have

(bXb)m = (2× Yb)m = 2× (Yb)m.

The same holds for the other values ofk > 1 as shown in the tablebelow, except fork = 5, where we also have714285 = 5× 142857.

k p

2 19 0526315789473684213 29 03448275862068965517241379314 0256415 020408163265306122448979591836734693877551

142857∗6 59 01694915254237288135593220338983050847457627118644067796617 01449275362318840579718 79 01265822784819 89 01123595505617977528089887640449438202247191

Page 25: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

2.2 Left-transferrable integers 115

Exercise

1. What digits should be substituted for the letters so that thesum ofthe nine identical addends will be a repunit?

R E P U N I T SR E P U N I T SR E P U N I T SR E P U N I T SR E P U N I T SR E P U N I T SR E P U N I T SR E P U N I T S

+ R E P U N I T S

2. Are two repunits with consecutive even numbers as their subscriptsrelatively prime?

3. Are two repunits with consecutive numbers as their subscripts rel-atively prime?

4. Are two repunits with consecutive odd numbers as their subscriptsrelatively prime?

5. What digit does each letter of this multiplication represent?

R R R R R R R× R R R R R R R

R E P U N I T I N U P E R

6. An old car dealer’s record in the 1960’s shows that the total receiptsfor the sale of new cars in one year came to1, 111, 111.00 dollars.If each car had eight cylinders and was sold for the same priceaseach other car, how many cars did he sell? (Note: This riddle waswritten before the inflation in the 1980’s).

7. If a Mersenne numberMp = 2p − 1 is prime, is the correspondingrepunit1p also prime?

Page 26: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

116 Transferrable numbers

Page 27: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 3

Arithmetic problems

3.1 A number game of Lewis Carroll

How would you getA from D?

Take asecretnumber AMultiply it by 3Tell me if it is evenor oddDo the correspondingroutineas instructed below.Multiply by 3Tell me if it is evenor oddDo the correspondingroutine BAdd 19 to the original numberAand put anextra digit at the end CNow addB andCDivide by7 and getthequotient onlyFurther divide by7 and getthequotient only DTell me this DandI shall give you back your A

• odd routine: Add 5 or 9, then divide by2, and then add1.

• even routine: Subtract2 or 6, then divide by2, and then add29 or33 or 37.

Page 28: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

118 Arithmetic problems

Solution. A can be obtained fromD by(i) forming 4D − 15,(ii) subtracting3 if the first parity answer is even, and(iii) subtracting2 if the second parity answer is even.Analysis.

• e ande′ are either0 or 1.

• f andf ′ are−1, 0, or 1.

• g is an integer between0 and9.

• The last two steps of dividing by7 and keeping the quotients canbe combined into one single step of dividing by49.

A 4k + 1 4k + 2 4k + 3 4k + 4

3A 12k + 3 12k + 6 12k + 9 12k + 12

Parity odd even odd evenRoutine 6k + 5 + 2e 6k + 35 6k + 8 + 2e 6k + 38

−2e + 4f −2e + 4f

3 times 18k + 15 + 6e 18k + 105 18k + 24 + 6e 18 + 114−6e + 12f −6e + 4f

Parity odd odd even evenRoutineB 9k + 11 9k + 56 9k + 43 9k + 89

+3e + 2e′ −3e + 2e′ +3e − 2e′ −3e − 2e′

+6f +4f ′ +6f + 4f ′

C 40k + 200 + g 40k + 210 + g 40k + 220 + g 40k + 230 + g

B + C 49k + 211 + g 49k + 266 + g 49k + 263 + g 49k + 319 + g

+3e + 2e′ −3e + 2e′ +3e − 2e′ −3e − 2e′

+6f +4f ′ +6f + 4f ′

lower bound 49k + 211 49k + 257 49k + 257 49k + 304upper bound 49k + 225 49k + 283 49k + 279 49k + 318

D k + 4 k + 5 k + 5 k + 6

A 4D − 15 4D − 18 4D − 17 4D − 20

Page 29: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

3.1 A number game of Lewis Carroll 119

Exercise

1. There is a list ofn statements. Fork = 1, 2, . . . , n, thek-th state-ment reads:

The number of false statements in this list is greater thank.

Determine the truth value of each of the statements.

Answer. n must be an odd number. Writen = 2m + 1.Statements1, . . . ,m are true, and statementsm+1, . . . ,n are false.

2. A man rowing upstream passes a log aftera miles, then contin-ues forb hours, and then rows downstream, meeting the log at hisstarting point. What is the rate of the stream?

3. If a man takesh hours to make a certain trip, how much faster musthe travel to make a tripm miles longer in the same time?

4. The ratio of the speeds of two trains is equal to the ratio of the timethey take to pass each other going in the same direction to thetimethey take to pass each other in the opposite direction. Find the ratioof the speeds of the two trains.

5. You and I are walking toward each other along a straight road,eachat a steady speed. A truck (also traveling at a steady speed) passesyou in one second, and one second later it reaches me. One secondafter the truck has passed me, you and I meet. How long does thetruck take to pass me?

6. The two hands of a clock have the same length. One can, neverthe-less, normally tell the correct time. For example, when the handspoint at 6 and 12, it must be 6 O’clock, and cannot be otherwise.In every 12 hours period, there are, however, a number of occa-sions when it is impossible to tell the time. Exactly how manysuchoccasions are there?

Page 30: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

120 Arithmetic problems

3.2 Reconstruction of multiplications and divisions

3.2.1 A multiplication problem

A multiplication of a three-digit number by 2-digit number has the formin which all digits involved are prime numbers. Reconstructthe multi-plication. (Note that1 is not a prime number).

p p p× p p

p p p pp p p pp p p p p

Page 31: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

3.2 Reconstruction of multiplications and divisions 121

3.2.2 A division problem

This is Problem E1 of the AMERICAN MATHEMATICAL MONTHLY:

x 7 x x xx x x) x x x x x x x x

x x x xx x xx x xx x x x

x x xx x x xx x x x

Clearly, the last second digit of the quotient is 0.Let the divisor be the 3-digit numberd.Consider the 3-digit number in the seventh line, which is a multiple ofd. Its difference from the 4-digit number in the sixth line is a2-digitnumber. This must be9xx.This cannot be the same as the 3-digit number in the fifth line,since thedifference between the 3-digit numbers in the fourth and fifth lines is a3-digit number.Therefore, in the quotient, the digit after 7 is a larger one,which must besmaller than the first and the last digits, since these give 4-digit multiplesof d.It follows that the quotient is 97809.Since8d is a 3-digit number9xx, the 4-digit number in the third andbottom lines is9d = 10xx or 11xx.From this8d must be99x, and therefore992 = 8× 124.

9 7 8 0 91 2 4) 1 2 1 2 8 3 1 6

1 1 1 69 6 88 6 81 0 0 3

9 9 21 1 1 61 1 1 6

Page 32: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

122 Arithmetic problems

Exercise

Reconstruct the following division problems.

1.∗ ∗ ∗ ∗ ∗

∗ ∗) ∗ ∗ ∗ ∗ 2 ∗∗ ∗∗ ∗ ∗∗ ∗∗ ∗ ∗∗ ∗ ∗

∗ ∗∗ ∗

2.∗ ∗ ∗ ∗ ∗

∗ ∗) ∗ ∗ ∗ ∗ 9 ∗∗ ∗∗ ∗ ∗∗ ∗∗ ∗ ∗∗ ∗ ∗

∗ ∗∗ ∗

3.

x x 8 x xx x x) x x x x x x x x

x x xx x x x

x x xx x x xx x x x

Page 33: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

3.2 Reconstruction of multiplications and divisions 123

4.x x x x x x

x x x) x x x x x x x xx x xx x x x

x x xx x x x

x x xx x x xx x x x

Page 34: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 4

Fibonacci numbers

4.1 The Fibonacci sequence

The Fibonacci numbersFn are defined recursively by

Fn+1 = Fn + Fn−1, F0 = 0, F1 = 1.

The first few Fibonacci numbers are

n 0 1 2 3 4 5 6 7 8 9 10 11 12 . . .Fn 0 1 1 2 3 5 8 13 21 34 55 89 144 . . .

An explicit expression can be obtained for the Fibonacci numbers byfinding theirgenerating function, which is the formal power series

F (x) := F0 + F1x + · · ·+ Fnxn + · · · .

From the defining relations, we have

F2x2 = F1x · x + F0 · x2,

F3x3 = F2x

2 · x + F1x · x2,

F4x4 = F3x

3 · x + F2x2 · x2,

...

Fnxn = Fn−1xn−1 · x + Fn−2x

n−2 · x2,

...

Page 35: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

202 Fibonacci numbers

Combining these relations we have

F (x)− (F0 + F1x) = (F (x)− F0) · x + F (x) · x2,

F (x)− x = F (x) · x + F (x) · x2,

(1− x− x2)F (x) = x.

Thus, we obtain the generating function of the Fibonacci numbers:

F (x) =x

1− x− x2.

There is a factorization of1 − x − x2 by making use of the roots ofthe quadratic polynomial. Letα > β be the two roots. We have

α + β = 1, αβ = −1.

More explicitly,

α =

√5 + 1

2, β = −

√5− 1

2.

Now, since1−x−x2 = (1−αx)(1−βx), we have apartial fractiondecomposition

x

1− x− x2=

x

(1− αx)(1− βx)=

1

α− β

(1

1− αx− 1

1− βx

)

.

Each of 11−αx

and 11−βx

has a simple power series expansion. In fact,making use of

1

1− x= 1 + x + x2 + · · ·+ xn + · · · =

∞∑

n=0

xn,

and noting thatα− β =√

5, we have

x

1− x− x2=

1√5

( ∞∑

n=0

αnxn −∞∑

n=0

βnxn

)

=

∞∑

n=0

αn − βn

√5

xn.

The coefficients of this power series are the Fibonacci numbers:

Fn =αn − βn

√5

, n = 0, 1, 2, . . . .

Page 36: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

4.1 The Fibonacci sequence 203

1. Fn is the integer nearest toαn

√5: Fn =

{αn√

5

}

.

Proof. ∣∣∣∣Fn −

αn

√5

∣∣∣∣=

∣∣∣∣

βn

√5

∣∣∣∣<

1√5

<1

2.

2. Forn ≥ 2, Fn+1 = {αFn}.

Proof. Note that

Fn+1 − αFn =αβn − βn+1

=

α− β√5· βn = βn.

Forn ≥ 2,

|Fn+1 − αFn| = |β|n <1

2.

3. limn→∞Fn+1

Fn= α.

Exercise

1. (a) Make use of only the fact that987 is a Fibonacci number toconfirm that17711 is also a Fibonacci number, and find all inter-mediate Fibonacci numbers.

(b) Make use of the result of (a) to decide if75026 is a Fibonaccinumber.

2. Prove by mathematical induction the Cassini formula:

Fn+1Fn−1 − F 2n = (−1)n.

3. The conversion from miles into kilometers can be neatly expressedby the Fibonacci numbers.

miles 5 8 13kilometers 8 13 21

Page 37: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

204 Fibonacci numbers

How far does this go? Taking1 meter as39.37 inches, what is thelargestn for whichFn miles can be approximated byFn+1 kilome-ters, correct to the nearest whole number?

4. Prove the Fermat Last Theorem for Fibonacci numbers: there is nosolution ofxn + yn = zn, n ≥ 2, in which x, y, z are (nonzero)Fibonacci numbers.

4.2 Some relations of Fibonacci numbers

1. Sum of consecutive Fibonacci numbers:n∑

k=1

Fk = Fn+2 − 1.

2. Sum of consecutive odd Fibonacci numbers:n∑

k=1

F2k−1 = F2n.

3. Sum of consecutive even Fibonacci numbers:n∑

k=1

F2k = F2n+1 − 1.

4. Sum of squares of consecutive Fibonacci numbers:

n∑

k=1

F 2k = FnFn+1.

5. Cassini’s formula:

Fn+1Fn−1 − F 2n = (−1)n.

Page 38: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

4.3 Fibonacci numbers and binomial coefficients 205

4.3 Fibonacci numbers and binomial coefficients

Rewriting the generating function x1−x−x2 = x

1−(x+x2)as

x + x(x + x2) + x(x + x2)2 + x(x + x2)3 + x(x+2)4 + · · ·

= x + x2(1 + x) + x3(1 + x)2 + x4(1 + x)3 + x5(1 + x)4 + · · ·

= x + x2 + x3 + x4 + x5 + · · ·

+ x3 + 2x4 + 3x5 + 4x6 + · · ·

+ x5 + 3x6 + 6x7 + · · ·

+ x7 + 4x8 + · · ·

+ x9 + · · ·

+...

we obtain the following expressions of the Fibonacci numbers in termsof the binomial coefficents:

F1 =

(

0

0

)

= 1,

F2 =

(

1

0

)

= 1,

F3 =

(

2

0

)

+

(

1

1

)

= 2,

F4 =

(

3

0

)

+

(

2

1

)

= 1 + 2 = 3,

F5 =

(

4

0

)

+

(

3

1

)

+

(

2

2

)

= 1 + 3 + 1 = 5,

F6 =

(

5

0

)

+

(

4

1

)

+

(

3

2

)

= 1 + 4 + 3 = 8,

F7 =

(

6

0

)

+

(

5

1

)

+

(

4

2

)

+

(

3

3

)

= 1 + 5 + 6 + 1 = 13,

F8 =

(

7

0

)

+

(

6

1

)

+

(

5

2

)

+

(

4

3

)

= 1 + 6 + 10 + 4 = 21,

...

Page 39: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

206 Fibonacci numbers

Theorem 4.1.For k ≥ 0,

Fk+1 =

⌈k2⌉

j=0

(k − j

j

)

.

Proof.

x

1− x− x2= x ·

∞∑

n=0

(x + x2)n

=∞∑

n=0

xn+1(1 + x)n

=

∞∑

n=0

xn+1

n∑

m=0

(n

m

)

xm

=

∞∑

n=0

n∑

m=0

(n

m

)

xn+m+1

=

∞∑

k=1

⌈k2⌉

j=0

(k − j

j

)

xk+1.

Page 40: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 5

Counting with Fibonaccinumbers

5.1 Squares and dominos

In how many ways can a1 × n rectangle be tiled with unit squares anddominos (1× 2 squares)?

0 1 2 3 4 501

7 8 9 10111201

14151617181901

212223242526010 1 2 3 4 5

23

7 8 9 10111223

14151617181923

21222324252623

Suppose there arean ways of tiling a1× n rectangle.There are two types of such tilings.

(i) The rightmost is tiled by a unit square. There arean−1 of these tilings.(ii) The rightmost is tiled by a domino. There arean−2 of these. There-fore,

an = an−1 + an−2.

Note thata1 = 1 anda2 = 2. These are consecutive Fibonacci numbers:a1 = F2 anda2 = F3. Since the recurrence is the same as the Fibonaccisequence, it follows thatan = Fn+1 for everyn ≥ 1.

Page 41: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

208 Counting with Fibonacci numbers

5.2 Fat subsets of[n]

A subsetA of [n] := {1, 2 . . . , n} is called fat if for every a ∈ A,a ≥ |A| (the number of elements ofA). For example,A = {4, 5} isfat butB = {2, 4, 5} is not. Note that the empty set is fat. How many fatsubsets does[n] have?Solution. Suppose there arebn fat subsets of[n]. Clearly,b1 = 2 (everysubset is fat) andb2 = 3 (all subsets except[2] itself is fat). Here are the5 fat subsets of[3]:

∅, {1}, {2}, {3}, {2, 3}.

There are two kinds of fat subsets of[n].(i) Those fat subsets which do not containn are actually fat subsets of[n− 1], and conversely. There arebn−1 of them.(ii) Let A be a fat subset ofm elements andn ∈ A. If m = 1, thenA = {n}. If m > 1, then every element ofA is greater than1. Thesubset

A′ := {j − 1 : j < n, j ∈ A}hasm− 1 elements, each≥ m− 1 sincej ≥ m for everyj ∈ A. NotethatA′ does not containn − 1. It is a fat subset of[n − 2]. There arebn−2 such subsets.

We have established the recurrence

bn = bn−1 + bn−2.

This is the same recurrence for the Fibonacci numbers. Now, sinceb1 = 2 = F3 andb2 = 3 = F4, it follows that bn = Fn+2 for everyn ≥ 1.

Exercise

1. (a) How many permutationsπ : [n]→ [n] satisfy

|π(i)− i| ≤ 1, i = 1, 2, . . . , n ?

(b) Letπ be a permutation satisfying the condition in (a). Supposefor distincta, b ∈ [n], π(a) = b. Prove thatπ(b) = a.

Page 42: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

5.3 An arrangement of pennies 209

5.3 An arrangement of pennies

Consider arrangements of pennies in rows in which the pennies in anyrow are contiguous, and each penny not in the bottom row touches twopennies in the row below. For example, the first one is allowedbut notthe second one:

How many arrangements are there withn pennies in the bottom row?Here are the arrangements with4 pennies in the bottom, altogether13.

Solution. Let an be the number of arrangements withn pennies in thebottom. Clearly

a1 = 1, a2 = 3, a3 = 5, a4 = 13.

A recurrence relation can be constructed by considering thenumberof pennies in the second bottom row. This may ben − 1, n − 2, . . . ,1,and also possibly none.

an = an−1 + 2an−2 + · · ·+ (n− 1)a1 + 1.

Page 43: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

210 Counting with Fibonacci numbers

Here are some beginning values:

n an

1 12 23 54 5 + 2 · 2 + 3 · 1 + 1 = 13,5 13 + 2 · 5 + 3 · 2 + 4 · 1 + 1 = 34,6 34 + 2 · 13 + 3 · 5 + 4 · 2 + 5 · 1 + 1 = 89,...

These numbers are the old Fibonacci numbers:

a1 = F1, a2 = F3, a3 = F5, a4 = F7, a5 = F9, a6 = F11.

From this we make the conjecturean = F2n−1 for n ≥ 1.

Proof. We prove by mathematical induction a stronger result:

an = F2n−1,n∑

k=1

ak = F2n.

These are clearly true forn = 1. Assuming these, we have

an+1 = an + 2an−1 + 3an−2 + · · ·+ na1 + 1

= (an + an−1 + an−2 + · · ·+ a1)

+ (an−1 + 2an−2 + · · ·+ (n− 1)a1 + 1)

= F2n + an

= F2n + F2n−1

= F2n+1;n+1∑

k=1

ak = an+1 +

n∑

k=1

ak

= F2n+1 + F2n

= F2(n+1).

Therefore, the conjecture is established for all positive integersn. Inparticular,an = F2n−1.

Page 44: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 6

Fibonacci numbers 3

6.1 Factorization of Fibonacci numbers

1. gcd(Fm, Fn) = Fgcd(m,n).

2. If m|n, thenFm|Fn.

3. Here are the beginning values ofF2n ÷ Fn:

n Fn F2n Ln = F2n ÷ Fn

1 1 1 12 1 3 33 2 8 44 3 21 75 5 55 116 8 144 187 13 377 298 21 987 47...

(a) These quotients seem to satisfy the same recurrence as the Fi-bonacci numbers: each number is the sum of the precedingtwo.

(b) Therefore, it is reasonable to expect that each of these quo-tients can be expressed in terms of Fibonacci numbers.

Page 45: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

212 Fibonacci numbers 3

n Fn F2n Ln = F2n ÷ Fn Fn−1 + Fn+1

1 1 1 12 1 3 3 = 1 + 23 2 8 4 = 1 + 34 3 21 7 = 2 + 55 5 55 11 = 3 + 86 8 144 18 = 5 + 137 13 377 29 = 8 + 218 21 987 47 = 13 + 34...

(c) Conjectures: (a)Ln+2 = Ln+1 + Ln, L1 = 1, L2 = 3;(b) Ln = Fn+1 + Fn−1.

4. These conjectures are true. They are easy consequences of

Theorem 6.1(Lucas’ Theorem).

F2n = F 2n+1 − F 2

n−1,

F2n+1 = F 2n+1 + F 2

n .

Proof. We prove this by mathematical induction. These are true forn = 1.

Assume these hold. Then

F2n+2 = F2n+1 + F2n

= (F 2n+1 + F

2n) + (F 2

n+1 − F2n−1)

= (F 2n+1 + F

2n+1) + (F 2

n − F2n−1)

= F2n+1 + F

2n+1 + (Fn + Fn−1)(Fn − Fn−1)

= F2n+1 + F

2n+1 + Fn+1(Fn − Fn−1)

= F2n+1 + Fn+1(Fn+1 + (Fn − Fn−1))

= F2n+1 + Fn+1(Fn + (Fn+1 − Fn−1))

= F2n+1 + 2Fn+1Fn

= F2n+1 + 2Fn+1Fn + F

2n − F

2n

= F2n+2 − F

2n ;

F2n+3 = F2n+2 + F2n+1

= (F 2n+2 − F

2n) + (F 2

n+1 + F2n)

= F2n+2 + F

2n+1.

Page 46: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

6.1 Factorization of Fibonacci numbers 213

Therefore the statements are true for alln.

5. By Lucas’ theorem,

F2n = F 2n+1−F 2

n−1 = (Fn+1−Fn−1)(Fn+1+Fn−1) = Fn(Fn+1+Fn−1).

If we put Ln = Fn+1 + Fn−1, thenL1 = F2 + F0 = 1, L2 =F1 + F3 = 1 + 2 = 3, and

Ln+2 = Fn+3+Fn+1 = (Fn+2+Fn)+(Fn+1+Fn−1) = Ln+1+Ln.

6. If Fn is prime, thenn is prime. The converse is not true. Of course,F2 = 1 is not a prime. What is the least odd primep for which Fp

is not prime?

7. Apart from F0 = 0 andF1 = F2 = 1, there is only one moreFibonacci number which is a square. What is this?

Page 47: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

214 Fibonacci numbers 3

6.2 The Lucas numbers

The sequence(Ln) satisfyin

Ln+2 = Ln+1 + Ln, L1 = 1, L2 = 3,

is called the Lucas sequence, andLn then-th Lucas number.Here are the beginning Lucas numbers.

n 1 2 3 4 5 6 7 8 9 10 11 12Ln 1 3 4 7 11 18 29 47 76 123 199 322

Let α > β be the roots of the quadratic polynomialx2 − x− 1.

1. Ln = αn + βn.

2. Ln+1 + Ln−1 = 5Fn.

3. F2k = L1L2L4L8 · · ·L2k−1 .

4. L1 = 1 andL3 = 4 are the only square Lucas numbers (U. Alfred,1964).

Exercise

1. Prove thatL2n = L2n + 2(−1)n−1.

Solution.

L2n = α2n + β2n

= (αn + βn)2 − 2(αβ)n

= L2n − 2(−1)n.

2. ExpressF4n ÷ Fn in terms ofLn.

Solution.

F4n = F2nL2n = FnLnL2n = Fn(L3n + 2(−1)n−1Ln).

3. ExpressF3n ÷ Fn in terms ofLn.

Answer. F3n = Fn(L2n + (−1)n).

Page 48: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

6.3 Counting circular permutations 215

6.3 Counting circular permutations

Let n ≥ 4. The numbers1, 2, . . . ,n are arranged in a circle. How manypermutations are there so that each number is not moved more than oneplace?Solution. (a)π(n) = n. There areFn permutations of[n−1] satisfying|π(i)− i| ≤ 1.

(b) π(n) = 1.(i) If π(1) = 2, thenπ(2) = 3, . . . ,π(n− 1) = n.(ii) If π(1) = n, thenπ restricts to a permutation of[2, . . . , n− 1] satis-fying |π(i)− i| ≤ 1. There areFn−1 such permutations.

(c) π(n) = n− 1.(i) If π(n−1) = n−2, thenπ(n−2) = n−3, . . . ,π(2) = 1, π(1) = n.(ii) If π(n− 1) = n, thenπ restricts to a permutation of[1, n− 2] satis-fying |π(i)− i| ≤ 1. There areFn−1 such permutations.

Therefore, there are altogetherFn + 2(Fn−1 + 1) = Ln + 2 suchcircular permutations.

Forn = 4, this isL4 + 2 = 9.

4

1

2

3

4

1

2

3

4

1

2

3

4

2

1

3

4

1

2

3

4

1

3

2

4

1

2

3

1

2

3

4

4

1

2

3

1

4

2

3

4

1

2

3

1

4

3

2

4

1

2

3

3

4

1

2

4

1

2

3

3

1

2

4

4

1

2

3

3

2

1

4

Page 49: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 7

Subtraction games

7.1 The Bachet game

Beginning with a positive integer, two players alternatelysubtract a pos-itive integer< d. The player who gets down to0 is the winner.

There is a set of winning positions in the form of a decreasingse-quence of nonnegative integers, such that if you secure one of these po-sitions, then your opponent cannot secure any of the winningpositions,and no matter how he moves, you can always secure a (smaller) winningpositions. By keeping track of these winning positions, youeventuallysecure0 and win the game.

In the present example (the Bachet game), the winning positions areprecisely the multiples ofd.

Proof. If Player A occupies positionkd, and his opponent subtracta <d, then A subtracts(d−a) and occupies occupies position(k−1)d. Thesame strategy allows A to get to0 through the multiples ofd.

Page 50: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

302 Subtraction games

7.2 The Sprague-Grundy sequence

Let G be a two-person counter game in which two players alternately re-move a positive amount of counters according to certain specified rules.The Sprague-Grundy sequence ofG is the sequence(g(n)) of nonnega-tive integers defined recursively as follows.

(1) g(n) = 0 for all n which have no legal move to another number.In particular,g(0) = 0.

(2) Suppose from positionn it is possible to move to any of positionsm1, m2, . . . ,mk, (all < n), theng(n) is the smallest nonnegative integerdifferent fromg(m1), g(m2), . . . ,g(mk).

Theorem 7.1.The player who secures a positionn with g(n) = 0 has awinning strategy.

Example 7.1.The Bachet game:

n ← g(n)

0 01 0 12 1, 0 23 2, 1, 0 3...

d− 1 (d− 2), . . . , 1, 0 d− 1d (d− 1), . . . , 1 0...

More generally,g(kd + a) = a for integersk anda satisfying0 ≤a < d. The Sprague-Grundy sequence is the periodic sequence withperiod0, 1, . . . ,d− 1. The winning positions are precisely the multiplesof d.

Example 7.2.The trivial counter game. Two players alternately subtractany positiveamount. The only winning position is0. The first playerwins by removing all counters. In this case,g(n) = n for everyn.

Page 51: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

7.3 Subtraction of powers of2 303

7.3 Subtraction of powers of2

n ← g(n)

0 01 0 12 1, 0 23 2, 1 04 3, 2, 0 15 4, 3, 1 26 5, 4, 2 07 6, 5, 3 18 7, 6, 4, 0 29 8, 7, 5, 1 010 9, 8, 6, 2 1

This suggests that the winning positions are the multiples of 3.

Proof. If Player A occupies a multiple of3, any move by Player B willresults in a position3k + 1 or 3k + 2. Player A can get to a smallermultiple of3 by subtracting1 or 2 accordingly.

Exercise

1. What are the winning positions in the game of subtraction of pow-ers of3?

Answer. Even numbers.

2. What are the winning positions in the game of subtraction of primenumbers or1?

Answer. Multiples of4.

3. What are the winning positions in the game of subtraction of aproper divisor of the current number (allowing1 but not the numberitself) ? Note that1 is not a proper divisor of itself

Answer. Odd numbers except1.

Solution. The clue is that all factors of an odd number are odd.Subtracting an odd leaves an even number. Hence the winningstrategy is to leave an odd number so that you opponent will alwaysleave you an even number. From this you get to an odd number bysubtracting1.

Page 52: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

304 Subtraction games

7.4 Subtraction of square numbers

Two players alternately subtract a positive square number.We calculatethe Sprague-Grundy sequence.

n ← g(n)

0 01 0 12 1 03 2 14 3, 0 25 4, 1 06 5, 2 17 6, 3 08 7, 4 19 8, 5, 0 210 9, 6, 1 0

The values ofn ≤ 500 for which g(n) = 0 are as follows: 1 Theseare the winning positions.

0 2 5 7 10 12 15 17 20 22 34 39 44 52 5762 65 67 72 85 95 109 119 124 127 130 132 137 142 147

150 170 177 180 182 187 192 197 204 210 215 238 243 249 255257 260 262 267 272 275 312 317 322 327 332 335 340 345 350369 377 390 392 397 425 430 437 442 447 449 464

Suppose we start with74. Player A can subtract9 to get to65, orsubtract64 to get10, which have value0. In the latter case, B may moveto 9, 6 or 1. A clearly wins if B moves to9 or 1. But if B moves to6,then A can move to5 or 2 and win.

Exercise

1. How would you win if the starting number is200? or500?

1[Smith, p.68] incorrectly asserts that this sequence is periodic, with period 5.

Page 53: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

7.5 More difficult games 305

7.5 More difficult games

1. Subtraction of proper divisor of current number (not allowing1 andthe number itself).

The winning positions within 500 are as follows.

0 1 2 3 5 7 8 9 11 13 15 17 19 21 2325 27 29 31 32 33 35 37 39 41 43 45 47 49 5153 55 57 59 61 63 65 67 69 71 73 75 77 79 8183 85 87 89 91 93 95 97 99 101 103 105 107 109 111

113 115 117 119 121 123 125 127 128 129 131 133 135 137 139141 143 145 147 149 151 153 155 157 159 161 163 165 167 169171 173 175 177 179 181 183 185 187 189 191 193 195 197 199201 203 205 207 209 211 213 215 217 219 221 223 225 227 229231 233 235 237 239 241 243 245 247 249 251 253 255 257 259261 263 265 267 269 271 273 275 277 279 281 283 285 287 289291 293 295 297 299 301 303 305 307 309 311 313 315 317 319321 323 325 327 329 331 333 335 337 339 341 343 345 347 349351 353 355 357 359 361 363 365 367 369 371 373 375 377 379381 383 385 387 389 391 393 395 397 399 401 403 405 407 409411 413 415 417 419 421 423 425 427 429 431 433 435 437 439441 443 445 447 449 451 453 455 457 459 461 463 465 467 469471 473 475 477 479 481 483 485 487 489 491 493 495 497 499

2. Subtraction of primes (not allowing1).

The winning positions within 500 are as follows.

0 1 9 10 25 34 35 49 55 85 91 100 115 121 125133 145 155 169 175 187 195 205 217 235 247 253 259 265 289295 301 309 310 319 325 335 343 355 361 375 385 391 395 403415 425 445 451 469 475 481 485 493

Page 54: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

306 Subtraction games

Page 55: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 8

The games of Euclid andWythoff

8.1 The game of Euclid

Two players alternately remove chips from two piles ofa andb chipsrespectively. A move consists of removing a multiple of one pile fromthe other pile. The winner is the one who takes the last chip inone of thepiles.

Preliminary problem: Find a constantk such that for positive integersa andb satisfyingb < a < 2b,(i) a < kb =⇒ b > k(a− b),(ii) a > kb =⇒ b < k(a− b).Analysis: If these conditions hold, then we havea = kb =⇒ b =k(a − b). If a

b= k, then1 = k

(ab− 1)

= k(k − 1). Such a numberkmust satisfyk(k − 1) = 1; it is the golden ratioϕ = 1

2(√

5 + 1).

Proposition 8.1. Let ϕ := 12(√

5 + 1). For any two real numbersa andb,(i) a < ϕb =⇒ b > ϕ(a− b),(ii) a > ϕb =⇒ b < ϕ(a− b).

Proof. The golden ratioϕ satisfiesϕ− 1 = 1ϕ

.(i) a < ϕb =⇒ a− b < (ϕ− 1)b = 1

ϕ· b =⇒ ϕ(a− b) < b.

(ii) a > ϕb =⇒ a− b > (ϕ− 1)b = 1ϕ· b =⇒ ϕ(a− b) > b.

Theorem 8.2.In the game of Euclid(a, b), the first player has a winningstrategy if and only ifa > ϕb.

Page 56: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

308 The games of Euclid and Wythoff

Proof. The first player (A) clearly wins ifa = kb for some integerk.Assumea > ϕb. Let q be thelargest integer such thata > qb.If q = 1, the only move is(a, b) // (b, a− b).

In this case,b < ϕ(a− b) by Proposition 8.1(ii).If q ≥ 2, we consider the moves

(i) (a, b) // (b, a− qb) and(ii) (a, b) // (a− (q − 1)b, b) (Note thata− (q − 1)b > b).

If b < ϕ(a− qb), make move (i).Otherwise,b > ϕ(a− qb). Make move (ii). In this case,

a− qb <1

ϕ· b =⇒ a− (q − 1)b <

(1

ϕ+ 1

)

b = ϕb.

This means that A can make a move(a, b) // (a′, b′) with a′ > b′

such thata′ < ϕb′.The second player B has no choice but only the move

(a′, b′) // (a′ − b′, b′). By Proposition 8.1,b′ > ϕ(a′ − b′).Assumea < ϕb. Then A has no choice except the move

(a, b) // (a− b, b). Here,b > ϕ(a− b).

Winning strategy: Supposea > ϕb. Let q be the largest integer such thata > qb. A chooses between(a′, b′) = (b, a− qb) or (a− (q − 1)b, b) fora′ < ϕb′.Examples:

(a, b) A moves to B moves to(50, 29) (29, 21) (21, 8)

(8, 5) (5, 3)(3, 2) (2, 1)(1, 0)wins

(a, b) A moves to B moves to(50, 31) (31, 19) (19, 12)

(12, 7) (7, 5)(5, 3) (3, 2)(2, 1) (1, 0)

wins

Page 57: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

8.2 Wythoff’s game 309

8.2 Wythoff’s game

Given two piles of chips, a player either removes an arbitrary positiveamount of chips from any one pile, or an equal (positive) amount ofchips from both piles. The player who makes the last move wins.

We describe the position of the game by the amounts of chips inthetwo piles.

If you can make(1, 2), then you will surely win no matter how youropponent moves. Now, to forbid your opponent to get to this position,you should occupy(3, 5).

The sequence of winning positions: starting with(a1, b1) = (1, 2),construct(an, bn) by setting

an := min{c : c 6= ai, bi, i < n},bn :=an + n.

Here are the 18 smallest winning positions for Wythoff’s game:

1 3 4 6 8 9 11 12 14 16 17 19 21 22 24 25 27 292 5 7 10 13 15 18 20 23 26 28 31 34 36 39 41 44 47

1. Every positive integer appears in the two sequences.

Proof. Suppose (for a contradiction) that not every positive inte-ger appears in the two sequences. LetN be the smallest of suchintegers. There is a sufficiently large integerM such that all inte-gers less thanN are amonga1, . . . , aM andb1, . . . , bM . Then bydefinition,aM+1 = N , a contradiction.

2. The sequence(an) is increasing.

Proof. Supposean+1 ≤ an. This means thatan+1 is the smallestinteger not in the list

a1, a2, . . . , an−1, an, b1, b2, . . . , bn−1, bn.

In particular,an+1 6= an. This means thatan+1 < an < an + n =bn. Ignoringan andbn from this list,an+1 is the smallest integernot in

a1, a2, . . . , an−1, b1, b2, . . . , bn−1.

This means, by definition, thatan = an+1, a contradiction.

Page 58: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

310 The games of Euclid and Wythoff

3. The sequence(bn) is increasing.

Proof. bn+1 = an+1 + n + 1 > an + n = bn.

4. Since(an) and(bn) are increasing,an ≥ n andbn ≥ n for everyn.

5. am 6= bn for all integersm andn.

Proof. If m ≤ n, thenam ≤ an < bn.If m > n, thenn ≤ m−1 andam is the smallest integer not among

a1, . . . , am−1, b1, . . . , bn, . . . , bm−1.

In particular,am 6= bn.

6. Each positive integer appears in the list exactly once. Corollary of(1), (2), (3), (5).

7. It is not possible to move from(an, bn) to (am, bm) for m < n.

Proof. A move(an, bn) // (am, bm) must subtract the same num-ber froman andbn. This is impossible sincebn − an = n > m =bm − am.

8. Let a < b. Suppose(a, b) 6= (an, bn) for any n. Then there is amove into(an, bn) for somen.

Proof. Each ofa andb appears exactly once in one of the sequences(an, bn). There are five possibilities for(a, b) (in each case,p < q):(i) (ap, aq), (ii) (bp, bq), (iii) (ap, bq), (iv) (aq, bp), (v) (bp, aq).

In each case, we move(a, b) //(ap, bp) except when in (i)aq < bp.In this case, letn = b− a. Note that

n = b− a < aq − ap < bp − ap = p,

and bn − an = b − a =⇒ b − bn = a − an. The move(a, b) // (an, bn) is done by subtracting equal numbers fromaandb.

Page 59: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

8.3 Beatty’s Theorem 311

8.3 Beatty’s Theorem

Theorem 8.3(Beatty). If α andβ are positive irrational numbers satis-fying 1

α+ 1

β= 1, then the sequences

⌊α⌋, ⌊2α⌋, ⌊3α⌋, . . .

and⌊β⌋, ⌊2β⌋, ⌊3β⌋, . . .

form a partition of the sequence of positive integers.

Proof. (1) If an integerq appears in both sequences, then there are inte-gersh andk such that

q < hα < q + 1,

q < kβ < q + 1.

From these,

h

q + 1<

1

α<

h

q,

k

q + 1<

1

β<

k

q.

Combining these, we have

h + k

q + 1< 1 <

h + k

q,

andq < h + k < q + 1, an impossibility. This shows that an integerqcan appear inat most oneof the sequences.

(2) Now suppose an integerq does not appear in any of these se-quence. Then there are integersh andk such that

(h− 1)α < q < q + 1 < hα,

(k − 1)β < q < q + 1 < kα.

From these,

h

q + 1>

1

α>

h− 1

q,

k

q + 1>

1

β>

k − 1

q.

Page 60: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

312 The games of Euclid and Wythoff

Combining these, we have

h + k

q + 1> 1 >

h + k − 2

q,

andh + k > q + 1 > q > h + k − 2, an impossibility. This shows thatevery integerq appears inat least oneof the sequences.

From (1) and (2) we conclude that every integer appears in exactlyone of the sequences.

We try to find irrational numbersα and β satisfying 1α

+ 1β

= 1

such that the two sequences(⌊nα⌋) and(⌊nβ⌋) are(an) and(bn) for thewinning positions of the Wythoff game. Sincebn − an = n, we require⌊nβ⌋ − ⌊nα⌋ = n. This is the case if we chooseα andβ such thatβ − α = 1. Since 1

α+ 1

β= 1, we have1

α+ 1

α+1= 1 or α2 = α + 1.

Therefore,α = ϕ = 12(√

5 + 1), the golden ratio, andβ = ϕ + 1.Here is a succinct description of the Wythoff sequence.

Theorem 8.4. The winning positions of Wythoff ’s game are the pairs(⌊nϕ⌋, ⌊nϕ⌋+ n).

Exercise

1. Where are the Fibonacci numbers in the Wythoff sequence?

2. Where are the Lucas numbers in the Wythoff sequence?

Page 61: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 9

Extrapolation problems

9.1 What isf(n + 1) if f(k) = 2k for k = 0, 1, 2 . . . , n?

Let f(x) be a polynomial of degreen such that

f(0) = 1, f(1) = 2, f(2) = 4, . . . , f(n) = 2n.

What isf(n + 1)?It is tempting to answer with2n+1, but this assumesf(x) = 2x, not a

polynomial.1

Here is an easier approach to the problem, by considering thesucces-sive differences. Iff(x) is a polynomial of degreen, thenf(x+1)−f(x)is a polynomial of degreen − 1. Suppose the values off(x) are givenat n + 1 consecutive integers 0, 1, . . . ,n. Then we can easily find thevalues off(x + 1) − f(x) at 1, 2 . . . ,n. By repeating the process, weobtain the successive differences.

1, 2, 4, 8, 16, 31, 57, 99

1, 2, 4, 8, 15, 26, 42

1, 2, 4, 7, 11, 16

1, 2, 3, 4, 51, 1, 1, 1

f(n + 1) = 2n+1 − 1.What isf(n + 2)? How does the sequence

1, 4, 11, 26, 57, . . .

1There is also the famous Lagrange interpolation formula to find such a polynomial.

Page 62: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

314 Extrapolation problems

continue? The differences are

3, 7, 15, 31, . . . .

From these we have

f(n + 2) = 1 + (22 − 1) + (23 − 1) + · · ·+ (2n+1 − 1)

= (21 − 1) + (22 − 1) + (23 − 1) + · · ·+ (2n+1 − 1)

= (2 + 22 + · · ·+ 2n+1)− (n + 1)

= 2n+2 − 2− (n + 1)

= 2n+2 − n− 3.

Exercise

1. Prove that

f(−1) =

{0 if n is odd,1 if n is even.

2. Show that the values off(−2) are

2, −2, 3, −3, 4, −4, . . .

for n = 2, 3, 4, 5, 6, 7, . . . .

Page 63: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

9.2 What isf(n + 1) if f(k) = 1k+1 for k = 0, 1, 2 . . . , n? 315

9.2 What isf(n + 1) if f(k) = 1k+1 for k = 0, 1, 2 . . . , n?

Suppose we have a polynomialf(x) of degreen with given values

x 0 1 2 3 4 5 · · · nf(x) 1 1

213

14

15

16· · · 1

n+1

What aref(n + 1) andf(n + 2)?Solution. From the given data, we have(x + 1)f(x) − 1 = 0 for x =0, 1, . . . , n. Therefore,(x + 1)f(x)− 1 is a polynomial of degreen + 1with n + 1 roots0, 1, . . . ,n.

(x + 1)f(x)− 1 = cx(x− 1)(x− 2) · · · (x− n),

for some constantc. With x = −1, we have

−1 = c(−1)(−2)(−3) · · · (−1− n)⇒ c =(−1)n

(n + 1)!.

Hence,

(x + 1)f(x) = 1 +(−1)nx(x− 1) · · · (x− n)

(n + 1)!.

(i) If n is odd, we have

(n + 2)f(n + 1) = 1− (n + 1)!

(n + 1)!= 1− 1 = 0⇒ f(n + 1) = 0,

(n + 3)f(n + 2) = 1− (n + 2)!

(n + 1)!= −(n + 1)⇒ f(n + 2) = −n + 1

n + 3.

(ii) If n is even, we have

(n + 2)f(n + 1) = 1 +(n + 1)!

(n + 1)!= 2⇒ f(n + 1) =

2

n + 2,

(n + 3)f(n + 2) = 1 +(n + 2)!

(n + 1)!= n + 3⇒ f(n + 2) = 1.

Summary

f(n+1) =

{

0, if n is odd,2

n+2, if n is even;

f(n+2) =

{

−n+1n+3

, if n is odd,

1, if n is even.

Page 64: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

316 Extrapolation problems

Exercise

1. Letf(x) be a polynomial of degree≤ n such that fork = 1, 2, . . . , n,f(k) = Fk, thek-th Fibonacci number. Find the value off(n + 1).

Answer. f(n + 1) =

{

Fn, if n is odd,

Ln, if n is even.

2. Find a quadratic polynomialf(x) such thatf(1n) = 12n for everyintegern.

Note:1n is the integer whose decimal expansion consists ofn digitseach equal to1; similarly for 12n.

Answer. f(x) = x(9x + 2).

3. Find a cubic polynomialg(x) such thatg(1n) = 13n for everyn ≥1.

Page 65: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

9.3 Why isex not a rational function? 317

9.3 Why isex not a rational function?

We show why the exponential function, and some other elementary func-tions, are not rational functions by studying the degrees ofrational func-tions. A rational function is one of the formf(x) = P (x)

Q(x), whereP (x)

andQ(x) are polynomials without common divisors (other than scalarsfrom the field of coefficients).

Theorem 9.1.Letf andg be rational functions.(a) If f + g 6= 0, thendeg(f + g) ≤ max(deg f, deg g).(b) deg(fg) = deg f + deg g.(c) If f ′ 6= 0, thendeg f ′ < deg f .

(a) and (b) are well known. We prove (c). This depends on the simplefact that for a polynomialP (x), if the derivativeP ′(x) is not identicallyzero, thendeg P ′ = deg P − 1.

Now letf(x) = P (x)Q(x)

. Thenf ′ = P ′Q−PQ′

Q2 = P ′

Q− PQ′

Q2 .Now,

degP ′

Q= deg P ′ − deg Q = (deg P − 1)− deg Q

= deg P − deg Q− 1 = deg f − 1,

degPQ′

Q2= deg P + (deg Q− 1)− 2 deg Q

= deg P − deg Q− 1 = deg f − 1.

It follows from (a) thatdeg f ′ ≤ deg f − 1. This proves (c).

Corollary 9.2. ex is not a rational function.

Proof. Note thatf(x) = ex satisfies the differential equation′(x) =f(x). Supposef(x) = ex is a rational function. Then

deg f = deg f ′ ≤ deg f − 1,

a contradiction.

Page 66: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

318 Extrapolation problems

Exercise

1. Make use of the fact(tan x)′ = sec2 x to show thattan x is not arational function.

2. Make use of the identitycos2 x = 12(1 + cos 2x) to show thatcos x

is not a rational function.

3. Deduce thatsin x is not a rational function.

4. Show that the logarithm functionlog x is not a rational function.

Page 67: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 10

The Josephus problem and itsgeneralization

10.1 The Josephus problem

There aren people, numbered consecutively, standing in a circle. First,Number 2 sits down, then Number 4, Number 6, etc., continuingaroundthe circle with every other standing person sitting down until just oneperson is left standing. What number is this person?

This is Problem 1031 of MATHEMATICS MAGAZINE, a reformula-tion of the Josephus problem.

Example 10.1.n = 10:

1

2

34

5

6

7

8 9

10

8

1

62

*

3

7

4 9

5

(2) n = 21. After the removal of the 10 even numbered ones and thenthe first, there are the 10 odd numbers 3, 5, . . . , 19, 21. The survivor isthe 5-th of this list, which is 11.

Page 68: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

402 The Josephus problem and its generalization

Theorem 10.1.Let J(n) be the “suvivor” in the Josephus problem forn people.

J(2n) =2J(n)− 1,

J(2n + 1) =2J(n) + 1.

Example 10.2.

J(100) =2J(50)− 1

=2(2J(25)− 1)− 1 = 4J(25)− 3

=4(2J(12) + 1)− 3 = 8J(12) + 1

=8(2J(6)− 1) + 1 = 16J(6)− 7

=16(2J(3)− 1)− 7 = 32J(3)− 23

=32(2J(1) + 1)− 23 = 64J(1) + 9

=73.

There is an almost explicit expression forJ(n): if 2m is the largestpower of 2≤ n, then

J(n) = 2(n− 2m) + 1. (10.1)

Corollary 10.2. The binary expansion ofJ(n) is obtained by transfer-ring the leftmost digit 1 of the binary expansion ofn to the rightmost.

J(100) = J([1100100]2) = [1001001]2 = 64 + 8 + 1 = 73.

Exercise

1. For what values ofn is J(n) = n?

2. For what values ofn is J(n) = n− 1?

Page 69: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

10.2 Chamberlain’s solution 403

10.2 Chamberlain’s solution

Here is M. Chamberlain’s solution to the MAGAZINE problem:

Write n = 2m + k where0 ≤ k ≤ 2m− 1. Then seat the peo-ple numbered 2, 4, . . . ,2k. This leaves2m people standing,beginning with the person numbered2k + 1; call him Stan.Now continue to seat people until you get back to Stan. Itis easy to see that2m−1 people will be left standing, startingwith Stan again. On every subsequent pass of the circle halfof those standing will be left standing with Stan always thefirst among them. Stan’s the man.

This proof clearly yields the expression forJ(n) given in (10.1).

Page 70: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

404 The Josephus problem and its generalization

10.3 The generalized Josephus problemJ(n, k)

The generalized Josephus problemJ(n, k) asks for the “survivor”J(n, k)with n people standing in a circle, successively seating everyk-th one.

Example 10.3.J(10, 3): J(10, 3) = 4.

1

2

34

5

6

7

8 9

10

6

4

1*

8

2

5

7 3

9

For n = 10, here are the sequences of elimination depending on thevalues ofk. The last column gives the survivors.

k J(10, k)1 1 2 3 4 5 6 7 8 9 102 2 4 6 8 10 3 7 1 9 53 3 6 9 2 7 1 8 5 10 44 4 8 2 7 3 10 9 1 6 55 5 10 6 2 9 8 1 4 7 36 6 2 9 7 5 8 1 10 4 37 7 4 2 1 3 6 10 5 8 98 8 6 5 7 10 3 2 9 4 19 9 8 10 2 5 3 4 1 6 710 10 1 3 6 2 9 5 7 4 8

Positions 2 and 6 areno-luckpositions for the Josephus problem of10 people and random choice ofk.

Page 71: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

10.3 The generalized Josephus problemJ(n, k) 405

Exercise

1. Make a list of theno-luckpositions of the Josephus problem forn = 4, 5, . . . , 9.

2. For n = 7, there is only oneno-luckposition 1. This means thatone other position is most likely to survive? Which one is it?

3. Find out the survivor in the Josephus problemJ(24, 11).

2

3

45

6789

10

11

12

13

14

15

1617

18 19 2021

22

23

24

1

1

2

3

4

4. The no-luck positions forJ(24, k), k = 1, . . . , 24 are 5, 12, 13, 16,18, 19, 22. What is the one with the best chance of survival?

Page 72: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

406 The Josephus problem and its generalization

Page 73: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 11

The nim game

11.1 The nim sum

The nim sum of two nonnegative integers is the addition in their base 2notationswithout carries. If we write

0 ⊞ 0 = 0, 0 ⊞ 1 = 1 ⊞ 0 = 1, 1 ⊞ 1 = 0,

then in terms of the base 2 expansions ofa andb,

a ⊞ b = (a1a2 · · ·an) ⊞ (b1b2 · · · bn) = (a1 ⊞ b1)(a2 ⊞ b2) · · · (an ⊞ bn).

The nim sum is associative, commutative, and has 0 as identity ele-ment. In particular,a ⊞ a = 0 for every natural numbera.

Example 11.1.(a)6 ⊞ 5 = [110]2 ⊞ [101]2 = [011]2 = 3.

(b) 34 ⊞ 57 = [100010]2 ⊞ [111001]2 = [011011]2 = 27.

Here are the nim sums of numbers≤ 15:

Page 74: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

408 The nim game

⊞ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 151 1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 142 2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 133 3 2 1 0 7 6 5 4 11 10 9 8 15 14 13 124 4 5 6 7 0 1 2 3 12 13 14 15 8 9 10 115 5 4 7 6 1 0 3 2 13 12 15 14 9 8 11 106 6 7 4 5 2 3 0 1 14 15 12 13 10 11 8 97 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 88 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 79 9 8 11 10 13 12 15 14 1 0 3 2 5 4 7 610 10 11 8 9 14 15 12 13 2 3 0 1 6 7 4 511 11 10 9 8 15 14 13 12 3 2 1 0 7 6 5 412 12 13 14 15 8 9 10 11 4 5 6 7 0 1 2 313 13 12 15 14 9 8 11 10 5 4 7 6 1 0 3 214 14 15 12 13 10 11 8 9 6 7 4 5 2 3 0 115 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

11.2 The nim game

Given three piles of marbles, witha, b, c marbles respectively, playersA andB alternately remove a positive amount of marbles from any pile.The player who makes the last move wins.

Theorem 11.1. In the nim game, the player who can balance the nimsum equation has a winning strategy.

Therefore, provided that the initial position(a, b, c) does not satisfya ⊞ b ⊞ c = 0, the first player has a winning strategy. For example,suppose the initial position is(12, 7, 9). Since12 ⊞ 9 = 5, the firstplayer can remove 2 marbles from the second pile to maintain abalanceof the nim sum equation

12 ⊞ 5 ⊞ 9 = 0,

thereby securing a winning position.

Remarks.(1) This theorem indeed generalizes to an arbitrary number ofpiles.

(2) The Missere Nim game: Suppose now we change the rule: in theNim game, the player who makes the last moveloses. Here is a winningstrategy: Play as for ordinary Nim, until you can move to a position inwhich all piles have just one marble.

Page 75: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

11.2 The nim game 409

Exercise

In each of the following nime games, it is your turn to move. How wouldyou ensure a winning position?

(a) 3, 5, 7 marbles.(b) 9, 10, 12 marbles.(c) 1, 8, 9 marbles.(d) 1, 10, 12 marbles.

Page 76: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

410 The nim game

Page 77: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 12

Prime and perfect numbers

12.1 Infinitude of prime numbers

12.1.1 Euclid’s proof

If there were only finitely many primes:

2, 3, 5, 7, . . . , P,

and no more, consider the number

Q = (2 · 3 · 5 · · ·P ) + 1.

Clearly it is divisible by any of the primes2, 3, . . . ,P , it must be itself aprime, or be divisible by some prime not in the list. This contradicts theassumption that all primes are among2, 3, 5, . . . ,P .

12.1.2 Fermat numbers

The Fermat numbers areFn := 22n

+ 1. Note that

Fn − 2 = 22n − 1 =(

22n−1

+ 1)(

22n−1 − 1)

= Fn−1(Fn−1 − 2).

By induction,

Fn = Fn−1Fn−2 · · ·F1 · F0 + 2, n ≥ 1.

From this, we see thatFn does not contain any factor ofF0, F1, . . . ,Fn−1. Hence, the Fermat numbers are pairwise relatively prime. Fromthis, it follows that there are infinitely primes.1

1It is well known that Fermat’s conjecture of the primality ofFn is wrong. WhileF0 = 3, F1 = 5,F2 = 17, F3 = 257, andF4 = 65537 are primes, Euler found thatF5 = 232 + 1 = 4294967297 =641 × 6700417.

Page 78: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

412 Prime and perfect numbers

12.2 The sieve of Eratosthenes

If N is not a prime number, it must have a factor≤√

N .Given an integerN , to determine all the prime numbers≤ N , we

proceed as follows. Start with the sequence

2, 3, 4, 5, 6, . . . , N,

with each entry unmarked, and the setP = ∅.(1) Note thesmallestentrya of the sequence that isnot marked.(2) If a ≤

√N , mark each entry of the sequence which is a multiple

of a, but not equal toa, and replaceP by P ∪ {a}.(3) If a >

√N , stop. The setP now consists of the totality of prime

numbers≤ N .

12.2.1 A visualization of the sieve of Eratosthenes

Let a andb be positive integers. The line

b(a + 1)x + y − (a + 1) = 0

joins the points(

1a, 0)

and(0, b + 1) intersects the linex = −1 at thepoint (−1, (a + 1)(b + 1)). Note that they-coordinate is a compositenumber. Conversely, ify is a composite number, then it is of the form(a+1)(b+1) for some positive integersa andb, and is they-coordinateof the intersection of the linex = −1 with the line joining

(1a, 0)

and(0, b + 1). 2 Here is a visualization forN = 35.

2R. Juricevic,Notices of AMS, September, 2008, p.921.

Page 79: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

12.2 The sieve of Eratosthenes 413

11111

2

3

5

7

11

13

17

19

23

29

31

Page 80: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

414 Prime and perfect numbers

12.3 The prime numbers below 20000

100

200

300

400

500

600

700

800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

10 20 30 40 50 60 70 80 90 100b b b b b b b b b b b

b b b b b b b b b bb b b b b b b b

b b b b b b b bb b b b b b b

b b b b b b bb b b b b b b bb b b b b b b b

b b b b b b bb b b b b b

b b b b b b b b bb b b b b b

b b b b b b b b bb b b b b

b b b b b b bb b b

b b b b b b b b bb b b b b b b

b b b b bb b b b b b b

b b b b b bb b b b b bb b b b b b b b

b b b b b b b bb b b b b

b b b bb b b b b b b b

b b b b b b b bb b b b b b

b b b b bb b b b b b

b b b b bb b b b b b

b b b b b bb b b b b b

b b b b b b bb b b b b b

b b b b b b bb b b b b b

b b bb b b b b b b

b b b b bb b b b b b b b b

b b b b bb b b b b b

b b b b bb b b b bb b b b b

b b b b b bb b b b b b bb b b b

b b b b bb b b b b b bb b b b

b b b b b bb b b b b b

b b b b b bb b b b bb b b b b b b b b

b bb b b b b

b b b b b bb b b b b b

b b b b b b b b bb b b b bb b b b b b

b b b b bb b b b b b b

b b b b bb b b b b

b b b bb b b b b

b b b b bb b b b b b

b b b b b bb b b b b b b b b

b b b b bb b b b b bb b b b b b

b b b b bb b b b b b b

b b bb b b b b b b b

b b b b b bb b

b b b b b b bb b b b b b b b

b b b b bb b b b b

b b b bb b b b b

b b b b b b bb b b b b b b

b b b b bb b b b b b b

b bb b b b b b b b

b b b b bb b b b

b b b b bb b b b b

b b b b b bb b b

b b b b b b bb b b b b

b b b b bb b b

b b b b b bb b b b

b b b b b bb b b

b b b b b b bb b b b

b b b b b bb b b

b b bb b b b b b b

b b b bb b b b b

b b b b b bb b b b b

b b b b b b bb b b b b b

b b b bb b b b b b b b b

b b b b b bb b b b b b b

b b b bb b b b b b b

b b b bb b b b b b

b b bb b b b b

b b b b bb b b b b b

b b b b bb b b b b b b

b b b b b bb b b b

b b b b bb b b b b

b b b b bb b b bb b b b

b b b b bb b b b b b

b b b b b bb b b b b bb b b b

b b bb b b b b b

b b b b b b bb b b b b b

b b b b b bb b b b b b

b b bb b b b b

b b b b b bb b b b b

b b b bb b b b b b b

b b bb b b b b

b b b b b bb b b b b b b

b b b bb b b b b b

b bb b

b b b b bb b b b b b b

b b bb b b

b b b b b b bb b b b b b

b b b b bb b b b

b b b b b bb b

b b b b b b bb b b b b b b

b b b b bb b b b b b b

b b b b b bb b b b b b b

b b b b bb b b

b b b b b b bb

b b bb b b b b b b

b b b bb b b b b

b b b b bb b b b b b b b b

b b b b bb b b bb b b b b

b b b b b bb b b b b b b

b b b b b b b b b b b b bb b b b b b b b b b b

b b b b b b b bb b b b b b b b

b b b b b b b b b bb b b b b b b

b b b b b b b bb b b b b b

b b b b b b b bb b b b b b b b

b b b b b b bb b b b b b

b b b b b bb b b b b b

b b b b b b b b b bb b b b b b b b b

b b b b b bb b b b b

b b b b b b bb b b b b b

b b b b b b b bb b b b

b b b b b b bb b b b b b bb b b b b

b b b b b b bb b b b b b b

b b b b b bb b b b b bb b b b b b

b b b b b bb b b b b

b b b b bb b b b b b b b bb b b b b

b b b b b b bb b b b b b b

b b b b bb b b b b

b b b b b b b bb b b b b b b b

b b b bb b b b b b b

b b b bb b b b b

b b b b b b bb b b b b b bb b b b b b b

b bb b b b b b b bb b b b b b b b

b b b b b bb b b

b b b b b bb b b b b b b

b b b b b b bb b b b b b

b b b b bb b b b b b b

b b b b bb b b b b b b

b b b b bb b b b b b b

b b b b b bb b b

b b b b bb b b b b

b b b b bb b b b b b b

b b b b b b b bb b b b b

b b b b bb b b b b bb b b

b b b b bb b b b b b

b b b b b b bb b b b

b b b bb b b b b

b b b bb b b b b b b

b b b b b bb b b

b b b b b bb b b b b

b b b b bb b b b b b

b b b b b b b bb b b b b

b b b b b bb b b b bb b b b

b b b b b bb b b b b b b b

b b b b bb b b b bb b b b b b

b b b b b b b bb b b bb b b b b b

b b b b b bb b b b b b b

b b b b bb b b b b

b b bb b b b b b b b b

b b b b bb b b b b b

b b b bb b b b b b b

b b b bb b b b b b

b b b bb b b b b b b b

b b b b b bb

b b b b bb b b b b b b

b b b b b b bb b b bb b b b

b b b b b bb b b b b

b b b bb b b b b b

b b b b bb b b b b b

b bb b b b b b b b

b b b b bb b b b b b b b b

b b b bb b b b b

b b b b bb b b

b b b b bb b b b b b

b b b b bb b b b b b

b b b b bb b bb b b

b b b b bb b b b b b b

b b b b b bb b b b

b b b b b b b bb b b b b b b b

b b b b bb b b

b b b b bb b b b b b

b b b b b bb b b b b

b b b b bb b b b b b b b

b b b b b bb b b b

b b b b b bb b b b b

b b b b b bb b b

b b bb b b b b

b b bb b b b b b bb b b b b

b b b b b b bb b b b b b b

b b b bb b b b b b

b b b b b bb b b b b

b b b b b b bb b b b b

b b b bb b b bb b b b b b

b b b b b b bb b b

b b b b b bb b b b

b b b b bb b b b

b b b b bb b b

b b b bb b b b

b b b b bb b b b

b b bb b b b b b

b b b bb b b b b b b

b b b b b bb b b

b b b b bb b b bb b b b b

Page 81: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

12.4 Perfect numbers 415

12.4 Perfect numbers

A number is perfect is the sum of its proper divisors (including 1) isequal to the number itself.

Theorem 12.1(Euclid). If 1 + 2 + 22 + · · ·+ 2k−1 = 2k − 1 is a primenumber, then2k−1(2k − 1) is a perfect number.

Note:2k−1 is usually called thek-th Mersenne number and denotedby Mk. If Mk is prime, thenk must be prime.

Theorem 12.2(Euler). Every even perfect number is of the form givenby Euclid.

Open problem

Does there exist anoddperfect number?

Theorem-joke 12.1(Hendrik Lenstra). Perfect squares do not exist.3

Proof. Supposen is a perfect square. Look at the odd divisors ofn.They all divide the largest of them, which is itself a square,sayd2. Thisshows that the odd divisors ofn come in pairsa, b wherea ·b = d2. Onlyd is paired to itself. Therefore the number of odd divisors ofn is alsoodd. In particular, it is not2n. Hencen is not perfect, a contradiction:perfect squares don’t exist.

3Math. Intelligencer, 13 (1991) 40.

Page 82: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

416 Prime and perfect numbers

12.5 Mersenne primes

Primes of the formMp = 2p − 1 are called Mersenne prime. The onlyknown Mersenne primes are listed below.

k Year Discoverer k Year Discoverer

2 Ancient 3 Ancient5 Ancient 7 Ancient13 Ancient 17 1588 P. A. Cataldi19 1588 P. A. Cataldi 31 1750 L. Euler61 1883 I. M. Pervushin 89 1911 R. E. Powers107 1913 E. Fauquembergue 127 1876 E. Lucas521 1952 R. M. Robinson 607 1952 R. M. Robinson1279 1952 R. M. Robinson 2203 1952 R. M. Robinson2281 1952 R. M. Robinson 3217 1957 H. Riesel4253 1961 A. Hurwitz 4423 1961 A. Hurwitz9689 1963 D. B. Gillies 9941 1963 D. B. Gillies11213 1963 D. B. Gillies 19937 1971 B. Tuckerman21701 1978 C. Noll, L. Nickel 23209 1979 C. Noll44497 1979 H. Nelson, D. Slowinski 86243 1982 D. Slowinski110503 1988 W. N. Colquitt, L. Welsch 132049 1983 D. Slowinski216091 1985 D. Slowinski 756839 1992 D. Slowinski, P. Gage859433 1993 D.Slowinski 1257787 1996 Slowinski and Gage1398269 1996 Armengaud, Woltman et al. 2976221 1997 Spence, Woltman, et.al.3021377 1998 Clarkson et. al 6972593 1999 Hajratwala et. al13466917 2001 Cameron, Woltman, 20996011 2003 Michael Shafer24036583 2004 Findlay 25964951 2005 Nowak30402457 2005 Cooper, Boone et al 32582657 2006 Cooper, Boone et al37156667 9/8/2008 Elvenich 42643801 2009 Strindmo43112609 8/8/2008 Smith

According to the Prime Pages4, the most recently (in 2008 and 2009)discovered Mersenne primesMp for p = 42643801 and43112609 have12837064 and12978189 digits respectively, and are the largest knownprimes to date (May 2012).

4http://primes.utm.edu.

Page 83: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

12.6 Charles Twigg on the first 10 perfect numbers 417

12.6 Charles Twigg on the first 10 perfect numbers

Let Pn be then-th perfect number.

n k Mk Pn = 2k−1Mk

1 2 3 62 3 7 283 5 31 4964 7 127 81285 13 8191 335503366 17 131071 85898690567 19 524287 1374386913288 31 2147483647 23058430081399521289 61 2305843009213693951 26584559915698317446

5469261595384217610 89 61897001964269013744 19156194260823610729

9562111 4793378084303638130997321548169216

• P1 is the difference of the digits ofP2. In P2, the units digit is thecube of the of tens digit.

• P3 andP4 are the first two perfect numbers prefaced by squares.The first two digits ofP3 are consecutive squares. The first and lastdigits ofP4 are like cubes. The sums of the digits ofP3 andP4 arethe same, namely, the prime 19.

• P4 terminates bothP11 andP14. 5

• Three repdigits are imbedded inP5.

• P7 contains each of the ten decimal digits except 0 and 5.

• P9 is the smallest perfect number to contain each of the nine nonzerodigits at least once. It is zerofree.

• P10 is the smallest perfect number to contain each of the ten decimaldigits at least once.

5These contain respectively 65 and 366 digits.

Page 84: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

418 Prime and perfect numbers

Exercise

1. Let p1, p2, . . . ,pk be the firstk primes, andqk := p1p2 · · · pk + 1.

(a) Knowingqk andpk+1, how can one findqk+1?

(b) Complete the following table fork = 7, 8, 9, 10, and verify thatqk is divisible the primerk given below by computing the quotientqk

rk:

k pk qk rkqk

rk

1 2 32 3 73 5 314 7 2115 11 23116 13 30031 59 5097 17 198 19 3479 23 31710 29 33111 31 200560490131

2. Let pn denote then-th prime number.

• Find the smallest value ofn for which p1p2 · · · pn − 1 is not aprime number.

• Find the smallest value ofn > 3 for which n! + 1 is a primenumber.

• Find the smallest value ofn > 7 for which n! − 1 is a primenumber.

3. Find all positive integersm andn such that 1m

+ 1n

= p

q, where

p < q are consecutive prime numbers.

Answer. (m, n, p, q) = (3, 3, 2, 3), (2, 6, 2, 3), (2, 10, 3, 5).

Solution. Note thatm = n =⇒ p = 2, q = m, andq = m = 3.(m, n, p, q) = (3, 3, 2, 3).

We may assumem < n. Rewrite the equation asm+nmn

= p

q, or

mnm+n

= q

p. Sincep < q are consecutive prime numbers,q

p< 2.

This meansmn < 2(m + n); (m− 2)(n− 2) < 4.

Page 85: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

12.6 Charles Twigg on the first 10 perfect numbers 419

Here are the only possibilities:(a) m − 2 = 0: m = 2. In this case1

n= p

q− 1

2= 2p−q

2q; n = 2q

2p−q.

Since2q and2p− q are relatively prime, we must have2p− q = 1,q = 2p−1. The only possibilities forp and2p−1 to be consecutiveprimes are(p, q) = (2, 3) or (3, 5). Correspondingly,n = 2p.

(b) (m−2, n−2) = (1, 2): (m, n) = (3, 4). In this case1m

+ 1n

= 712

is not a ratio of two consecutive primes.

(c) (m− 2, n− 2) = (1, 3): (m, n) = (3, 5). Again 1m

+ 1n

= 815

isnot a ratio of two consecutive primes.

4. Let (an) be a sequence of numbers defined recursively by

an+1 = a2n − an + 1, a1 = 2.

Show that for distinct indicesi and j, gcd(ai, aj) = 1. Hence,deduce that there are infinitely many prime numbers.

Solution. an+1 − 1 = an(an − 1). If j > i, thenaj − 1 = (ai −1)ai · · ·aj−1; aj − aj−1 · · · (ai − 1)ai = 1. This shows thatai andaj are relatively prime. Note thatan is always positive. It is equalto 1 if and only ifan−1 = 1. Sincea1 = 2, an > 1 for everyn. Theprime divisors ofai andaj are all distinct. This shows that thereare infinitely many prime numbers.

5. Prove that a power of a prime number cannot be a perfect number.

6. For a positive integern, show that ifσ(n) is prime, then so isd(n).

Solution. Sinceσ is a multiplicative function, ifσ(n) is prime,then n must be a prime power. Writen = pk, so thatσ(n) =σ(pk) = 1 + p + · · ·pk, andτ(n) = 1 + k. If 1 + k = ab, then1 + p + · · ·+ pk is divisible by1 + pa and is not a prime.

7. A minimum security prison contains 100 cells with one prisonerin each. The athletic young warden was ordered to free a certainnumber of these prisoners at his discretion, and this is how he didit.

First he walked along the row of cells opening every door. Startingat the beginning again, he shuts every second door. During histhird walk, starting at the beginning, he stopped at every third door:if it was open he shut it, if it was shut he opened it. On his fourthwalk he did the same, opening closed doors and closing open doors,

Page 86: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

420 Prime and perfect numbers

except he did it for every fourth door. On his fifth walk he stoppedat every fifth door, closing it if it was open and opening it if it wasshut. And so on, until at last he had completed the full hundredwalks.

The prisoners in cells whose doors were still open were freed.

Which were the lucky cells?

8. Two numbersm and n are called amicable ifσ(m) = σ(n) =m + n.

(a) Verify that 220 and 284 are amicable.

(b) Define two sequences(pn) and(qn) by

pn =3 · 2n − 1,

qn =9 · 22n−1 − 1, n = 1, 2, . . . .

Show that ifpn−1, pn, andqn are prime numbers, then

a = 2npn−1pn, b = 2nqn

are amicable.

(c) Make use of (b) to find three pairs of amicable numbers.

Page 87: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

12.7 Primes in arithmetic progression 421

12.7 Primes in arithmetic progression

B. Green and T. Tao (2004) have proved that there are arbitrarily longarithmetic progressions of prime numbers. Fork = 0, 1, 2, . . . , 21, thenumbers

376859931192959 + 18549279769020k

are all primes.

12.8 The prime number spirals

The first 1000 prime numbers arranged in a spiral.= prime of the form4n + 1;= prime of the form4n + 3.

bbbb

b

bb

b

b

b

bb

b

b

b

b

b

b

b

bb

b

b

bb

b

b b

b

bb

b

b b

b

bbb

b

b b

b

b

b

b b

b

bbb

b

b b b

b

bbbb

b

b

b

bbbb

b

b

b b

b

b

bb

b

b b b

b

bbbb

b

b

b b

b

b

b

b

bb

b

b b b b

b

b

b

bbb

b

b

b

b

b

bbb

b

b

b b

b

b

bb

b

b

b

b

b b

b

b

b

b

bbb

b

b

b

b

b

b

b

bbb

b

b

b b b

b

b

b

bbb

b

b

b

b

bb

b

b

bbbbb

b

b

b

b b b b b

b

b

b

bb

b

b

b b

b

b

b

b

bbbb

b

b

b

b

bbb

b

b

b b

b

b

b

bb

b

bb

b

b

b

b b

b

b

b

b bb

b

b

b

b

b

bb

b

b b

b

b

b

b

b bb

bbb

b

b

b

b

b

b

bb

b

b

b b

b

b

b

b

b

b

b b

b

b

b

b

b

b b b

b

b

bb

b

b

b

b

b

b

b

b

b

b

b

b

b bb

b

bb

b

b

b

b

b

b

bbb

b

b

b

b

b

b

bbb

b

b

b

b

b b b bb

b

b

b

bbbb

b

b

b

b b

b

bbb

b

b

b b b b

b

b

b

bb

b

b

b b b bb

b

b

bbbb

b

b

b b b

b

b

b

bb

b

b

b

b

b b b

b

b

b

bb

b

b

b

b

b b b

b

bbbbbb

b

b

b

b

2

Page 88: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

422 Prime and perfect numbers

12.8.1 The prime number spiral beginning with 17

b

b

b b

b

b

b

b b

b

bb

b

bb

b b

b

b

b b b

bb

b

b

b

b

b

b

b

b

b

b

bbb

b

b

b b

b

b

b

b

b

bbb

b

b

b b

b

b

bb

b

b

b

b

b

b

bb

b

b

b b b

b

b

b

b

b

b b

b

bbbb

b

b

b

b b

b

b

b

b

b

b

b

b b b b

b

bbbb

b

b b b

b

bbb

b

b

b

b

b

bbbb

b

b

b b b b

b

b

b

bbb

b

b

b

b

b

b

b

bbb

b

b

b b b

b

b

b

bbb

b

b

b

b

b b

b

b

bbbbb

b

b

b

b b b b b

b

b

bb

b

b

b

b b b

b

b

b

bbbb

b

b

b

b

b

b

b

bb

b

b

bb

b

b bb

b

b

b

b

b

bb

b

b b

b

bb

b

b

b

b

b

b bb

b

b

b

b b

b

b

bbbb

b

bb

b

bb

b

b

b bb

b

b

bb

b b b b

b

b

b

b

b

bb

b

b

bbb

b

b b b

b

b

bbb

b

b

b b b

b

bbb

b

b b

b

bbbbb

b

b

b

b

bbbbbb

b

b

b

b b b b

b

b

b

b

bbb

b

b

b bb

b

bb

b

b

b

b b bb

b

b

b

bb

b

b

b b b b b

b

b

bbbb

b

b b b

b

b

b

b

bb

b

b

b

b b b b

b

b

b

bb

b

b

b

b

b b

b

b

b

bbbbbbb

b

17

The numbers on the 45 degree line aren2 + n + 17.Let f(n) = n2 + n + 17. The numbersf(0), f(1), . . .f(15) are all

prime.

n f(n) n f(n) n f(n) n f(n)0 17 1 19 2 23 3 294 37 5 47 6 59 7 738 89 9 107 10 127 11 14912 173 13 199 14 227 15 257

Page 89: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

12.8 The prime number spirals 423

12.8.2 The prime number spiral beginning with 41

b

b

b

b

b

bb

b

b

b

b

b

bb

b

b

bb

b

b

b

b

bb

b b

b

bb

b

b b b

b

bb

b

b

b

bb

b

b b

b

bbbb

b b b

b

b

bb

b

b b b

b

bbb

b

b b b b

bbb

b

b b

b

b

b

bbb

b

b

b b b b

b

bb

b

b

b

b

b b

b

b

b

bb

b

b b b

b

b

bb

b

b

b b

b

bbbbb

b

b

b b b b

b

b

b

bbb

b b b b

b

b

bbb

b

b

b

b b

b

b

b

bbbbb

b

b b b

b

b

b

b

bbbb

b

b

b

b

b b b b

b

b

b

b

b

b b b b b

b

b

b

bbbb

b

bb

b

b

b

b

b

bb

bb

bb

b

b

b

bb

bb

b

b b

b

b

b

bb

bb

b

b

b

b

bb

b

b b b

b

b

b

bb

b bb

b

bb

b

b

b b b

b

b

b

b

b

b b

b

bb

b

b

b bb

b

b

bb

b

b

b b b

b

b

bbb

b

b

b b

b

bbb

b

b b

b

b

b

bbbb

b

b

b

b

b

bbbbb

b

b

b

b b b b

b

b

b

b

bbb

b

b

bb

b

b

bb

b

b

b

b b b b

b

b

b

b

b

b

b

b

b b b

b

b

b

bbb

b

b b b bb

b

b

bb

b

b

b

b

b b b

b

b

b

bbb

b

b

b

b

b

b

b

b

b

b

bbbbb

41

The numbers on the 45 degree line aref(n) = n2 + n + 41.f(n) = n2 + n + 41 is prime for0 ≤ n ≤ 39.

n f(n) n f(n) n f(n) n f(n) n f(n)0 41 1 43 2 47 3 53 4 615 71 6 83 7 97 8 113 9 13110 151 11 173 12 197 13 223 14 25115 281 16 313 17 347 18 383 19 42120 461 21 503 22 547 23 593 24 64125 691 26 743 27 797 28 853 29 91130 971 31 1033 32 1097 33 1163 34 123135 1301 36 1373 37 1447 38 1523 39 1601

Page 90: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

424 Prime and perfect numbers

Prime number spiral beginning with 41: A closer look

bb

b

b

b

bb

b

b

b

bb

bb

b

b

bb

b

b

b

b

bb

b b

b

bb

b

b b b

b

bb

b

b

b

bb

b

b b

b

bbbb

b b b

b

b

bb

b

b b b

b

bbb

b

b b b b

bbb

b

b b

b

b

b

bbb

b

b

b b b b

b

bb

b

b

b

bb b

b

b

b

bb

b

b b b

b

b

bb

b

b

b b

b

bbbbb

b

b

b b b b

b

b

b

bbb

b b b b

b

b

bbb

b

b

b

b b

b

b

b

bbbbb

b

b b b

b

b

b

b

bbbb

b

b

b

b

b b b b

b

b

b

b

b

b b b b b

b

b

b

bbbb

b

b

b

b

b b b b

b

b

b

bbbb

b

b

b b b b

b

b

bbb

b

b

b

b

b

b b

b

b

b

bbb

b

b

b

b

bb b

b

b

b

b

bbbbb

b

b

b

b b b b

b

b

b

bbbbb

b

b

b

b b

b

b

b

b

bbbb

b

b

b

b b b b b b

b

b

b

bbbbb

b

b

b

b

b b b b

b

b

bbbbb

b

b

b

b b b b

b

b

b

bbbbb

b

b

b

b

bb b b

b

b

bbbb

b

b

b

b

b

b b b

b

b

b

b

b

bbbb

b

b

b

b

b

b b b

b

b

b

b

b

b

bbbb

b

b

b

b

b

b

b b

b

b

b

bbbbbb

b

b

b

b b b b b b

b

b

b

b

b

bbbbb

b

b

b

b

b b b b b b

b

b

b

b

bbbbbb

b

b

b

b

b

b b b

b

b

b

b

b

bbb

b

b

b

b

b b b b b

b

b

b

b

bbbbb

b

b

b

b

b

b b b b b b b b

b

b

b

b

b

bbbb

b

b

b

b

b

b

b b b b b b

b

b

b

bbbbbbb

b

b

b

b b b b b b b

b

b

b

b

b

bbb

b

b

b

b

b

b b b b b b b b

b

b

b

b

b

b

bbbb

b

b

b

b

bb b b b b

b

b

b

b

bbbbbbb

b

b

b

b

b

b

b b b b b b

b

b

b

b

b

bbb

b

b

b

b

b

b

b

b b b b b b

b

b

b

bbbbb

b

b

b

b

b b b b b

b

b

b

b

b

b

b

b

bbbb

b

b

b

b

b

b

b b b b

b

bbb

b

bb

b

bb

b

bb

bb

b

b

b

bb

bbb

b b

b

b

b

bb

bbb

b

b

bbb

b

b b b

b

b

b

bb

b bb

b

bbb

b

b b b

b

bb

b

b

b b

b

bbb

b

b bb

b

b

bb

b

b

b b b

b

bbbb

b

b

b b

b

bbb

b

b b

b

b

b

bbbb

b

b

b

b

b

bbbbbb

b

b

b b b b

b

b

b

b

bbb

b

b

bb

b

b

bb

b

b

b

b b b b

b

bb

b

b

b

b

b

b b b

b

b

b

bbb

b

b b b bb

b

b

bbb

b

b

b

b b b

b

b

b

bbbb

b

b

b

b

b

b

b

b

b

bbbbb

b

b

b b bb

b

b

bbb

b

b

b

b b bb

b

b

bbb

b

b

b

b b b

b

b

b

b

b

b

bbbbb

b b b b b

b

b

b

b

b

bbbbb

b

b

b

b b b

b

b

b

bbbb

b

b

b

b

b

b

b b b b

b

b

b

bbbbbb

b

b b b b b

b

b

b

bbb

b

b

b

b b b b b

b

b

b

b

bbbbb

b

b

b

b

b b b b b

b

bbbbb

b

b

b

b

b

b b b b b

b

b

b

b

b

bbbb

b

b

b b b b

b

b

b

b

b

bbbbbbb

b

b

b

b b b b b b

b

b

bbbbb

b

b

b

b

b

b

b b b b

b

b

b

b

bbbb

b

b

b

b

b

b b b b b

b

b

b

b

b

bbbb

b

b

b b b b b

b

b

b

b

bbbb

b

b

b

b

b

b b b b b b

b

b

b

b

b

b

bbbbb

b

b

b

b

b b b b b b

b

b

b

bb

b

b

b

b

b

b b b b b b b

b

b

b

b

bbbbb

b

b

b b b b b bb

b

b

bbbb

b

b

b

b

b

b

b b b b b b

b

b

bbbbbb

b

b

b

b

b b b b b

b

b

b

b

b

b

bbbbbbbb

b

b

b

b

b b b b b bb

b

b

b

b

bbbbb

b

b

b

b

b

b b b b b b

b

b

b

b

b

b

bbbbbbb

b

b

b

b b b b b b b

b

b

b

b

b

b

b

b

bbb

b

b

b

b

b

b

bb b b b b

b

b

b

b

b

b

b

bbbb

b

b

b

b

b

b b b b b bb

41

Page 91: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 13

Cheney’s card trick

You are the magician’s assistant. What he will do is to ask a spectator togive you any 5 cards from a deck of 52. You show him 4 of the cards,and in no time, he will tell everybody what the 5th card is. This of coursedepends on you, and you have to do things properly by making use ofthe following three basic principles.

13.1 Three basic principles

13.1.1 The pigeonhole principle

Among 5 cards at least 2 must be of the same suit. So you and themagician agree that the secret card has the same suit as the first card.

13.1.2 Arithmetic modulo13

The distance of two points on a 13-hour clock is no more than 6.

We decide which of the two cards to be shown as the first, and whichto be kept secret. For calculations, we treatA, J, Q, andK are respec-tively 1, 11, 12, and 13 respectively.

Now you can determine the distance between these two cards. Fromone of these, goingclockwise, you get to the other by traveling this dis-tance on the 13-hour clock. Keep the latter as the secret card.

Page 92: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

502 Cheney’s card trick

hours distance clockwise2 and7 5 2 to 7

3 and10 6 10 to 32 andJ 4 J to 2A and8 6 8 to A

The following diagram shows that the distance between♣3 and♥10

is 6, not 7.

♣3

♣2

♦A

♠K♣Q

♥J

♥10

♦9

♣8

♦7 ♣6

♥5

♦4

6

13.1.3 Permutations of three objects

There are 6 arrangements of three objects The remaining three cardscan be ordered assmall, medium, and large. 1 Now rearrange themproperly to tell the magician what number he should add (clockwise) tothe first card to get the number on the secret card. Let’s agreeon this:

arrangement distancesml 1slm 2msl 3mls 4lsm 5lms 6

If you, the assistant, want to tell the magician that he should add 4 tothe number (clockwise) on the first card, deal themedium as the secondcard, thelarge as the third, and thesmall as the fourth card.

1First by numerical order; for cards with the same number, order by suits:♣ < ♦ < ♥ < ♠.

Page 93: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

13.2 Examples 503

13.2 Examples

Example 13.1.Suppose you have♠5, ♣7, ♦J, ♣4, and♠Q, and youdecide to use the♣ cards for the first and the secret ones. The distancebetween♣7 and ♣4 is of course 3, clockwise from♣4 to ♣7. Youtherefore show♣4 as the first card, and arrange the other three cards,♠5, ♦J, and♠Q, in the ordermedium, small, large. The second cardis ♦J, the third ♠5, and the fourth♠Q. The secret card is♣7.

4

♣ J

♦ 5

♠ Q

♠ ??

Example 13.2.Now to the magician. Suppose your assistant show youthese four cards in order:

Q

♠ J

♦ 7

♣ 4

♣ ??

Then you know that the secret card is a♠, and you get the number byadding toQ the number determined by the orderlarge, medium, small,which is 6. Going clockwise, this is 5. The secret card is♠5.

Exercise

1. For the assistant:

(a) ♠5, ♠7, ♦6, ♣5, ♣Q.

(b) ♥2, ♠J, ♥K, ♣2, ♠8.

Page 94: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

504 Cheney’s card trick

2. For the magician: what is the secret card?

5

♠ 7

♠ 6

♦ 5

♣ ??

2

♥ J

♠ 2

♣ 8

♠ ??

Page 95: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 14

Variations of Cheney’s cardtrick

14.1 Cheney card trick with spectator choosing secretcard

Now the spectators say they choose the secret card. What should you,the assistant, do?

1. Arrange the four open cards in ascending order, and put then-thcard in the first position, withn = 1, 2, 3, 4, according as the secretcard is for♣, ♦, ♥, or♠. For example, if you are given♠2, ♥6,♦K, ♠10, and ♣4 as secret card, then since

♠2 < ♥6 < ♠10 < ♦K,

you put ♠2 in the first position.

2. Note the rank of the secret card. If it is the same as the first card,put the secret card in the third position, and arrange the remainingthree in any order.

3. If the ranks of secret card and the first card are different, deter-mine the13−point clock difference, and arrange the remainingthree open cards to indicate this difference.

(a) If the rank of the secret card is higher than that of the firstcard, put the secret card in the second position, followed bythe remaining three open cards in the positions indicating thedifference.

Page 96: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

506 Variations of Cheney’s card trick

(b) If the rank of the secret card is lower than that of the firstcard,put the three open cards in the positions indicating the differ-ence, followed by the secret card.

2

♠ ?? 6

♥ K

♦ 10

Now, for the magician,

1. Determine the order of the first card among the four open cards.The secret card is♣,♦,♥,♠ according as this is the least, second,third, or largest.

2. If the secret card appears in the third position, its rank is the sameas the rank of the first card.

3. If the secret card separates the first card from the remainingthree,add the number determined by the remaining three cards to thefirstcard to get the rank of the secret card.

4. If the secret card appears at the end, subtract the number deter-mined by the remaining three cards from the first card to get therank of the secret card.

Exercise

1. For the assistant:

(a) ♠5, ♠7, ♦6 (secret card),♣5, ♣Q.

(b) ♥2, ♠J, ♥K, ♣2, ♠8 (secret card).

2. For the magician: what is the secret card?

Page 97: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

14.2 A3-card trick 507

5

♠ ?? 6

♦ 5

♣ 7

2

♥ J

♠ 2

♣ 8

♠ ??

14.2 A3-card trick

Here is a card trick with only three cards. The spectators choose3 cardsand specify one of them to be a secret card. You, the assistant, is toarrange the three cards (with the secret card face down) in such a waythat your master, the magician, by selling how you display them, can tellwhat the secret card is.

You are going to put the three cards in left, middle, rightpositions,and in succession: first, second, or third. When the secret card is notrevealed, it is treated as the largest compared with other cards.

1. The secret card isnot aking: Determine the13−point clock differ-ence betweenking and the rank of the secret card. Arrange them inleft-middle-right position to indicate this difference fromking, andshow in succession according to the following table.

Order in succession First Second Third♣ lower thanking secret small medium♣ higher thanking secret medium small♦ lower thanking small secret medium♦ higher thanking medium secret small♥ lower thanking small medium secret♥ higher thanking medium small secret♠ lower thanking secret, small medium♠ higher thanking secret, medium small

2. The secret card is aking:

Page 98: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

508 Variations of Cheney’s card trick

Order in succession First Second Third♣ king secret, ***, ***♦ king ***, secret, ***♥ king ***, ***, secret♠ king small, medium secret

Here is an example. Suppose the spectators give you, the assistant,the cards ♦4, ♠A (secret card), and♥7. Then the13-point clockdifference (fromking) is 1. From left to right you should arrange♦4,♥7, secret. To indicate that this is higher thanking, you show the secretcard with ♥7 first, then♦4.

Order in succession Left Middle RightFirst ♥7 secretSecond ♦4

Third

For the magician,

1. If all three cards are shown simultaneously, the secret cardis aking.It is ♣, ♦, or♥ according as the secret card is in theleft, middle,or right position.

2. If the open cards are shown simultaneously (before the secret card),the secret card is♠K.

3. If the secret card is shown simultaneously and one open card,thesecret hard is♠. It is above or belowking according as the secretcard is shown simultaneously with themedium or smaller opencard.

4. No two cards are shown simultaneously. Thepositionsof the cardsgives the13−point clock difference fromking. The secret card is♣, ♦, or♥ according as thesecret card is shownfirst, second, orthird. It is above or belowking according as themedium is shownbefore or after thesmaller of the open cards.

Exercise

(1) For the assistant:

1. ♥A, ♦3 (secret card), and♠10.

Page 99: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

14.2 A3-card trick 509

2. ♣4, ♣5, ♣6 (secret card).

(2) For the magician:

1.

Left Middle RightFirst secretSecond ♦8

Third ♠A

2.

Left Middle RightFirst ♥7

Second ♦4

Third secret

Page 100: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

510 Variations of Cheney’s card trick

Page 101: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 15

The Catalan numbers

15.1 Number of nonassociative products

Given a nonassociative binary operation, there are two waysof multiply-ing three elementsa, b, c in different orders:(ab)c anda(bc). With fourelements, there are5 ways:

((ab)c)d, (a(bc))d, (ab)(cd), a((bc)d), a(b(cd)).

Let Cn be the numbers of ways of multiplyingn + 1 elementsa0, a1,. . .an−1, an. Clearly,C0 = 1, C1 = 1, C2 = 2, andC3 = 5.

More generally, suppose in forming a product ofn + 2 elementsa0,. . . , an+1, the last operation combines a product ofa0, . . . , ak with aproduct ofak+1, . . .an+1. There areCkC(n+1)−(k+1) = CkCn−k suchproducts. Therefore,

Cn+1 = C0Cn + C1Cn−1 + · · ·+ CnC0.

These numbers are called the Catalan numbers. Here are some of thebeginning values:

n 0 1 2 3 4 5 · · ·Cn 1 1 2 5 14 42 · · ·

Theorem 15.1.Cn = 1n+1

(2n

n

).

Page 102: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

512 The Catalan numbers

Proof. Let f(x) be the generating function of the Catalan numbers:

f(x) = C0 + C1x + C2x2 + · · ·+ Cnxn + · · · .

Note that the numberC0Cn + C1Cn−1 + · · · + CnC0 is the coefficientof xn in the expansion

(C0 + C1x + C2x2 + · · ·+ Cnx

n + · · · )(C0 + C1x + C2x2 + · · ·+ Cnxn + · · · )

= f(x)2.

From the recurrence relations we have

f(x) =∞∑

n=0

Cnxn

= C0 +∞∑

n=0

Cn+1xn+1

= 1 + x

∞∑

n=0

(C0Cn + C1Cn−1 + · · ·+ CnC0)xn

= 1 + xf(x)2.

Therefore,xf(x)2 − f(x) + 1 = 0, and

f(x) =1±√

1− 4x

2x.

Sincef(x) is a power series ofx, we must choose the minus sign so thatthe constant terms in the numerator cancel one another. By Newton’sbinomial theorem,

Page 103: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

15.1 Number of nonassociative products 513

√1− 4x = 1 +

∞∑

n=0

(12

n + 1

)

(−4x)n+1

= 1 +

∞∑

n=0

(−1)n+1 · 22(n+1) ·12

(−1

2

) (−3

2

)· · ·(−2n−1

2

)

(n + 1)!xn+1

= 1 +∞∑

n=0

(−1)n+1 · 22(n+1) · (−1)n · 1 · 3 · · · (2n− 1)

2n+1(n + 1)!xn+1

= 1−∞∑

n=0

2n+1 · 1 · 3 · · · (2n− 1)

(n + 1)!xn+1

= 1−∞∑

n=0

2

n + 1· 2n · 1 · 3 · · · (2n− 1)

n!xn+1

= 1−∞∑

n=0

2

n + 1· 1 · 3 · · · (2n− 1) · 2nn!

(n!)(n!)xn+1

= 1−∞∑

n=0

2

n + 1· (2n)!

(n!)(n!)xn+1

= 1− 2x ·∞∑

n=0

1

n + 1

(2n

n

)

xn.

Hence,

f(x) =1−√

1− 4x

2x=

∞∑

n=0

1

n + 1

(2n

n

)

xn.

From this, we have

Cn =1

n + 1

(2n

n

)

.

The number of sequences ofn +1’s and−1’s with all partial sumsnonnegative is the Catalan number

Cn =1

n + 1

(2n

n

)

.

Page 104: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

514 The Catalan numbers

Exercise

1. Solve the recurrence relation

an+1 =

n∑

k=0

(n

k

)

akan−k, a0 = 1.

Answer. an = n!.

Solution. Consider the beginning values:

a1 =

(0

0

)

a0a0 = 1,

a2 =

(1

0

)

a0a1 +

(1

1

)

a1a0 = 2,

a3 =

(2

0

)

a0a2 +

(2

1

)

a1a1 +

(2

2

)

a2a0 = 2 + 2 + 2 = 6,

a4 =

(3

0

)

a0a3 +

(3

1

)

a1a2 +

(3

2

)

a2a1 +

(3

3

)

a3a0

= 6 + 3 · 2 + 3 · 2 + 6 = 24,

...

It is reasonable to conjecture thatak = k!.

Assuming this for allk ≤ n.

an+1 =

n∑

k=0

(n

k

)

akan−k

=

n∑

k=0

n!

k!(n− k)!· k! · (n− k)!

=n∑

k=0

n!

= (n + 1)n!

= (n + 1)!.

Therefore,an = n! for every integern ≥ 0.

Page 105: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

15.1 Number of nonassociative products 515

Exercise

1. Prove thatCn = 2(2n−1)n+1

Cn−1.

2. Calculate the Catalan numbersC6, . . . ,C10.

n 0 1 2 3 4 5 6 7 8 9 10 · · ·Cn 1 1 2 5 14 42 132 429 1430 4862 16796 · · ·

Page 106: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 16

The golden ratio

16.1 Division of a segment in the golden ratio

Given a segmentAB, a pointP in the segment is said to divide it inthe golden ratio ifAP 2 = PB · AB. Equivalently,AP

PB=

√5+12

. Weshall denote this golden ratio byϕ. It is the positive root of the quadraticequationx2 = x + 1.

A BP BA

M

P

Q

Construction 16.1(Division of a segment in the golden ratio). Given asegmentAB,(1) draw a right triangleABM with BM perpendicular toAB and halfin length,(2) mark a pointQ on the hypotenuseAM such thatMQ = MB,(3) mark a pointP on the segmentAB such thatAP = AQ.

ThenP dividesAB into the golden ratio.

Page 107: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

602 The golden ratio

SupposePB has unit length. The lengthϕ of AP satisfies

ϕ2 = ϕ + 1.

This equation can be rearranged as(

ϕ− 1

2

)2

=5

4.

Sinceϕ > 1, we have

ϕ =1

2

(√5 + 1

)

.

Note that

AP

AB=

ϕ

ϕ + 1=

1

ϕ=

2√5 + 1

=

√5− 1

2.

This explains the construction above.

Page 108: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

16.2 The regular pentagon 603

16.2 The regular pentagon

Consider a regular pentagonACBDE. It is clear that the five diagonalsall have equal lengths. Note that(1) ∠ACB = 108◦,(2) triangleCAB is isosceles, and(3) ∠CAB = ∠CBA = (180◦ − 108◦)÷ 2 = 36◦.

In fact, each diagonal makes a36◦ angle with one side, and a72◦

angle with another.

A

E D

BP

C

It follows that(4) trianglePBC is isosceles with∠PBC = ∠PCB = 36◦,(5) ∠BPC = 180◦ − 2× 36◦ = 108◦, and(6) trianglesCAB andPBC are similar.

Note that triangleACP is also isosceles since(7) ∠ACP = ∠APC = 72◦. This means thatAP = AC.

Now, from the similarity ofCAB andPBC, we haveAB : AC =BC : PB. In other wordsAB · AP = AP · PB, or AP 2 = AB · PB.This means thatP dividesAB in the golden ratio.

Page 109: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

604 The golden ratio

16.3 Construction of36◦, 54◦, and 72◦ angles

Angles of sizes36◦, 54◦, and72◦ can be easily constructed from a seg-ment divided in the golden ratio.

36◦

ϕ

1

AB

C

P

36◦ 36◦

cos 36◦ = ϕ2 .

36◦

AB

C

D

P

54◦

54◦

ϕ

1

AB

C

P

72◦

72◦

cos 72◦ = 12ϕ

.

Page 110: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

16.3 Construction of36◦, 54◦, and 72◦ angles 605

Exercise

1. Three equal segmentsA1B1, A2B2, A3B3 are positioned in such away that the endpointsB2, B3 are the midpoints ofA1B1, A2B2

respectively, while the endpointsA1, A2, A3 are on a line perpen-dicular toA1B1. Show thatA2 dividesA1A3 in the golden ratio.

A1

B2

B1

A2

B3

A3

2. Given an equilateral triangleABC, erect a squareBCDE exter-nally on the sideBC. Construct the circle, centerC, passing throughE, to intersect the lineAB at F . Show thatB dividesAF in thegolden ratio.

FA B

C

D

E

3. Given a segmentAB, erect a square on it, and an adjacent one withbaseBC. If D is the vertex aboveA, construct the bisector of angleADC to intersectAB atP . Calculate the ratioAP : PB.

A B C

D

P

Page 111: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

606 The golden ratio

4. Let D andE be the midpoints of the sidesAB andAC of an equi-lateral triangleABC. If the lineDE intersects the circumcircle ofABC atF , calculate the ratioDE : EF .

A

B

D

C

EF

O

5. Given a segmentAB with midpoint M , let C be an intersectionof the circlesA(M) andB(A), andD the intersection ofC(A)andA(C) insideB(A). Prove that the lineCD dividesAB in thegolden ratio.

A B

C

D

PM

6. The three small circles are congruent. Show that each of the ratiosOAAB

, TXXY

, ZTTO

. is equal to the golden ratio.

O A

B

Z

T

X Y

Page 112: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

16.3 Construction of36◦, 54◦, and 72◦ angles 607

7. Which of the two equilateral triangles inscribed in a regular pen-tagon has larger area?

8. Which of the two squares inscribed in a regular pentagon has largerarea?

Page 113: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

608 The golden ratio

16.4 The most non-isosceles triangle

Given a triangle with sidesa, b, c, there are six ratios obtained by com-paring the lengths of a pair of sides:

a

b,

b

a,

b

c,

c

b,

a

c,

c

a.

The one which is closest to1 is called the ratio of nonisoscelity of thetriangle.

The following theorem shows that there is no most non-isosceles tri-angle.

Theorem 16.1.A numberη is the ratio of nonisoscelity of a triangle ifand only ifϕ− 1 < η ≤ 1.

Proof. First note that ifab

= r < 1, then1r

= ba

> 1. Since12(r+ 1

r) > 1,

it follows thatr is closer to1 than 1r.

If a ≤ b ≤ c are the lengths of the three sides of a triangle, the ratioof nonisoscelity is

η = max

(a

b,

b

c

)

.

Sincea + b > c, we have

η + 1 ≥ a

b+ 1 =

a + b

b>

c

b≥ 1

η.

Therefore,η2 + η > 1. Since the roots ofx2 + x− 1 areϕ− 1 > 0 and−ϕ < 0, we must haveη > ϕ− 1. Therefore,η ∈ (ϕ− 1, 1].

Conversely, for each numbert ∈ (ϕ− 1, 1], we havet2 + t > 1 andt+1 > 1

t. The numberst ≤ 1 ≤ 1

tform the sides of a triangle with ratio

of nonisoscelity equal tot.

Page 114: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 17

Medians and angle Bisectors

17.1 Apollonius’ Theorem

Theorem 17.1.Given triangleABC, let D be the midpoint ofBC. Thelength of the medianAD is given by

AB2 + AC2 = 2(AD2 + BD2).A

B CD

Proof. Applying the law of cosines to trianglesABD andACD, andnoting thatcos ADB = − cos ADC, we have

AB2 = AD2 + BD2 − 2AD · BD · cos ADB;

AC2 = AD2 + CD2 − 2AD · CD · cos ADC,

= AD2 + BD2 + 2AD · BD · cos ADB.

The result follows by adding the first and the third lines.

If ma denotes the length of the median on the sideBC,

m2a =

1

4(2b2 + 2c2 − a2).

Page 115: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

610 Medians and angle Bisectors

Example 17.1.Suppose the mediansBE andCF of triangleABC areperpendicular. This means thatBG2 + CG2 = BC2, whereG is thecentroid of the triangle. In terms of the lengths, we have4

9m2

b + 49m2

c =a2; 4(m2

b + m2c) = 9a2; (2c2 + 2a2 − b2) + (2a2 + 2b2 − c2) = 9a2;

b2 + c2 = 5a2.This relation is enough to describe, given pointsB andC, the locus

of A for which the mediansBE andCF of triangleABC are perpen-dicular. Here, however, is a very easy construction: Fromb2 + c2 = 5a2,we havem2

a = 14(2b2 + 2c2 − a2) = 9

4a2; ma = 3

2a. The locus ofA is

the circle with center at the midpoint ofBC, and radius32·BC.

Exercise

1. The triangle with sides7, 8, 9 has one median equal to a side.Which median and which side are these?

2. The lengths of the sides of a triangle are 136, 170, and 174. Calcu-late the lengths of its medians.

3. TriangleABC has sidelengthsa = 17, b = 13, c = 7. Show thatthe medians are in the proportions of the sides.

17

137

A

B C

Page 116: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

17.2 Angle bisector theorem 611

17.2 Angle bisector theorem

Theorem 17.2(Angle bisector theorem). The bisectors of an angle ofa triangle divide its opposite side in the ratio of the remaining sides. IfAX and AX ′ respectively the internal and external bisectors of angleBAC, thenBX : XC = c : b andBX ′ : X ′C = c : −b.

cb

Z′

Z

A

B CX X′

Proof. Construct lines throughC parallel to the bisectorsAX andAX ′

to intersect the lineAB atZ andZ ′.(1) Note that∠AZC = ∠BAX = ∠XAC = ∠ACZ. This means

AZ = AC. Clearly,BX : XC = BA : AZ = BA : AC = c : b.(2) Similarly, AZ ′ = AC, andBX ′ : X ′C = BA : AZ ′ = BA :

−AC = c : −b.

Page 117: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

612 Medians and angle Bisectors

17.3 The angle bisectors

The length of theinternalbisector of angleA is

ta =2bc

b + ccos

A

2,

ta

t′a

PQ

A

B C

and that of theexternalbisector of angleA is

t′a =2bc

|b− c| sinA

2.

Example 17.2.The triangle(a, b, c) = (125, 154, 169) is a Heron tri-angle with rational angle bisectors. Its area is9240. The lengths of thebisectors are , , and .

Exercise

1. The triangle with sides6, 7, 8 has one angle bisector equal to a side.Which angle bisector and which side are these?1

2. The triangle with sides17, 24, 27 has one angle bisector equal to aside. Which angle bisector and which side are these?2

3. The triangle with sides84, 125, 169 has three rational angle bisec-tors. Calculate the lengths of these bisectors.3

4. Prove that the bisector of the right angle of a Pythagorean trianglecannot have rational length.

5. Give an example of a Pythagorean triangle with a rational bisector.

6. Prove that the bisectors of the acute angles of a Pythagoreantrian-gle cannot be both rational.

1tb = a = 6.2ta = b = 24.3ta = 975

7, tb = 26208

253, tc = 12600

209.

Page 118: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

17.4 Steiner-Lehmus Theorem 613

17.4 Steiner-Lehmus Theorem

Theorem 17.3.A triangle is isosceles if it has two equal angle bisectors.

A

B C

EF Y

Z

Proof. Suppose the bisectorsBE = CF , but triangleABC not isosce-les. We may assume∠B < ∠C. Construct parallels toBC throughEandF to intersectAB andAC atZ andY respectively.

(1) In the isosceles trianglesZBE andY CF with equal basesBEandCF , ∠ZBE < ∠Y CF =⇒ EZ < Y F .

(2) AYY C

= AFFB

= ACBC

< ABBC

= AEEC

. Therefore,ACY C

= AYY C

+ 1 < AEEC

+ 1 = ACEC

, andY C > EC. This clearly impliesY F < EZ, contradicting (1) above.

Example 17.3.The analogue of the Steiner-Lehmus theorem does nothold for external angle bisectors. It is very easy to construct one suchtriangle with the extra conditiont′b = t′c = a.

a

t′b

t′c

B

C

A

Y

Z

Page 119: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

614 Medians and angle Bisectors

(1) Fromt′b = a, we have12(π − β) = 2γ; β + 4γ = π.

(2) Fromt′c = a, we have12(π−γ) = π−2(π−β) = 2β−π; 4β+γ = 3π.

From these,β = 11π15

, γ = π15

, andα = π5.

Exercise

1. The bisectorta and the external bisectort′b of triangleABC satisfyta = t′b = c. Calculate the angles of the triangle.4

ta

t′b

cA B

C

X

Y

2. AD andBE are angle bisectors of triangleABC, with D on BCandE onAC. Suppose thatAD = AB andBE = BC. Determinethe angles of the triangle. Show that ifCF is the external bisectorof angleC, thenCF = CA. 5

A

CB D

E

4Answer:α = 2π15

, β = 7π15

, γ = 2π5

.5Answer:α = 2π

13, β = 6π

13, γ = 5π

13.

Page 120: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 18

Dissections

18.1 Dissection of the6× 6 square

Since1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 62, it is reasonable to look fora dissection of a6 × 6 square into eight pieces with areas1, 2, . . . , 8square units.

1. 5 cuts: Construct a line throughA which completes the dissection.

A

2. 4 straight cuts: Construct a line throughB which completes thedissection.

B

Page 121: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

616 Dissections

3. 5 straight cuts: Construct two lines throughC to complete the dis-section.

C

Page 122: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

18.2 Dissection of a7× 7 square into rectangles 617

18.2 Dissection of a7× 7 square into rectangles

Dissect a square into seven rectangles of different shapes but all havingthe same area.1

R1

R2R3

R4

R6

R5

R7

Suppose each side of the square has length7, and fori = 1, 2 . . . , 7,the rectangleRi has (horizontal) lengthai and (vertical) heightbi. Set-ting a1 = r, we compute easily in succession,b1, b2, a2, a3, b3, b4, a4,a5, b5, usingaibi = 7. Now,

a6 =7− a2 − a3,

b6 =7− b1 − b5,

a7 =7− a2 − a3 − a5,

b7 =7− b1 − b4 − b6.

rectangle ai bi

R1 r 7r

R2r

r−17(r−1)

r

R3 7− r 77−r

R47−r6−r

7(6−r)7−r

R55(7r−7−r2)(6−r)(r−1)

7(6−r)(r−1)35(7r−7−r2

R6r(r−2)

r−17(r−1)(29r−35−4r2)

5r(7r−7−r2)

R7(7−r)(6−r)(28−27r+4r2)

5−r

7(6−r)5(7−r)(7r−7−r2)

1Problem 2567,Journal of Recreational Math., . A dissection into seven rectangles was given by Hessand Ibstedt. Markus Gotz showed that no solution withn rectangles exists for2 ≤ n ≤ 6.

Page 123: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

618 Dissections

The relationsa6b6 = 7 anda7b7 = 7 both reduce to

(2r − 7)(2r2 − 14r + 15) = 0.

Sincer = 72

or 7−√

192

would makea7, b7 negative, we must haver =7+

√19

2. The dimensions of the rectangles are as follows.

rectangle ai bi

R17+

√19

277−

√19

15

R27(8+

√19)

158−

√19

3

R37(7+

√19)

157−

√19

2

R48+

√19

37(8−

√19)

15

R553

215

R65(1+

√19)

67(−1+

√19)

15

R75(−1+

√19)

67(1+

√19)

15

Page 124: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

18.3 Dissect a rectangle to form a square 619

18.3 Dissect a rectangle to form a square

Dissect a given rectangle by two straight cuts into three pieces that canbe reassembled into a square.

If this is possible, the lengths of the cuts must be as follows, and it isenough to verify thatx =

√ab− b.

b

√ab a−

√ab

a−√

ab√

ab

x

This is clear since

x = (a−√

ab) · b√ab

=√

a(√

a−√

b) ·√

b√a

=√

ab− b.

b

√ab

a−√

ab

Page 125: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

620 Dissections

18.4 Dissection of a square into three similar parts

Dissect a square into three similar parts, no two congruent.

x

1 x2

x2 − x + 1

x2 + 1

D C

BA

Solution. x2 + 1 = x(x2 − x + 1); x3 − 2x2 + x− 1 = 0.

Exercise

1. Show that the area of the largest rectangle isx4.

Solution. This area is

(x2 + 1)(x2 − x + 1)

= x4 − x3 + x2 + x2 − x + 1

= x4 − x3 + 2x2 − x + 1

= x4.

Page 126: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

18.4 Dissection of a square into three similar parts 621

Exercise

1. Show how the square should be dissected so that it can be reassem-bled into a rectangle.

x

x

A B

CD

PQ

X

Y

2. Let P and Q be points on the sidesAB and BC of rectangleABCD.

A B

CD

P

Q

T1 T2

T3

(a) Show that if the areas of trianglesAPD, BPQ andCDQ areequal, thenP andQ divide the sides in the golden ratio.

(b) If, in addition,DP = PQ, show that the rectangle is golden,i.e., AB

BC= ϕ, and∠DPQ is a right angle.

Page 127: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 19

Pythagorean triangles

19.1 Primitive Pythagorean triples

A Pythagorean triangle is one whose sidelengths are integers. An easyway to construct Pythagorean triangles is to take two distinct positiveintegersm > n and form

(a, b, c) = (2mn, m2 − n2, m2 + n2).

Then,a2 + b2 = c2. We call such a triple(a, b, c) a Pythagorean triple.The Pythagorean triangle has perimeterp = 2m(m + n) and areaA =mn(m2 − n2).

B

CA

m2 − n2

2mn

m2 +

n2

A Pythagorean triple(a, b, c) is primitive if a, b, c do not have acommon divisor (greater than1). Every primitive Pythagorean tripleis constructed by choosingm, n to be relatively prime and of oppositeparity.

Page 128: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

702 Pythagorean triangles

19.1.1 Rational angles

The (acute) angles of a primitive Pythagorean triangle are called rationalangles, since their trigonometric ratios are all rational.

sin cos tan

A 2mnm2+n2

m2−n2

m2+n22mn

m2−n2

B m2−n2

m2+n22mn

m2+n2m2−n2

2mn

More basic than these is the fact thattan A2

andtan B2

are rational:

tanA

2=

n

m, tan

B

2=

m− n

m + n.

This is easily seen from the following diagram showning the incircleof the right triangle, which hasr = (m− n)n.

B

CA

I

m(m − n) (m − n)n

(m + n)n

(m − n)nm(m

n)

(m+

n)n

r

r

19.1.2 Some basic properties of primitive Pythagorean triples

1. Exactly one leg is even.

2. Exactly one leg is divisible by 3.

3. Exactly one side is divisible by 5.

4. The area is divisible by 6.

Page 129: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

19.1 Primitive Pythagorean triples 703

Appendix: Primitive Pythagorean triples < 1000

m, n a, b, c m, n a, b, c m, n a, b, c m, n a, b, c

2, 1 3, 4, 5 3, 2 5, 12, 13 4, 1 15, 8, 17 4, 3 7, 24, 255, 2 21, 20, 29 5, 4 9, 40, 41 6, 1 35, 12, 37 6, 5 11, 60, 617, 2 45, 28, 53 7, 4 33, 56, 65 7, 6 13, 84, 85 8, 1 63, 16, 658, 3 55, 48, 73 8, 5 39, 80, 89 8, 7 15, 112, 113 9, 2 77, 36, 859, 4 65, 72, 97 9, 8 17, 144, 145 10, 1 99, 20, 101 10, 3 91, 60, 10910, 7 51, 140, 149 10, 9 19, 180, 181 11, 2 117, 44, 125 11, 4 105, 88, 13711, 6 85, 132, 157 11, 8 57, 176, 185 11, 10 21, 220, 221 12, 1 143, 24, 14512, 5 119, 120, 169 12, 7 95, 168, 193 12, 11 23, 264, 265 13, 2 165, 52, 17313, 4 153, 104, 185 13, 6 133, 156, 205 13, 8 105, 208, 233 13, 10 69, 260, 26913, 12 25, 312, 313 14, 1 195, 28, 197 14, 3 187, 84, 205 14, 5 171, 140, 22114, 9 115, 252, 277 14, 11 75, 308, 317 14, 13 27, 364, 365 15, 2 221, 60, 22915, 4 209, 120, 241 15, 8 161, 240, 289 15, 14 29, 420, 421 16, 1 255, 32, 25716, 3 247, 96, 265 16, 5 231, 160, 281 16, 7 207, 224, 305 16, 9 175, 288, 33716, 11 135, 352, 377 16, 13 87, 416, 425 16, 15 31, 480, 481 17, 2 285, 68, 29317, 4 273, 136, 305 17, 6 253, 204, 325 17, 8 225, 272, 353 17, 10 189, 340, 38917, 12 145, 408, 433 17, 14 93, 476, 485 17, 16 33, 544, 545 18, 1 323, 36, 32518, 5 299, 180, 349 18, 7 275, 252, 373 18, 11 203, 396, 445 18, 13 155, 468, 49318, 17 35, 612, 613 19, 2 357, 76, 365 19, 4 345, 152, 377 19, 6 325, 228, 39719, 8 297, 304, 425 19, 10 261, 380, 461 19, 12 217, 456, 505 19, 14 165, 532, 55719, 16 105, 608, 617 19, 18 37, 684, 685 20, 1 399, 40, 401 20, 3 391, 120, 40920, 7 351, 280, 449 20, 9 319, 360, 481 20, 11 279, 440, 521 20, 13 231, 520, 56920, 17 111, 680, 689 20, 19 39, 760, 761 21, 2 437, 84, 445 21, 4 425, 168, 45721, 8 377, 336, 505 21, 10 341, 420, 541 21, 16 185, 672, 697 21, 20 41, 840, 84122, 1 483, 44, 485 22, 3 475, 132, 493 22, 5 459, 220, 509 22, 7 435, 308, 53322, 9 403, 396, 565 22, 13 315, 572, 653 22, 15 259, 660, 709 22, 17 195, 748, 77322, 19 123, 836, 845 22, 21 43, 924, 925 23, 2 525, 92, 533 23, 4 513, 184, 54523, 6 493, 276, 565 23, 8 465, 368, 593 23, 10 429, 460, 629 23, 12 385, 552, 67323, 14 333, 644, 725 23, 16 273, 736, 785 23, 18 205, 828, 853 23, 20 129, 920, 92924, 1 575, 48, 577 24, 5 551, 240, 601 24, 7 527, 336, 625 24, 11 455, 528, 69724, 13 407, 624, 745 24, 17 287, 816, 865 24, 19 215, 912, 937 25, 2 621, 100, 62925, 4 609, 200, 641 25, 6 589, 300, 661 25, 8 561, 400, 689 25, 12 481, 600, 76925, 14 429, 700, 821 25, 16 369, 800, 881 25, 18 301, 900, 949 26, 1 675, 52, 67726, 3 667, 156, 685 26, 5 651, 260, 701 26, 7 627, 364, 725 26, 9 595, 468, 75726, 11 555, 572, 797 26, 15 451, 780, 901 26, 17 387, 884, 965 27, 2 725, 108, 73327, 4 713, 216, 745 27, 8 665, 432, 793 27, 10 629, 540, 829 27, 14 533, 756, 92527, 16 473, 864, 985 28, 1 783, 56, 785 28, 3 775, 168, 793 28, 5 759, 280, 80928, 9 703, 504, 865 28, 11 663, 616, 905 28, 13 615, 728, 953 29, 2 837, 116, 84529, 4 825, 232, 857 29, 6 805, 348, 877 29, 8 777, 464, 905 29, 10 741, 580, 94129, 12 697, 696, 985 30, 1 899, 60, 901 30, 7 851, 420, 949 31, 2 957, 124, 96531, 4 945, 248, 977 31, 6 925, 372, 997

Page 130: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

704 Pythagorean triangles

19.2 A Pythagorean triangle with an inscribed square

How many matches of equal lengths are required to make up the follow-ing configuration?

Suppose the shape of the right triangle is given by aprimitive Pythagoreantriple (a, b, c). The length of a side of the square must be a common mul-tiple of a andb. The least possible value is the productab. There is onesuch configuration consisting of(i) two Pythagorean triangles obtained by magnifying(a, b, c) a and btimes,(ii) a square of sideab.

The total number of matches is

(a + b)(a + b + c) + 2ab = (a + b + c)c + 4ab.

The smallest one is realized by taking(a, b, c) = (3, 4, 5). It requires108 matches.

How many matches are required in the next smallest configuration?

Page 131: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

19.3 When arex2 − px± q both factorable? 705

19.3 When arex2 − px± q both factorable?

For integersp andq, the quadratic polynomialsx2−px+q andx2−px−qboth factorable (over integers) if and only ifp2−4q andp2 +4q are bothsquares. Thus,p and q are respectively the hypotenuse and area of aPythagorean triangle.

p2 + 4q = (a + b)2, p2 − 4q = (b− c)2.

b a

b

a

q

p

b − a

b − aq

p

a b c = p q x2− px + q x2 + px − q

3 4 5 6 (x − 2)(x − 3) (x − 1)(x + 6)

5 12 13 30 (x − 3)(x − 10) (x − 2)(x + 15)

8 15 17 60 (x − 5)(x − 12) (x − 3)(x + 20)

The roots ofx2−px+q ares−a ands−b, while those ofx2+px−q ares− c and−s. Here,s is the semiperimeter of the Pythagorean triangle.

19.4 Dissection of a square into Pythagorean triangles

Here is the smallest square which can be dissected into threePythagoreantriangles and one with integer sides and integer area.

360

360

255 105

224

136289

375424

Page 132: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

706 Pythagorean triangles

Exercise

1. A man has a square field,60 feet by60 feet, with other propertyadjoining the highway. He put up a straight fence in the line of 3trees, atA, P , Q. If the distance betweenP andQ is 91 feet, andthat fromP to C is an exact number of feet, what is this distance?

60

60

91?

A B

CD

P

Q

2. Give an example of a primitive Pythagorean triangle in whichthehypotenuse is a square.

3. Give an example of a primitive Pythagorean triangle in whichtheevenleg is a square.

4. Find the smallest Pythagorean triangle whose perimeter is asquare(number).

5. Find the shortest perimeter common to two different primitive Pythagoreantriangles.

6. Show that there are an infinite number of Pythagorean triangleswhose hypotenuse is an integer of the form3333 · · ·3.

7. For each natural numbern, how many Pythagorean triangles arethere such that the area isn times the perimeter? How many ofthese are primitive?

8. Find the least number of toothpicks (of equal size) needed toform

Page 133: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 20

Integer triangles with a 60◦ or120◦ angle

20.1 Integer triangles with a60◦ angle

If triangleABC hasC = 60◦, then

c2 = a2 − ab + b2. (20.1)

Integer triangles with a60◦ angle therefore correspond to rational pointsin the first quadrant on the curve

x2 − xy + y2 = 1. (20.2)

Note that the curve contains the pointP = (−1,−1). By passing a lineof rational slopet throughP to intersect the curve again, we obtain aparametrization of the rational points. Now, such a line hasequationy = −1 + t(x + 1). Solving this simultaneously with (20.2) we obtain(x, y) = (−1,−1) = P , and

(x, y) =

(2t− 1

t2 − t + 1,

t(2− t)

t2 − t + 1

)

,

which is in the first quadrant if12

< t ≤ 2. By symmetry, we maysimply take1

2< t ≤ 1 to avoid repetition.

Puttingt = q

pfor relatively prime integersp, q, and clearing denomi-

Page 134: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

708 Integer triangles with a60◦ or 120◦ angle

P

t

nators, we obtain

a =p(2q − p),

b =q(2p− q),

c =p2 − pq + q2,

with p

2< q ≤ p. Dividing by gcd(a, b) = gcd(p + q, 3), we obtain the

primitive integer triangles with a60◦ angle:

p q (a, b, c)

1 1 (1, 1, 1)

3 2 (3, 8, 7)

4 3 (8, 15, 13)

5 3 (5, 21, 19)

5 4 (5, 8, 7)

6 5 (24, 35, 31)

7 4 (7, 40, 37)

7 5 (7, 15, 13)

7 6 (35, 48, 43)

8 5 (16, 55, 49)

8 7 (16, 21, 19)

9 5 (9, 65, 61)

9 7 (45, 77, 67)

9 8 (63, 80, 73)

10 7 (40, 91, 79)

10 9 (80, 99, 91)

Page 135: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

20.1 Integer triangles with a60◦ angle 709

Exercise

1. A standard calculus exercise asks to cut equal squares of dimensionx from the four corners of a rectangle of lengtha and breadthb sothat the box obtained by folding along the creases has a greatestcapacity.

a

b

x

The answer to this problem is given by

x =a + b−

√a2 − ab + b2

6.

How should one choose relatively prime integersa andb so thatthe resultingx is an integer?1 For example, whena = 5, b = 8,x = 1. Another example isa = 16, b = 21 with x = 3.

2. Prove that there is no integer triangle with a60◦ angle whose adja-cent sides are consecutive integers.

Proof. The60◦ angle being strictly between the other two angles,its opposite side has length strictly between two consecutive inte-gers. It cannot be an integer.

3. Find all integer triangles with a60◦ angle and two sides consecutiveintegers.

1Answer:a, b, c, with gcd(p + q, 6) = 3.

Page 136: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

710 Integer triangles with a60◦ or 120◦ angle

20.2 Integer triangles with a120◦ angle

If triangleABC hasC = 120◦, then

c2 = a2 + ab + b2. (20.3)

Integer triangles with a120◦ angle therefore correspond to rational pointsin the first quadrant on the curve

x2 + xy + y2 = 1. (20.4)

Q

t

Note that the curve contains the pointQ = (−1, 0). By passing aline of rational slopet throughP to intersect the curve again, we obtaina parametrization of the rational points. Now, such a line has equationy = t(x+1). Solving this simultaneously with (20.2) we obtain(x, y) =(−1, 0) = Q, and

Q(t) =

(1− t2

t2 + t + 1,

t(2 + t)

t2 + t + 1

)

,

which is in the first quadrant if0 < t < 1. It is easy to check thatQ(t)andQ

(1−t1+2t

)are symmetric about the liney = x. To avoid repetition

we may restrict to0 < t <√

3−12

.

Puttingt = q

pfor relatively prime integersp, q satisfyingq <

√3−12

p,

Page 137: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

20.2 Integer triangles with a120◦ angle 711

and clearing denominators, we obtain

a =p2 − q2,

b =q(2p + q),

c =p2 + pq + q2,

with 0 < q < p. Dividing by gcd(a, b) = gcd(p − q, 3), we obtain theprimitive integer triangles with a120◦:

p q (a, b, c)

3 1 (8, 7, 13)

4 1 (5, 3, 7)

5 1 (24, 11, 31)

6 1 (35, 13, 43)

7 1 (16, 5, 19)

7 2 (45, 32, 67)

8 1 (63, 17, 73)

9 1 (80, 19, 91)

9 2 (77, 40, 103)

10 1 (33, 7, 37)

10 3 (91, 69, 139)

Page 138: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

712 Integer triangles with a60◦ or 120◦ angle

Exercise

1. An integer triangle has a120◦ angle. Show that the two longer sidescannot differ by1.

Solution. If the sides area, b, b + 1, then(b + 1)2 = a2 + ab + b2.From this,b = a2−1

2−a. For no positive integera is b positive. There

is no such triangle.

2. Give an example of an integer triangle with120◦ whose adjacentsides are consecutive integers.

3. In triangleABC, α = 120◦. AX is the bisector of angleA. Showthat 1

t= 1

b+ 1

c.

bc

t

A

B CX

4. In the diagram below,ABX, BCY , andCDZ are equilateral tri-angles. Suppose∠XY Z = 120◦. Show that1

b= 1

a+ 1

c. 2

a b cA B C D

X

Y

Z

2Hint: ExtendZY to intersectAB atT . Show thatTC = a.

Page 139: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 21

Triangles with centroid onincircle

X

Y

D

A

B C

G

G′

I

Suppose the centroidG of triangleABC lies on the incircle. ThemedianAD intersects the incircle at another pointG′. If AG′ = k ·AD,then by the intersecting chords theorem, we have(i) AY 2 = AG′ · AG, and(ii) DX2 = DG ·DG′.Clearly,AG = 2

3ma, DG = 1

3ma.

If AG′ = k ·ma, thenDG′ = (1− k)ma.SinceAY = 1

2(b+c−a) andDX = a

2−XB = a

2−1

2(c+a−b) = 1

2(b−c),

these lead to

1

4(b + c− a)2 =

2

3ma · k ·ma,

1

4(b− c)2 =

1

3ma · (1− k)ma.

Page 140: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

714 Triangles with centroid on incircle

Eliminatingk, we have

2 · 4m2a = 3((b + c− a)2 + 2(b− c)2).

From Apollonius’ theorem,4m2a = 2b2 + 2c2 − a2. Simplifying, we

obtain5(a2 + b2 + c2)− 6(bc + ca + ab) = 0.

Theorem 21.1.The centroid of triangle(a, b, c) lies on its incircle if andonly if

5(a2 + b2 + c2)− 6(bc + ca + ab) = 0.

21.1 Construction

Let A0B0C0 be an equilateral triangle with centerI0, andC the imageof the incircle under the homothetyh

(I0,

12

). For every pointP on the

circleC, let X, Y , Z be the pedals on the sides ofA0B0C0.The triangle with sidesPX, PY , PZ has its centroid on its incircle.

Page 141: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

21.2 Integer triangles with centroid on the incircle 715

21.2 Integer triangles with centroid on the incircle

By puttingx = ac

andy = bc, we have

5x2 − 6xy + 5y2 − 6x− 6y + 5 = 0.

This is an ellipse with center(

32, 3

2

)and semiaxes

√2 and 1

2

√2. It

contains the rational pointQ(1, 2). The line through(1, 2) with slope2+t2−t

has equationy−2 = 2+t2−t

(x−1), or (t+2)x+(t−2)y−(3t−2) = 0.

Q

t

It intersects the conic at

(1− 2t + 2t2

1 + t2,

2− 2t + t2

1 + t2

)

.

Writing t = q

pfor relatively prime integersp andq, we have

a = p2 − 2pq + 2q2,

b = 2p2 − 2pq + q2,

c = p2 + q2.

Here are some examples, with relatively prime integersp andq satis-fying q < p < 2q:

Page 142: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

716 Triangles with centroid on incircle

p q a b c

2 1 2 5 53 2 5 10 134 3 10 17 255 3 13 29 345 4 17 26 416 5 26 37 617 4 25 58 657 5 29 53 747 6 37 50 858 5 34 73 898 7 50 65 1139 5 41 97 1069 7 53 85 1309 8 65 82 14510 7 58 109 14910 9 82 101 181

Exercise

1. Find the (shape of the) triangle which has a median trisectedby theincircle.

Page 143: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 22

The area of a triangle

22.1 Heron’s formula for the area of a triangle

Theorem 22.1.The area of a triangle of sidelengthsa, b, c is given by

△ =√

s(s− a)(s− b)(s− c),

wheres = 12(a + b + c).

Ia

YY ′

I

A

B

C

r

ra

s − cs − b s − a

Proof. Consider the incircle and the excircle on the opposite side of A.From the similarity of trianglesAIZ andAI ′Z ′,

r

ra

=s− a

s.

From the similarity of trianglesCIY andI ′CY ′,

r · ra = (s− b)(s− c).

Page 144: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

802 The area of a triangle

From these,

r =

(s− a)(s− b)(s− c)

s,

and the area of the triangle is

△ = rs =√

s(s− a)(s− b)(s− c).

Exercise

1. Prove that

△2 =1

16(2a2b2 + 2b2c2 + 2c2a2 − a4 − b4 − c4).

Page 145: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

22.2 Heron triangles 803

22.2 Heron triangles

A Heron triangle is an integer triangle whose area is also an integer.

22.2.1 The perimeter of a Heron triangle is even

Proposition 22.2.The semiperimeter of a Heron triangle is an integer.

Proof. It is enough to consider primitive Heron triangles, those whosesides are relatively prime. Note that modulo16, each ofa4, b4, c4 iscongruent to0 or 1, according as the number is even or odd. To renderin (??) the sum2a2b2 + 2b2c2 + 2c2a2 − a4 − b4 − c4 ≡ 0 modulo16,exactly two ofa, b, c must be odd. It follows that the perimeter of aHeron triangle must be an even number.

22.2.2 The area of a Heron triangle is divisible by6

Proposition 22.3.The area of a Heron triangle is a multiple of6.

Proof. Sincea, b, c are not all odd nor all even, ands is an integer, atleast one ofs − a, s − b, s − c is even. This means that△ is even.We claim that at least one ofs, s − a, s − b, s − c must be a multipleof 3. If not, then modulo3, these numbers are+1 or −1. Sinces =(s−a)+(s−b)+(s−c), modulo3, this must be either1 ≡ 1+1+(−1) or−1 ≡ 1+(−1)+(−1). In each case the products(s−a)(s−b)(s−c) ≡−1 (mod 3) cannot be a square. This justifies the claim that one ofs,s− a, s− b, s− c, hence△, must be a multiple of3.

Exercise

1. Prove that if a triangle with integer sides has its centroid on theincircle, the area cannot be an integer.

Page 146: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

804 The area of a triangle

22.2.3 Heron triangles with sides< 100

(a, b, c,△) (a, b, c,△) (a, b, c,△) (a, b, c,△) (a, b, c,△)

(3, 4, 5, 6) (5, 5, 6, 12) (5, 5, 8, 12) (5, 12, 13, 30) (10, 13, 13, 60)(4, 13, 15, 24) (13, 14, 15, 84) (9, 10, 17, 36) (8, 15, 17, 60) (16, 17, 17, 120)(11, 13, 20, 66) (7, 15, 20, 42) (10, 17, 21, 84) (13, 20, 21, 126) (13, 13, 24, 60)(12, 17, 25, 90) (7, 24, 25, 84) (14, 25, 25, 168) (3, 25, 26, 36) (17, 25, 26, 204)(17, 25, 28, 210) (20, 21, 29, 210) (6, 25, 29, 60) (17, 17, 30, 120) (11, 25, 30, 132)(5, 29, 30, 72) (8, 29, 35, 84) (15, 34, 35, 252) (25, 29, 36, 360) (19, 20, 37, 114)

(15, 26, 37, 156) (13, 30, 37, 180) (12, 35, 37, 210) (24, 37, 37, 420) (16, 25, 39, 120)(17, 28, 39, 210) (25, 34, 39, 420) (10, 35, 39, 168) (29, 29, 40, 420) (13, 37, 40, 240)(25, 39, 40, 468) (15, 28, 41, 126) (9, 40, 41, 180) (17, 40, 41, 336) (18, 41, 41, 360)(29, 29, 42, 420) (15, 37, 44, 264) (17, 39, 44, 330) (13, 40, 45, 252) (25, 25, 48, 168)(29, 35, 48, 504) (21, 41, 50, 420) (39, 41, 50, 780) (26, 35, 51, 420) (20, 37, 51, 306)(25, 38, 51, 456) (13, 40, 51, 156) (27, 29, 52, 270) (25, 33, 52, 330) (37, 39, 52, 720)(15, 41, 52, 234) (5, 51, 52, 126) (25, 51, 52, 624) (24, 35, 53, 336) (28, 45, 53, 630)(4, 51, 53, 90) (51, 52, 53, 1170) (26, 51, 55, 660) (20, 53, 55, 528) (25, 39, 56, 420)

(53, 53, 56, 1260) (33, 41, 58, 660) (41, 51, 58, 1020) (17, 55, 60, 462) (15, 52, 61, 336)(11, 60, 61, 330) (22, 61, 61, 660) (25, 52, 63, 630) (33, 34, 65, 264) (20, 51, 65, 408)(12, 55, 65, 198) (33, 56, 65, 924) (14, 61, 65, 420) (36, 61, 65, 1080) (16, 63, 65, 504)(32, 65, 65, 1008) (35, 53, 66, 924) (65, 65, 66, 1848) (21, 61, 68, 630) (43, 61, 68, 1290)(7, 65, 68, 210) (29, 65, 68, 936) (57, 65, 68, 1710) (29, 52, 69, 690) (37, 37, 70, 420)(9, 65, 70, 252) (41, 50, 73, 984) (26, 51, 73, 420) (35, 52, 73, 840) (48, 55, 73, 1320)(19, 60, 73, 456) (50, 69, 73, 1656) (25, 51, 74, 300) (25, 63, 74, 756) (35, 44, 75, 462)(29, 52, 75, 546) (32, 53, 75, 720) (34, 61, 75, 1020) (56, 61, 75, 1680) (13, 68, 75, 390)(52, 73, 75, 1800) (40, 51, 77, 924) (25, 74, 77, 924) (68, 75, 77, 2310) (41, 41, 80, 360)(17, 65, 80, 288) (9, 73, 80, 216) (39, 55, 82, 924) (35, 65, 82, 1092) (33, 58, 85, 660)(29, 60, 85, 522) (39, 62, 85, 1116) (41, 66, 85, 1320) (36, 77, 85, 1386) (13, 84, 85, 546)(41, 84, 85, 1680) (26, 85, 85, 1092) (72, 85, 85, 2772) (34, 55, 87, 396) (52, 61, 87, 1560)(38, 65, 87, 1140) (44, 65, 87, 1386) (31, 68, 87, 930) (61, 74, 87, 2220) (65, 76, 87, 2394)(53, 75, 88, 1980) (65, 87, 88, 2640) (41, 50, 89, 420) (28, 65, 89, 546) (39, 80, 89, 1560)(21, 82, 89, 840) (57, 82, 89, 2280) (78, 89, 89, 3120) (53, 53, 90, 1260) (17, 89, 90, 756)(37, 72, 91, 1260) (60, 73, 91, 2184) (26, 75, 91, 840) (22, 85, 91, 924) (48, 85, 91, 2016)(29, 75, 92, 966) (39, 85, 92, 1656) (34, 65, 93, 744) (39, 58, 95, 456) (41, 60, 95, 798)(68, 87, 95, 2850) (73, 73, 96, 2640) (37, 91, 96, 1680) (51, 52, 97, 840) (65, 72, 97, 2340)(26, 73, 97, 420) (44, 75, 97, 1584) (35, 78, 97, 1260) (75, 86, 97, 3096) (11, 90, 97, 396)(78, 95, 97, 3420)

Page 147: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

22.3 Heron triangles with sides in arithmetic progression 805

22.3 Heron triangles with sides in arithmetic progres-sion

We writes− a = u, s− b = v, ands− c = w.a, b, c are in A.P. if and only ifu, v, w are in A.P. Letu = v − d and

w = v + d. Then we require3v2(v − d)(v + d) to be a square. Thismeansv2 − d2 = 3t2 for some integert.

Proposition 22.4. Letd be a squarefree integer. Ifgcd(x, y, z) = 1 andx2+dy2 = z2, then there are integersm andn satisfyinggcd(dm, n) = 1such that (i)

x = m2 − dn2, y = 2mn, z = m2 + dn2

if m anddn are of different parity, or(ii)

x =m2 − dn2

2, y = mn, z =

m2 + n2

2,

if m anddn are both odd.

For the equationv2 = d2+3t2, we takev = m2+3n2, d = m2−3n2,and obtainu = 6n2, v = m2 + 3n2, w = 2m2, leading to

a = 3(m2 + n2), b = 2(m2 + 3n2), c = m2 + 9n2,

for m, n of different parity andgcd(m, 3n) = 1.

m n a− d a a + d area1 2 15 14 13 841 4 51 38 25 4562 1 15 26 37 1562 5 87 74 61 22203 2 39 62 85 11163 4 75 86 97 30964 1 51 98 145 11764 5 123 146 169 87605 2 87 158 229 47405 4 123 182 241 10920

If m andn are both odd, we obtain

Page 148: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

806 The area of a triangle

m n a− d a a + d area1 1 3 4 5 61 5 39 28 17 2103 1 15 28 41 1263 5 51 52 53 11705 1 39 76 113 570

Page 149: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

22.4 Indecomposable Heron triangles 807

22.4 Indecomposable Heron triangles

A Heron triangle can be constructed by joining two integer right trian-gles along a common leg. Beginning with two primitive Pythagoreantriangles, by suitably magnifying by integer factors, we make two inte-ger right triangles with a common leg. Joining them along thecommonleg, we obtain a Heron triangle. For example,

(13, 14, 15; 84) = (12, 5, 13; 30)∪ (12, 9, 15; 54).

5

13 15

9

12

5

1315

4

12

We may also excise(5, 12, 13) from (9, 12, 15), yielding

(13, 4, 15; 24) = (12, 9, 15; 54) \ (12, 5, 13; 30).

Does every Heron triangle arise in this way? We say that a Heron tri-angle isdecomposableif it can be obtained by joining two Pythagoreantriangles along a common side, or by excising a Pythagorean trianglefrom a larger one. Clearly, a Heron triangle is decomposableif and onlyif it has aninteger height(which is not a side of the triangle). The firstexample of anindecomposableHeron triangle was obtained by FitchCheney.

The Heron triangle(25, 34, 39; 420) is not decomposable because itdoes not have an integer height. Its heights are

840

25=

168

5,

840

34=

420

17,

840

39=

280

13,

none an integer.

Page 150: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

808 The area of a triangle

Exercise

1. Find all shapes of Heron triangles that can be obtained by joininginteger multiples of(3, 4, 5) and(5, 12, 13).

2. Find two indecomposable Heron triangles each having its longestsides two consecutive integers, and the shortest side not more than10.

3. It is known that the smallest acute Heron triangle also has its longestsides two consecutive integers. Identify this triangle.

Page 151: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

22.5 Heron triangle as lattice triangle 809

22.5 Heron triangle as lattice triangle

A Heron triangle is decomposable if it can be decomposable into (theunion or difference of) two Pythagorean triangles. It is decomposable ifone or more heights are integers. A decomposable Heron triangle canclearly be realized as a lattice triangle. It turns out that this is also trueof the indecomposable one.

Theorem 22.5.Every Heron triangle can be realized as a lattice trian-gle.

Example 22.1.The indecomposable Heron triangle(25, 34, 39; 420) asa lattice triangle

39

25

34

(0, 0)

(15, 36)

(30, 16)

Exercise

1. The triangle(5, 29, 30; 72) is the smallest Heron triangle indecom-posable into two Pythagorean triangles. Realize it as a lattice trian-gle, with one vertex at the origin.

2. The triangle(15, 34, 35; 252) is the smallest acute Heron triangleindecomposable into two Pythagorean triangles. Realize itas a lat-tice triangle, with one vertex at the origin.

Page 152: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

810 The area of a triangle

Page 153: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 23

Heron triangles

23.1 Heron triangles with area equal to perimeter

Suppose the area of an integer triangle(a, b, c) is numerically equal toits perimeter. Writew = s − a, v = s − b, u = s − c. Note thats = u + v + w. We requires(s− a)(s− b)(s− c) = 4s2. Equivalently,uvw = 4(u + v + w). There are at least two ways of rewriting this.(i) 1

uv+ 1

uw+ 1

vw= 1

4;

(ii) u = 4(v+w)vw−4

.We may assumew ≤ v ≤ u.

From (i)w2 ≤ vw ≤ 12 and we must havew ≤ 3.If w = 3, thenv = 3 or 4. In neither case canu be an integer accordingto (ii).

If w = 2, thenuv = 2(2 + u + v), (u− 2)(v− 2) = 8, (v− 2)2 ≤ 8;v = 3 or 4. Therefore,(u, v, w) = (10, 3, 2) or (6, 4, 2).

If w = 1, thenv ≥ 5 by (ii). Also, uv = 4(1 + u + v), (u − 4)(v −4) = 20, (v − 4)2 ≤ 20; v ≤ 8. Therefore,v = 5, 6, 7 or 8. Since(v, w) = (7, 1) does not give an integeru, we only have(u, v, w)= (24, 5, 1), (14, 6, 1), (9, 8, 1).

Summary

There are only five integer triangles with area equal to perimeter:

(u, v, w) (1, 5, 24) (1, 6, 14) (1, 8, 9) (2, 3, 10) (2, 4, 6)(a, b, c) (6, 25, 29) (7, 15, 20) (9, 10, 17) (5, 12, 13) (6, 8, 10)

Page 154: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

812 Heron triangles

23.2 Heron triangles with integer inradii

Suppose an integer triangle(a, b, c) has inradiusn, an integer. Letw =s− a, v = s− b, u = s− c. We have

uvw

u + v + w= n2.

If we assumeu ≤ v ≤ w, then (i)w = n2(u+v)uv−n2 ,

(ii) n ≤ u ≤√

3n, and(iii) v ≤ n(n+

√n2+u2)u

.

Therefore, the numberT (n) of integer triangles with inradiusn isfinite. Here are the beginning values ofT (n):

n 1 2 3 4 5 6 7 8 9 10 · · ·T (n) 1 5 13 18 15 45 24 45 51 52 · · ·

Exercise

1. Find all Heron triangles with inradius1.

2. Given an integern, how many Pythagorean triangles are there withinradiusn?

Answer. 12d(2n2).

3. Find all Heron triangles with inradius32.

Page 155: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

23.3 Division of a triangle into two subtriangles with equalincircles 813

23.3 Division of a triangle into two subtriangles withequal incircles

Given a triangleABC, to locate a pointP on the sideBC so that theincircles of trianglesABP andACP have equal radii.

A

B CP

b b

b

b

b

b

b

b

SupposeBP : PC = k : 1 − k, and denote the length ofAP by x.By Stewart’s Theorem,

x2 = kb2 + (1− k)c2 − k(1− k)a2.

Equating the inradii of the trianglesABP andACP , we have

2k△c + x + ka

=2(1− k)△

b + x + (1− k)a.

This latter equation can be rewritten as

c + x + ka

k=

b + x + (1− k)a

1− k, (23.1)

orc + x

k=

b + x

1− k, (23.2)

from whichk =

x + c

2x + b + c.

Now substitution into (1) gives

x2(2x+ b+ c)2 = (2x+ b+ c)[(x+ c)b2 +(x+ b)c2]− (x+ b)(x+ c)a2.

Page 156: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

814 Heron triangles

Rearranging, we have

(x + b)(x + c)a2

= (2x + b + c)[(x + c)b2 + (x + b)c2 − x2[(x + b) + (x + c)]]= (2x + b + c)[(x + b)(c2 − x2) + (x + c)(b2 − x2)]= (2x + b + c)(x + b)(x + c)[(c− x) + (b− x)]= (2x + b + c)(x + b)(x + c)[(b + c)− 2x]= (x + b)(x + c)[(b + c)2 − 4x2].

From this,

x2 =1

4((b + c)2 − a2) =

1

4(b + c + a)(b + c− a) = s(s− a).

Let the excircle on the sideBC touchAC atY . Construct a semicir-cle onAY as diameter, and the perpendicular from the incenterI to ACto intersect this semicircle atQ. P is the point onBC such thatAP hasthe same length asAQ.

bA

bB b CbP

bI

b

Z

b

b

b

b

bQ

b

b

b

Y

K. W. Lau (Solution to Problem 1097,Crux Math., 13 (1987) 135–136) has proved an interesting formula which leads to a simple construc-tion of the pointP . If the angle between the medianAD and the anglebisectorAX is θ, then

−−→AD · −−→AX = ma · wa · cos θ = s(s− a).

Page 157: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

23.3 Division of a triangle into two subtriangles with equalincircles 815

Proof.

−−→AD =

−→AB +

1

2

−−→BC,

−−→AX =

−→AB +

c

b + c

−−→BC;

−−→AD · −−→AX = |AB|2 +

(1

2+

c

b + c

)−→AB · −−→BC +

c

2(b + c)|BC|2

= c2 +

(1

2+

c

b + c

)

· b2 − a2 − c2

2+

ca2

2(b + c)

=4c2(b + c) + (b + 3c)(b2 − a2 − c2) + 2ca2

4(b + c)

=(a + b + c)(b + c− a)

4= s(s− a).

bA

b

B

b

Cb

Db

X

b

b

bY

b

P

This means if the perpendicular fromX to AD is extended to inter-sect the circle with diameterAD at a pointY , thenAY =

s(s− a).Now, the circleA(Y ) intersects the sideBC at two points, one of whichis the required pointP .

Here are two examples of Heron triangles with subdivision into twoHeron triangles with equal inradii.

(1) (a, b, c) = (15, 8, 17); CP = 6, PB = 9. AP = 10. The twosmall triangles have the same inradius2.

Page 158: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

816 Heron triangles

A

C BP

(2) (a, b, c) = (51, 20, 65); BP = 33, CP = 18. AP = 34. The twosmall triangles have the same inradius4.

A

B CP

Page 159: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

23.4 Inradii in arithmetic progression 817

23.4 Inradii in arithmetic progression

(1) TriangleABC below has sides13, 14, 15. The three inradii are2, 3,4.

24

3

A

C

B

D

(2) The following four inradii are in arithmetic progression. What isthe shape of the large triangle?

Page 160: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

818 Heron triangles

23.5 Heron triangles with integer medians

It is an unsolved problem to find Heron triangles with integermedians.The triangle(a, b, c) = (136, 170, 174) has three integer medians. But itis not a Heron triangle. It has an area .

Buchholz and Rathbun have found an infinite set of Heron triangleswith two integer medians. Here is the first one.

Let a = 52, b = 102, c = 146. This is a Heron triangle with areaand two integer mediansmb = andmc =. The third one, however, has irrational length:ma =.

Page 161: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

23.6 Heron triangles with square areas 819

23.6 Heron triangles with square areas

Fermat has shown that there does not exist a Pythagorean triangle whosearea is a perfect square. However, the triangle with sides9, 10, 17 hasarea36. In fact, there infinitely many primitive Heron triangles whose ar-eas are perfect squares. Here is one family constructed by C.R. Maderer.1

For each positive integerk, define

ak = 20k4 + 4k2 + 1,bk = 8k6 − 4k4 − 2k2 + 1,ck = 8k6 + 8k4 + 10k2.

Here,ak, bk < ck < ak + bk. The triangle with sides(ak, bk, ck) hasarea((2k)(2k2 − 1)(2k2 + 1))

2.N. D. Elkies has constructed2 an infinite sequence of solutions of the

Diophantine equation

A4 + B4 + C4 = D4,

with gcd(A, B, C, D) = 1. The triangle with

a = B4 + C4, b = C4 + A4, c = A4 + B4

is a Heron triangle with area(ABCD)2.The first example which Elkies constructed is

A =2682440,

B =15365639,

C =18796760,

D =20615673.

1American Mathematical Monthly, 98 (1991).2OnA4 + B4 + C4 = D4, Math. Comp., 51 (1988) 825 – 835.

Page 162: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

820 Heron triangles

Page 163: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 24

Triangles with sides and onealtitude in A.P.

24.1 Newton’s solution

Problem 29 of Isaac Newton’sLectures on Algebra([Whiteside, pp.234– 237]) studies triangles whose sides and one altitude are inarithmeticprogression.

Newton considered a triangleABC with an altitudeDC. Clearly,DC is shorter thanAC andBC. SettingAC = a, BC = x, DC =2x− a, andAB = 2a− x, he obtained

16x4 − 80ax3 + 144a2x2 − 10a3x + 25a4 = 0. (†)“Divide this equation by2x− a and there will result8x3 − 36ax2 +

54a2x− 25a3 = 0”. Newton did not solve this equation nor did he giveany numerical example. Actually, (†) can be rewritten as

(2x− 3a)3 + 2a3 = 0,

so thatx = a2(3 − 3

√2), the other two roots being complex. By taking

a = 2, we may assume the sides of the triangles to be

, , ,

and the altitude on the longest side to be .The angles of the triangles are

, , .

Page 164: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

822 Triangles with sides and one altitude in A.P.

24.2 The general case

Recalling the Heron triangle with sides13, 14, 15 with altitude12 on theside14, we realize that these lengths can be in A.P. in some other order.Note that the altitude in question is either the first or the second termsof the A.P. (in increasing order). Assuming unit length for this altitude,andx > 0 for the common difference, we have either

1. the three sides of the triangles are1 + x, 1 + 2x, and1 + 3x, or

2. the sides of the triangles are1−x, 1+x, and1+2x, and the altitudeon the shortest side is 1.

In (1), the area of the triangle, by the Heron formula, is given by

△2 =3

16(1 + 2x)2(1 + 4x).

On the other hand,△ = 12· 1 · (1 + kx) for k = 1, 2, 3. These lead to

the equations

• for k = 1: 48x3 + 56x2 + 16x− 1 = 0,

• for k = 2: 48x3 + 44x2 + 8x− 1 = 0,

• for k = 3: 48x3 + 24x− 1 = 0.

The casek = 3 has been dealt with in Newton’s solution.

For k = 2, the polynomial factors asso that we havex = . This leads to the Heron trianglewith sides13, 14, 15, and altitude12 on the side14the triangles are

, , .

For k = 1, it is easy to see, using elementary calculus, that the poly-nomial48x3+56x2+16x−1 has exactly one real root, which is positive.

This gives a similarity class of triangle with the three sides and thealtitude on the shortest side in A.P. More detailed calculation shows thatthe angles of such triangles are

, , .

Now we consider (2), when the altitude in question is the second termof the A.P. Instead of constructing an equation inx, we seek one suchtriangle with sides 15,17 + 2z, 18 + 3z, and the altitude16 + z on the

Page 165: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

24.2 The general case 823

shortest side. By considering the area of the triangle in twodifferentways, we obtain the cubic equation

z3 − 120z + 16 = 0. (∗)

This can be solved by writingz = 4√

10 sin θ for an angleθ. Using thetrigonometric identitysin 3θ = 3 sin θ − 4 sin3 θ, we reduce this to

sin 3θ =

so that the positive roots of (∗) are the two numbers

z = , .

We obtaintwo similarity classes of triangles, respectively with angles

, , ,

and

, , .

There are altogetherfive similarity classes of triangles whose threesides and one altitude, in some order, are in arithmetic progression.

Page 166: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 25

The Pell Equation

25.1 The equationx2 − dy2 = 1

Let d be a fixed integer. We consider thePell equationx2 − dy2 = 1.Clearly, ifd is negative or is a (positive) square integer, then the equationhas only finitely many solutions.

Theorem 25.1.Let d be anonsquare, positiveinteger. The totality ofpositive solutions of the Pell equationx2 − dy2 = 1 form an infinitesequence(xn, yn) defined recursively by

xn+1 = axn + dbyn,yn+1 = bxn + ayn; x1 = a, y1 = b,

where(x1, y1) = (a, b) is the fundamental solution, witha, b positiveandb smallest possible.

Examples

1. The fundamental solution of the Pell equationx2 − 2y2 = 1 is(3,2). This generates an infinite sequence of nonnegative solutions(xn, yn) defined by

xn+1 = 3xn +4yn, yn+1 = 2xn +3yn; x0 = 1, y0 = 0.

The beginning terms are

n 1 2 3 4 5 6 7 8 9 10 . . .

xn 3 17 99 577 3363 19601 114243 665857 3880899 22619537 . . .

yn 2 12 70 408 2378 13860 80782 470832 2744210 15994428 . . .

Page 167: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

902 The Pell Equation

2. Fundamental solution(a, b) of x2 − dy2 = 1 for d < 100:

d a b d a b d a b2 3 2 3 2 1 5 9 46 5 2 7 8 3 8 3 110 19 6 11 10 3 12 7 213 649 180 14 15 4 15 4 117 33 8 18 17 4 19 170 3920 9 2 21 55 12 22 197 4223 24 5 24 5 1 26 51 1027 26 5 28 127 24 29 9801 182030 11 2 31 1520 273 32 17 333 23 4 34 35 6 35 6 137 73 12 38 37 6 39 25 440 19 3 41 2049 320 42 13 243 3482 531 44 199 30 45 161 2446 24335 3588 47 48 7 48 7 150 99 14 51 50 7 52 649 9053 66249 9100 54 485 66 55 89 1256 15 2 57 151 20 58 19603 257459 530 69 60 31 4 61 1766319049 22615398062 63 8 63 8 1 65 129 1666 65 8 67 48842 5967 68 33 469 7775 936 70 251 30 71 3480 41372 17 2 73 2281249 267000 74 3699 43075 26 3 76 57799 6630 77 351 4078 53 6 79 80 9 80 9 182 163 18 83 82 9 84 55 685 285769 30996 86 10405 1122 87 28 388 197 21 89 500001 53000 90 19 291 1574 165 92 1151 120 93 12151 126094 2143295 221064 95 39 4 96 49 597 62809633 6377352 98 99 10 99 10 1

3. Pell’s equations whose fundamental solutions are very large:

d a b

421 3879474045914926879468217167061449 189073995951839020880499780706260541 3707453360023867028800645599667005001 159395869721270110077187138775196900601 38902815462492318420311478049 1586878942101888360258625080613 464018873584078278910994299849 18741545784831997880308784340661 16421658242965910275055840472270471049 638728478116949861246791167518480580673 4765506835465395993032041249 183696788896587421699032600769 535781868388881310859702308423201 19320788325040337217824455505160919 4481603010937119451551263720 147834442396536759781499589937 480644425002415999597113107233 15701968936415353889062192632949 609622436806639069525576201 19789181711517243032971740991 379516400906811930638014896080 12055735790331359447442538767

4. The equationx2 − 4729494y2 = 1 arises from the famousCattleproblemof Archimedes, and hassmallestpositive solution

x = 109931986732829734979866232821433543901088049,

y = 50549485234315033074477819735540408986340.

Page 168: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

25.2 The equationx2 − dy2 = −1 903

Exercise

1. Solve the Pell equations (a)x2 + 3y2 = 1; (b) x2 − 4y2 = 1 forintegersolutions.1

2. Find the 10smallestnonnegative solutions of the Pell equationx2−3y2 = 1. 2

3. If (a, b) is thefundamentalsolution of the Pell equationx2−dy2 =1, generating the infinite sequence ofnonnegativesolutions(x0, y0) =(1, 0), (x1, y1) = (a, b), (x2, y2), . . . ,(xn, yn), . . . , then

xn+1 = 2axn − xn−1; yn+1 = 2ayn − yn−1.

25.2 The equationx2 − dy2 = −1

The negative Pell’s equation

x2 − dy2 = −1,

may or may not have solutions.3

Here are the smallest positive solution(a, b) of x2 − dy2 = −1 forthe first 24 values ofd:

d a b d a b d a b

2 1 1 5 2 1 10 3 113 18 5 17 4 1 26 5 129 70 13 37 6 1 41 32 550 7 1 53 182 25 58 99 1361 29718 3805 65 8 1 73 1068 12574 43 5 82 9 1 85 378 4189 500 53 97 5604 569 101 10 1

25.3 The equationx2 − dy2 = c

Theorem 25.2.Let c > 1 be a positive integer.

1(a). (x, y) = (±1, 0); (b). (x, y) = (±1, 0).2

n 1 2 3 4 5 6 7 8 9 10 11 . . .

xn 2 7 26 97 362 1351 5042 18817 70226 262087 978122 . . .yn 1 4 15 56 209 780 2911 10864 40545 151316 564719 . . .

3This depends on the parity of the length of the period of continued fraction expansion of√

d.

Page 169: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

904 The Pell Equation

(a) If the equationx2−dy2 = c is solvable, it must have afundamen-tal solution(u, v) in the range

0 < |u| ≤√

1

2(a + 1)c, 0 ≤ v ≤ b

2(a + 1)· √c.

Every solution appears in adoubly infinite sequence(xn, yn)

un+1 = aun + dbvn,vn+1 = bun + avn, u1 = u, v1 = v,

for some(u, v) in the range above.(b) Same conclusion for the equationx2 − dy2 = −c, except that it

must have a solution(u, v) in the range

0 ≤ |u| ≤√

1

2(a− 1)c, 0 < v ≤ b

2(a− 1)·√

c.

Example 25.1.The fundamental solution ofx2 − 8y2 = 1 is (a, b) =(3, 1).

Consider the equationx2 − 8y2 = 9. We need only search for solu-tions(u, v) satisfying0 ≤ v ≤ 1√

2(3+1)· 3 = 3

2√

2. With v = 0, we have

u = ±3.x2−8y2 = −7. There are two infinite sequences of positive solutions:

(x, y) = (−1, 1), (5, 2), (31, 11), (181, 64), (1055, 373), (6149, 2174), (35839, 12671), . . .

and

(x, y) = (1, 1), (11, 4), (65, 23), (379, 134), (2209, 781), (12875, 4552), . . . .

Example 25.2.Consider the equationx2 − 23y2 = 4 · 11 · 23. It is easyto see thatx andy must be both even, and 23 dividesx. With x = 46h,y = 2k, we have23h2−k2 = 11, ork2−23h2 = −11. The fundamentalsolution ofx2 − 23y2 = 1 being(a, b) = (24, 5), we need only findyin the range1 ≤ h ≤ 2 It is now easy to see thatonly h = 2 givesk = 9. From this we obtain(x1, y1) = (92, 18). The other solutions aregenerated recursively by

xn+1 = 24xn + 115yn, yn+1 = 5xn + 24yn, x1 = 92, y1 = 18.

Page 170: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

25.3 The equationx2 − dy2 = c 905

Here are the first 5 solutions.n 1 2 3 4 5 . . .xn 92 4278 205252 9847818 472490012 . . .yn 18 892 42798 2053412 98520978 · · ·

Page 171: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

906 The Pell Equation

Page 172: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 26

Figurate numbers

26.1 Which triangular numbers are squares ?

The triangular numbers are the

Tm = 1 + 2 + 3 + · · ·+ m =1

2m(m + 1).

The first few of these are1, 3, 6, 10, 15, 21, 28, 36, 45, 55, . . . .

Suppose the triangular numberTm is also a square,i.e., Tm = n2 forsome integern. 1

2m(m + 1) = n2, (2m + 1)2 = 8n2 + 1. We make use

of the fundamental solution of the Pell equationx2 − 8y2 = 1, namely,(3, 1) to generate the solutions:

(2mk+1 + 1

nk+1

)

=

(3 81 3

)(2mk + 1

nk

)

,

or (mk+1

nk+1

)

=

(3mk + 4nk + 12mk + 3nk + 1

)

.

Page 173: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

908 Figurate numbers

Here are some beginning values:

k 0 1 2 3 4 5 . . .mk 1 8 49 288 1681 9800 . . .nk 1 6 35 204 1189 6930 . . .

These yield the square triangular numbers

T1 = 12, T8 = 62, T49 = 352, T288 = 2042, . . .

Exercise

1. Find all positive integersm > n satisfying

1 + 2 + · · ·+ (n− 1) = (n + 1) + (n + 2) + · · ·+ m.

Solution. Tn−1 = Tm − Tn =⇒ Tm = Tn−1 + Tn = n2.

Page 174: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

26.2 Pentagonal numbers 909

26.2 Pentagonal numbers

The pentagonal numbers are the sums

Pm := 1 + 4 + 7 + · · ·+ (3m− 2) =1

2m(3m− 1).

Exercise

1. Which pentagonal numbers are squares?

Solution. If Pm = n2, 3m2−m = 2n2, (6m−1)2 = 24n2+1. Wemake use of the fundamental solution ofx2 − 24y2 = 1, namely,(a, b) = (5, 1) to generate the solutions

(6mk+1 − 1

nk+1

)

=

(5 241 5

)(6mk − 1

nk

)

.

This, however, does not always yield integer values formk+1. Thesolutions of the Pell equationx2 − 24y2 = 1, when arranged inascending order, havexk ≡ −1 (mod 6) only for odd values ofk.Therefore, we modify the recursion as follows:

(6mk+1 − 1

nk+1

)

=

(5 241 5

)2(6mk − 1

nk

)

=

(49 24010 49

)(6mk − 1

nk

)

.

This gives(

mk+1

nk+1

)

=

(49mk + 40nk − 860mk + 49nk − 10

)

.

Page 175: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

910 Figurate numbers

Here are some beginning values:

k 0 1 2 3 . . .mk 1 81 7921 776161 . . .nk 1 99 9701 950599 . . .

2. Which pentagonal numbers are triangular numbers?

Solution. If Pm = Tn, 3m2 −m = n2 + n. Completing squaresleads to ,

(6m− 1)2 = 3(2n + 1)2 − 2. (26.1)

Now, the Pell equationx2 − 3y2 = −2 has smallest solution(1, 1).We make use the fundamental solution ofx2 − 3y2 = 1, namely,(a, b) = (2, 1) to generate solutions of (26.1):

(6mk+1 − 12nk+1 + 1

)

=

(2 31 2

)2(6mk − 12nk + 1

)

=

(7 124 7

)(6mk − 12nk + 1

)

.

This gives(

mk+1

nk+1

)

=

(7mk + 4nk + 112mk + 7nk + 1

)

.

Here are some beginning values:

k 0 1 2 3 4 . . .mk 1 12 165 2296 31977 . . .nk 1 20 285 3976 55385 . . .

Page 176: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

26.3 Almost square triangular numbers 911

26.3 Almost square triangular numbers

There are two types of almost square triangular numbers, deficient andexcessive.

26.3.1 Excessive square triangular numbers

If the triangular numberTm = n2 + 1 for some integern, we call it anexcessivesquare triangular number. This is equivalent to

(2m + 1)2 − 8n2 = 9.

Its solutions can be found from those ofx2 − 8y2 = 9:

mk+1 = 3mk + 4nk + 1,

nk+1 = 2mk + 3nk + 1,

with initial entries given by(2m0 + 1, n0) = (3, 0), i.e., (m0, n0) =(1, 0). The beginning values are

k 0 1 2 3 4 . . .mk 1 4 25 148 865 . . .nk 0 3 18 105 612 . . .

This gives the excessive triangular numbers

T1 = 02 + 1,

T4 = 32 + 1,

T25 = 182 + 1,

T148 = 1052 + 1,

...

Page 177: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

912 Figurate numbers

26.3.2 Deficient square triangular numbers

If the triangular numberTm = n2 − 1 for some integern, we call it adeficientsquare triangular number. This is equivalent to

(2m + 1)2 − 8n2 = −7.

Its solutions can be found from the same recurrence relations, but withinitial entries given by(2m0+1, n0) = (1, 1) or (−1, 1), i.e., (m0, n0) =(0, 1) or (−1, 1). These yield two distinct sequences of deficient trian-gular numbers:

T0 = 12 − 1,

T5 = 42 − 1,

T32 = 232 − 1,

T189 = 1342 − 1,

...

and

T2 = 22 − 1,

T15 = 112 − 1,

T90 = 642 − 1,

T527 = 3732 − 1,

...

Page 178: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

26.3 Almost square triangular numbers 913

Exercise

1. A developer wants to build a community in which then (approxi-mately100) homes are arranged along a circle, numbered consecu-tively from 1, 2, . . . n, and are separated by the club house, whichis not numbered. He wants the house numbers on one side of clubhouse adding up to the same sum as the house numbers on the othersides. Between which two houses should he build the club house?How many houses are there altogether?

Solution. Suppose houses1, 2, . . . ,m are on one side of the clubhouse.1+2 · · ·+n = 2(1+2+ · · ·+m); n(n+1) = 2m(m+1);4n2 +4n = 2(4m2 +4m); (2n+1)2 = 2(2m+1)2−1; (2n+1)2−2(2m + 1)2 = −1. From the solutions ofx2 − 2y2 = −1, we have(2n + 1, 2m + 1) = (239, 169). This gives(n, m) = (119, 84).

2. Later the developer finds out that government law requires the clubhouse also to be numbered. If he wants to maintain equal housenumber sums on both sides, he finds that he has to build signifi-cantly fewer homes. How many homes should he build, and whatis the number of the club house?

3. Find five positive integersn for which both2n + 1 and3n + 1 aresquares.

4. The voting population of your county is about one million. Eachvoter is assigned a registration number from1, 2, 3, . . . , N , theexact number of voters. When a county official typed in her ownname, her registration numberM appeared on the computer screen.Her assistant, being an excellent student from your mathematicsclass, remarked that the probability that the registrationnumbers oftwo more names she would randomly enter are both less thanMis exactly1

2. And she was correct. The assistant’s father was very

proud. He copied the numbers, and related the story to you.

Now, give him more reason to be proud by telling the exact popula-tion N of the county, and the registration numberM of his daugh-ter’s superior, (which he can easily verify).

Answer. : Voting population803762, first number568346.

Page 179: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

914 Figurate numbers

Page 180: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 27

Special integer triangles

27.1 Almost isosceles Pythagorean triangles

An almost isosceles right triangle is one whose shorter sides differ by1. Let a and a + 1 be these two sides andy the hypotenuse. Theny2 = a2 + (a + 1)2 = 2a2 + 2a + 1. From this,2y2 = (2a + 1)2 +1. The equation Withx = 2a + 1, this reduces to the Pell equationx2− 2y2 = −1, which we know has solutions, with the of this equationsare (xk, yk) given recursively by smallest positive one(1, 1), and theequationx2 − 2y2 = 1 has fundamental solution(3, 2). It follows thatthe solutions are given recursively by

xk+1 = 3xk + 4yk,yk+1 = 2xk + 3yk, x0 = 1, y0 = 1.

If we write xk = 2ak + 1, these become

ak+1 = 3ak + 2yk + 1,yk+1 = 4ak + 3yk + 2, a0 = 0, y0 = 1.

The beginning values ofak andyk are as follows.

k 1 2 3 4 5 6 . . .ak 3 20 119 696 4059 23660 . . .yk 5 29 169 985 5741 33461 . . .

Page 181: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

916 Special integer triangles

32 + 42 = 52,

202 + 212 = 292,

1192 + 1202 = 1692,

6962 + 6972 = 9852,

...

27.1.1 The generators of the almost isosceles Pythagorean trian-gles

Consider the almost isosceles Pythagorean triangles alongwith theirgenerators:

k 1 2 3 4 5 6 . . .

ak 3 20 119 696 4059 23660 . . .yk 5 29 169 985 5741 33461 . . .mk 1 2 5 12 29 70 . . .nk 2 5 12 29 70 169 . . .

The generators form a sequence

1, 2, 5, 12, 29, 70, 169, . . .

which satisfies the second order recurrence

mk+2 = 2mk+1 + mk, m1 = 1, m2 = 2.

Note that the hypotenuses of the triangles are among the generators.

Page 182: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

27.2 Integer triangles(a, a + 1, b) with a 120◦ angle 917

27.2 Integer triangles(a, a + 1, b) with a 120◦ angle

If (a, a + 1, b) is an integer triangle with a120◦ angle, the consecutivesides must be the shorter ones. This means that

b2 = a2 + a(a + 1) + (a + 1)2 = 3a2 + 3a + 1.

Completing squares leads to the Pell equation

(2b)2 − 3(2a + 1)2 = 1. (27.1)

Since the solutions ofx2 − 3y2 = 1, when arranged in ascending order,havex even andy odd only in alternate terms, the solutions of (27.1) aregiven recursively by

(2bk+1

2ak+1 + 1

)

=

(2 31 2

)2(2bk

2ak + 1

)

=

(7 124 7

)(2bk

2ak + 1

)

,

or (ak+1

bk+1

)

=

(7ak + 4bk + 312ak + 7bk + 6

)

.

The beginning values are

k 0 1 2 3 4 . . .ak 0 7 104 1455 20272 . . .bk 1 13 181 2521 35113 . . .

Note that the values ofbk are all sums of two consecutive squares:

1 = 02 + 12,

13 = 22 + 32,

181 = 92 + 102,

2521 = 352 + 362,

35113 = 1322 + 1332,

...

This observation can be justified by rewriting (27.1) in the form

(2b− 1)(2b + 1) = 3(2a + 1)2.

Since2b−1 and2b+1 are consecutive odd numbers, they are relativelyprime. Therefore, either

Page 183: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

918 Special integer triangles

(i) 2b + 1 = m2, 2b− 1 = 3n2, or(ii) 2b + 1 = 3m2, 2b− 1 = n2.

In (i), m2 − 3n2 = 2, an impossibility. We must have (ii), and

b =n2 + 1

2=

(n− 1

2

)2

+

(n + 1

2

)2

,

the sum of the squares of the consecutive numbersn−12

and n+12

.

Exercise

1. If we write bk = c2k+(ck+1)2, the numbersck are given recursively

byck+2 = 4ck+1 − ck + 1, c0 = 0, c1 = 2.

2. Prove that there is no integer triangle with two sides which are con-secutive integers and have a60◦ angle between them.

3. Find all integer triangles with a60◦ and two sides which are con-secutive integers.

Answer. (3, 7, 8) and(5, 7, 8).

Page 184: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 28

Heron triangles

28.1 Heron triangles with consecutive sides

If (b− 1, b, b + 1,△) is a Heron triangle, thenb must be an even integer.We writeb = 2m. Thens = 3m, and△2 = 3m2(m− 1)(m + 1). Thisrequiresm2− 1 = 3k2 for an integern, and△ = 3mn. The solutions ofm2 − 3n2 = 1 can be arranged in a sequence

(mk+1

nk+1

)

=

(2 31 2

)(mk

nk

)

,

(m1

n1

)

=

(21

)

.

From these, we obtain the side lengths and the area.The middle sides form a sequence(bk) given by

bk+2 = 4bk+1 − bk, b0 = 2, b1 = 4.

The areas of the triangles form a sequence

△k+2 = 14△k+1 −△k, △0 = 0, △1 = 6.

k bk △k Heron triangle

0 2 0 (1, 2, 3, 0)1 4 6 (3, 4, 5, 6)2 14 84 (13, 14, 15, 84)345

Page 185: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1002 Heron triangles

28.2 Heron triangles with two consecutive square sides

Construct an infinite family of Heron triangles each with twosides thesquares of consecutive integers.

Here is one example: the triangle(25, 36, 29) has area360.Solution. Let a = v2 andb = (v + 1)2. Since the perimeter of a Herontriangle must be an even number, the third side must be odd. Writec = 2u− 1. With these,

s = u + v + v2,

s− a = u + v,

s− b = u− v − 1,

s− c = v2 − u + v + 1.

To obtain a Heron triangle, we find a relation betweenu andv whichmakes one or more of these expressions squares. By puttingu = 3v, wehavec = 6v − 1 and

s = v(v + 4),

s− a = 4v,

s− b = 2v − 1,

s− c = (v − 1)2.

This is a Heron triangle if and only if4v2(v− 1)2(v + 4)(2v− 1) is asquare. Equivalently,(v + 4)(2v − 1) is a square. We take2v − 1 = x2

andv + 4 = y2 for integersx andy. These must satisfyx2 − 2y2 = −9.Beginning with the smallest solution(x1, y1) = (3, 3), we obtain an

infinite sequence of solutions

(xn+1

yn+1

)

=

(3 42 3

)

=

(xn

yn

)

.

Page 186: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

28.2 Heron triangles with two consecutive square sides 1003

n x y v a b c ∆1 3 3 5 25 36 29 3602 21 15 221 48841 49284 1325 306306003 123 87 7565 57229225 57244356 45389 1224657967320...

The parameterv can be generated recursively by

vn+2 = 34vn+1 − vn + 56, v1 = 5, v2 = 221.

This gives a Heron triangle(v2, (v + 1)2, 6v − 1) with area2v(v − 1)xy.

Exercise

Make use of this recurrence to find one more such triangle.Answer. v = 257045; (a, b, c) = (66072132025, 66072646116, 1542269),∆ = 48036763841709240.

Page 187: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1004 Heron triangles

Page 188: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 29

Squares as sums of consecutivesquares

29.1 Sum of squares of natural numbers

Theorem 29.1.

12 + 22 + 32 + · · ·+ n2 =1

6n(n + 1)(2n + 1).

Proof. Let Tn = 1 + 2 + 3 · · ·+ n = 12n(n + 1) and

Sn = 12 + 22 + 32 + · · ·+ n2.

23 = 13 + 3 · 12 + 3 · 1 + 133 = 23 + 3 · 22 + 3 · 2 + 143 = 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

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

SinceTn is known, we have

Sn =1

3

(

(n + 1)3 − n− 1− 3

2n(n + 1)

)

=1

6n(n + 1)(2n + 1).

Page 189: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1006 Squares as sums of consecutive squares

Exercise

1. Find12 + 32 + 52 + · · ·+ (2n− 1)2.

2. Findn so thatn2 + (n + 1)2 is a square.

3. Show that

32 + 42 =52,

102 + 112 + 122 =132 + 142,

212 + 222 + 232 + 242 =252 + 262 + 272,

362 + 372 + 382 + 392 + 402 =412 + 422 + 432 + 442,

...

4. Find all integersn so that the mean and the standard deviation ofnconsecutiveintegers are both integers.

Solution. If the mean ofn consecutive integers is an integer,nmust be odd. We may therefore assume the numbers to be−m,−(m − 1), . . . ,−1, 0, 1, . . . ,m − 1, m. The standard deviation

of these number is√

13m(m + 1). For this to be an integer, we

must have13m(m + 1) = k2 for some integerk. m2 + m = 3k2;

n2 = (2m + 1)2 = 12k2 + 1. The smallest positive solution ofthe Pell equationn2 − 12k2 = 1 being(7, 2), the solutions of thisequation are given by(ni, ki), where

ni+1 = 7ni + 24ki,ki+1 = 2ni + 7ki, n0 = 1, k0 = 0.

The beginning values ofn andk are

i 1 2 3 4 5 . . .ni 7 97 1351 18817 262087 . . .ki 2 28 390 5432 75658 . . .

5. Find the first two instances when the average of the squares ofnconsecutive squares is equal ton2. Describe how to generate allsuch identities.

Page 190: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

29.1 Sum of squares of natural numbers 1007

6. Find all sequences of11 consecutive positive integers, the sum ofwhose squares is the square of an integer.

Answer.

182 + 192 + · · ·+ 282 = 772,382 + 392 + · · ·+ 482 = 1432,4562 + 4572 + · · ·+ 4662 = 15292,8542 + 8552 + · · ·+ 8642 = 28492,91922 + 91932 + · · ·+ 92022 = 305032,171322 + 171332 + · · ·+ 171422 = 568372,...

7. Find all natural numbersn > 1 such that

(12 + 22 + · · ·+ n2)((n + 1)2 + (n + 2)2 + · · ·+ (n + n)2)

is a perfect square.

Page 191: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1008 Squares as sums of consecutive squares

29.2 Sums of consecutive squares: odd number case

Suppose the sum of the squares of2k + 1 consecutivepositiveintegersis a square. If the integers areb, b± 1, . . . , b± k. We require

(2k + 1)b2 +1

3k(k + 1)(2k + 1) = a2

for an integera. From this we obtain the equation

a2 − (2k + 1)b2 =1

3k(k + 1)(2k + 1). (Ek)

1. Suppose2k+1 is a square. Show that(Ek) has solution only whenk = 6m(m + ǫ) for some integersm > 1, andǫ = ±1. In eachcase, the number of solutions isfinite.

Number of solutions of(Ek) when2k + 1 is a square

2k + 1 25 49 121 169 289 361 529 625 841 961 . . .0 1 1 2 7 3 5 3 3 10 . . .

2. Find theuniquesequence of 49 (respectively 121) consecutive pos-itive integers whose squares sum to a square.

3. Find the two sequences of 169 consecutive squares whose sumsaresquares.

4. Suppose2k + 1 is not a square. Ifk + 1 is divisible 9 = 32 orby any prime of the form4k + 3 ≥ 7, then the equation(Ek) hasno solution. Verify that for the following values ofk < 50, theequation(Ek) has no solution:

Page 192: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

29.2 Sums of consecutive squares: odd number case 1009

k = 6, 8, 10, 13, 17, 18, 20, 21, 22, 26, 27, 30, 32,34, 35, 37, 40, 41, 42, 44, 45, 46, 48, . . .

5. Supposep = 2k+1 is a prime. If the Legendre symbol(

− 1

3k(k+1)

p

)

=

−1, then the equation(Ek) hasno solution. Verify that for the fol-lowing values ofk < 50, the equation(Ek) has no solution:

1, 2, 3, 8, 9, 14, 15, 20, 21, 26, 33, 39, 44.

6. Fork ≤ 50, it remains to consider(Ek) for the following values ofk:

5, 7, 11, 16, 19, 23, 25, 28, 29, 31, 36, 38, 43, 47, 49.

Among these, only fork = 5, 11, 16, 23, 29 are the equations(Ek)solvable.

7. Work out 5 sequences of 23 consecutive integers whose squaresadd up to a square in each case.

Answer:

72 + 82 + · · ·+ 292 = 922;8812 + 8822 + · · ·+ 9032 = 42782;

427872 + 427882 + · · ·+ 428092 = 2052522;20534012 + 20534022 + · · ·+ 20534232 = 98478182;

· · · · · · · · ·

8. Consider the equation(E36) : u2−73v2 = 12·37·73. This equationdoes in fact have solutions(u, v) = (4088, 478), (23360, 2734).The fundamental solution of the Pell equationx2− 73y2 = 1 being(a, b) = (2281249, 267000), we obtain two sequences of solutionsof (E73):Answer:

(4088, 478), (18642443912, 2181933022), (85056113063608088, 9955065049008478), . . .

(23360, 2734), (106578370640, 12474054766), (486263602888235360, 56912849921762734), . . .

This means, for example, the sum of the squares of the 73 numberswith center 478 (respectively 2734) is equal to the square of4088(respectively 23360).

Page 193: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1010 Squares as sums of consecutive squares

29.3 Sums of consecutive squares: even number case

Suppose the sum of the squares of the2k consecutive numbers

b− k + 1, b− k + 2, . . . , b, . . . , b + k − 1, b + k,

is equal toa2. This means

(2a)2 − 2k(2b + 1)2 =2k

3(4k2 − 1). (E ′

k)

Note that the numbers2k, 4k2 − 1 are relatively prime.

1. Show that the equation(E ′k) has no solution if2k is a square.

2. Suppose2k is not a square. Show that if2k + 1 is divisible by 9,or by any prime of the form4k + 1, then the equation(E ′

k) has nosolution.

3. For k ≤ 50, the equation(E ′k) has no solution for the following

values ofk:

k = 3, 4, 5, 9, 11, 13, 15, 17, 21, 23, 24, 27, 29, 31, 33,35, 38, 39, 40, 41, 45, 47, 49.

4. Let k be a prime. The equation(E ′k) can be written as

(2b + 1)2 − 2ky2 = −4k2 − 1

3.

By considering Legendre symbols, the equation(E ′k) has no solu-

tion for the following values ofk ≤ 50:

k = 5, 7, 17, 19, 29, 31, 41, 43.

5. Excluding square values of2k < 100, the equation(E ′k) has solu-

tions only fork = 1, 12, 37, 44.

6. Show that (34, 0), (38, 3), (50, 7) are solutions of(E”12). Constructfrom them three infinite sequences of expressions of the sum of 24consecutive squares as a square.

Page 194: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

29.3 Sums of consecutive squares: even number case 1011

7. The equation(E ′37) has solutions (185, 2), (2257,261), and (2849,

330). From these we construct three infinite sequences of expres-sions of the sum of 74 consecutive squares as a square.

Answer:

2252 + 2262 + · · ·+ 2982 = 22572;2942 + 2952 + · · ·+ 3672 = 28492;

130962 + 130972 + · · ·+ 131792 = 7638652.

8. The equation(E ′44) has solutions (242, 4) and (2222,235). From

these we obtain two infinite sequences of expressions of the sum of88 consecutive squares as a square.

1922 + 1932 + · · ·+ 2792 = 22222;59252 + 59262 + · · · 60122 = 559902.

Page 195: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1012 Squares as sums of consecutive squares

29.4 Sums of powers of consecutive integers

Consider the sum of thek-powers of the first natural numbers:

Sk(n) := 1k + 2k + · · ·+ nk.

Theorem 29.2(Bernoulli). Sk(n) is a polynomial inn of degreek + 1without constant term. It can be obtained recursively as

Sk+1(n) =

(k + 1)Sk(n)dn + cn,

wherec is determined by the condition that the sum of the coefficients is1.

Examples

(1) S2(n) = 16n(n + 1)(2n + 1).

(2) S3(n) = 13 + 23 + · · ·+ n3 = 14n2(n + 1)2.

(3) S4(n) = 15n5 + 1

2n4 + 1

3n3 − 1

30n.

Exercise

Show that1k + 2k + · · ·+ nk = (1 + 2 + · · ·+ n)p

for all integersn if and only if (k, p) = (1, 1) or (3, 2). 1

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

Page 196: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 30

Lucas’ problem

A square pyramid of cannon balls contains a square number of cannonballs only when it has24 cannon balls along its base.1

Theorem 30.1(Lucas).

12 + 22 + · · ·+ n2 = m2 =⇒ (n, m) = (1, 1) or (24, 70).

Equivalently, these are the only positive integer solutions of

n(n + 1)(2n + 1) = 6m2.

The elementary solution of Lucas’ problem presented here isbasedon Anglin [7].

30.1 Solution ofn(n + 1)(2n + 1) = 6m2 for evenn

We make use of three nontrivial results.

(A) (Fermat) The area of a Pythagorean triangle cannot be a square.

(B) There are no positive integersx such that2x4 + 1 is a square.

(C) The only positive integerx for which8x4 + 1 is a square isx = 1.

Note that the numbersn, n + 1 and2n + 1 are mutually relativelyprime.

1E. Lucas, Question 1180,Nouvelles Annales de Mathematiques, ser. 2, 14 (1875) 336.

Page 197: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1014 Lucas’ problem

If n is even, thenn + 1 and2n + 1 are both odd. Each of them is ofthe formk2 or 3k2. In any case,n + 1 6≡ 2 and2n + 1 6≡ 2 (mod 3).This means thatn ≡ 0 (mod 3), and there are integersp, q, r such that

n = 6p2, n + 1 = q2, 2n + 1 = r2.

From these,6p2 = r2− q2 = (r− q)(r + q). Sinceq andr are both odd,r − p andr + q are both even. It follows thatp is even, and

r − q

2· r + q

2= 6

(p

2

)2

.

There are two possibilities.(a) One ofr−q

2and r+q

2is of the form3x2 and the other2y2 for some

integersx andy. In this case,q = ±(3x2 − 2y2) andp = 2xy. Since

(3x2 − 2y2)2 = q2 = 6p2 + 1 = 24x2y2 + 1

=⇒ (3x2 − 6y2)2 = 32y4 + 1 = 2(2y)4 + 1,

we must havey = 0 by (B). Correspondingly,x = 0, p = 0, andncannot be a positive integer.

(b) One of r−q

2and r+q

2is of the form6x2 and the othery2 for some

integersx andy. Thenq = ±(6x2 − y2) andp = 2xy. Since

(6x2 − y2)2 = q2 = 6p2 + 1 = 24x2y2 + 1

=⇒ (6x2 − 3y2)2 = 8y4 + 1,

we must havey = 0 or y = 1 by (C). Correspondingly,x = 0 or x = 1.Hence, the only positive even integer value ofn = 6p2 = 6(2xy)2 = 24.

30.2 The Pell equationx2 − 3y2 = 1 revisited

The positive solutions of the Pell equationx2−3y2 = 1 form a sequence(xk, yk).

1. xh+k = xhxk + 3yhyk, yh+k = xhyk + xkyh.

2. Forh ≥ k, xh−k = xhxk − 3yhyk, yh−k = −xhyk + xkyh.

3. xk+2 = 4xk+1 − xk, yk+2 = 4yk+1 − yk.

4. x2k = 2x2k − 1 = 6y2

k + 1, y2k = 2xkyk.

Page 198: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

30.3 Solution ofn(n + 1)(2n + 1) = 6m2 for odd n 1015

5. Let h, k, r be nonnegative integers such that2hr−k is nonnegative.Then

x2hr±k ≡ (−1)rxk (mod xh).

6. If k is even, thenxk is odd, not divisible by5, and5 is a quadraticresidue ofxk if and only if k is divisible by3.

7. If k is even, thenxk is odd, and−2 is a quadratic residue ofxk ifand only ifk is divisible by4.

8. xk = 4z2 + 3 for an integerz only if xk = 7.

30.3 Solution ofn(n + 1)(2n + 1) = 6m2 for odd n

Supposen is odd. Then each ofn and2n + 1 is of the formk2 or 3k2.This means thatn 6≡ 2 (mod 3). Sincen + 1 is even, it is of the form2k2 or 6k2. This means thatn + 1 6≡ 1. Therefore,n ≡ 1 (mod 3), and2n + 1 is divisible by3. There are nonnegative integersp, q, r such that

n = p2, n + 1 = 2q2, 2n + 1 = 3r2.

From these, we have6r2 +1 = 4n+3 = 4p2 +3. Note that3r2−4q2 =−1. It follows that

(6r2 + 1)2 − 3(4qr)2 = 12r2(3r2 + 1− 4q2) + 1 = 1.

Therefore,(6r2 +1, 4qr) is a solution of the Pell equationx2−3y2 = 1,and6r2 + 1 = xk for somek. By (8), we must have6r2 + 1 = 7, r = 1.Hence, the only positive odd integer value ofn is given by2n + 1 = 3,i.e., n = 1.

Page 199: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 31

Some geometry problems

1. AX andBY are angle bisectors of triangleABC, with X on BCandY onAC. SupposeAX = AC andBY = AB.

(a) Determine the angles of triangleABC.

(b) If CZ ′ is the external bisector of angleC, with Z ′ on the exten-sion ofBA, show thatCZ ′ = AC.

Y

A

B CX

Z′

Solution. (a) A2+B = C, B

2+C = A. Together withA+B+C =

π, we have

A =6π

13, B =

13, C =

13.

(b) Half of the external angle ofC = 12

(π − 5π

13

)= 4π

13= 2B.

Therefore,CZ ′ = BC.

Page 200: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1102 Some geometry problems

C

A

B

X

Y

1

1

3 3

55

6

Page 201: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1103

2.

tan 71

2

◦=√

6−√

3 +√

2− 2 = (√

2− 1)(√

3−√

2),

tan 371

2

◦=√

6 +√

3−√

2− 2 = (√

2 + 1)(√

3−√

2),

tan 521

2

◦=√

6−√

3−√

2 + 2 = (√

2− 1)(√

3 +√

2),

tan 821

2

◦=√

6 +√

3 +√

2 + 2 = (√

2 + 1)(√

3 +√

2).

Solution. Consider a squareABCD with sidelength2 and anequilateral triangleXCD with X in the interior of the square. LetM be the midpoint ofAB.

A B

CD

X

M

Y

T

45◦

30◦

Since triangleDAX is isosceles with∠ADX = 30◦, ∠DAX =75◦, and∠XAM = 15◦. In the right triangleXAM ,

AM = 1,

MX = 2−√

3,

AX =

12 + (2−√

3)2 =

8− 4√

3 =

8− 2√

12 =√

6−√

2.

Page 202: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1104 Some geometry problems

If AT bisects angleXAM , by the angle bisector theorem

TM = XM · AM

AM + AX

= (2−√

3) · 1

1 +√

6−√

2

=1

(2 +√

3)(1 +√

6−√

2)

=1

2 +√

2 +√

3 +√

6

=1

(√

2 + 1)(√

3 +√

2)

= (√

2− 1)(√

3−√

2).

From the right triangleXAM , we have

tan 71

2

◦=

TM

AM= (√

2− 1)(√

3−√

2).

(2) Applying the law of tangents to triangleXCY in which∠X =45◦ and∠C = 30◦, we have

tan X+C2

tan X−C2

=CY + XY

CY −XY.

Now, XY = AX =√

2(√

3 − 1), CY = 2 − 2(2 −√

3) =2(√

3− 1). This means

tan 3712

tan 712

◦ =

√2 + 1√2− 1

,

and

tan 371

2

◦= (√

2 + 1)(√

3− 1).

Page 203: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1105

3. Let D be the midpoint ofBC of triangle ABC. Suppose that∠BAM = ∠C and∠DAC = 15◦. Calculate angleC.

A

B CD

15◦

Answer. : 30◦.

A

B CD

O

P

Q

Solution. Since∠DAB = ∠ACD, the lineAB is tangent tothe circleACD. Let O be the center of the circle, andP , Q theprojections ofA, D on OC. Since∠DOQ = 2∠DAC = 30◦,DQ = 1

2· OD = 1

2· OA. Therefore,BP = AO. SinceOB is

a diameter of the circle throughO, A, B, P , ∠AOC = 90◦. Itfollows that∠ACB = ∠OCD − ∠OCA = 75◦ − 45◦ = 30◦.

Page 204: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1106 Some geometry problems

4. Calculate the length ofAC.

1

1

x

30◦

BD

A

C

Answer. x = 3√

2.

Solution. Let AB = x. If AE is the bisector of angleA, thenAE = 1

1+x. AD is the bisector angleBAE.

1

1

x

1x

√3

x

30◦30◦

BD

A

C

E

(1 + x)2 =

(

1 +1

x

)2

+

(√3

x

)2

=⇒ (x + 2)(x3 − 2)

x2= 0.

Page 205: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1107

5. In a right - angled triangle, establish the existence of a unique inte-rior point with the property that the line through the point perpen-dicular to any side cuts off a triangle of the same area.

C

A

B

P

X

Z1

C

A

B

P

Y Z2

C

A

B

P

Z

X1

Solution. (1) Since the three trianglesZ1BX, AZ2Y andX1BZare similar, they are congruent if their areas are equal. Therefore,BX = BZ and trianglesBPX andBPZ are congruent. It followsthatP lies on the bisector of angleB.

C

A

B

P

X

Z1

M

C

A

B

P

Y Z2

M

C

A

B

P

Z

X1

(2) Note thatZ1B = AZ2. From this,AZ1 = Z2B. ExtendCP tointersectAB atM . We have

AZ1 : AM = CP : CM = BZ2 : BM = Z2B : MB.

Therefore,AM = MB andCM is the median on the hypotenuse.

(3) The pointP is the intersection of the bisector of angleB (smalleracute angle) and the median on the hypotenuse.

Exercise

(a) Calculate the coordinates ofP in terms ofa, b, c. Here,c2 =a2 + b2.

Answer.(

a2

2a+c, ab

2a+c

)

.

(b) Show that the common area of the triangles is(

a+c2a+c

)2of the

given right triangle.

Page 206: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1108 Some geometry problems

Page 207: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 32

Basic geometric constructions

32.1 Some basic construction principles

Theorem 32.1(Perpendicular bisector locus). Given two distinctA andB on a plane, a pointP is equidistant fromA andB if and only ifP lieson the perpendicular bisector of the segmentAB.

Theorem 32.2(Angle bisector locus). A pointP is equidistant from twogiven intersecting lines if and only if it lies on the bisector of an anglebetween the two lines.

Note that two intersecting lines have two angle bisectors.

Theorem 32.3. If two circles are tangent to each other, the line joiningtheir centers passes through the point of tangency.

The distance between their centers is the sum (respectivelydifference)of their radii if the tangency is external (respectively internal).

Page 208: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1110 Basic geometric constructions

32.2 Geometric mean

We present two ruler-and-compass constructions of the geometric meansof two quantities given as lengths of segments. These are based on Eu-clid’s proof of the Pythagorean theorem.

Construction 32.1. Given two segments of lengtha < b, mark threepointsP , A, B on a line such thatPA = a, PB = b, andA, B areon thesameside of P . Describe a semicircle withPB as diameter,and let the perpendicular throughA intersect the semicircle atQ. ThenPQ2 = PA · PB, so that the length ofPQ is the geometric mean ofaandb.

PA

B

Q

Construction 32.2.Given two segments of lengtha, b, mark three pointsA, P , B on a line (P betweenA andB) such thatPA = a, PB = b.Describe a semicircle withAB as diameter, and let the perpendicularthroughP intersect the semicircle atQ. ThenPQ2 = PA · PB, so thatthe length ofPQ is the geometric mean ofa andb.

AP

B

Q

Page 209: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

32.3 Harmonic mean 1111

32.3 Harmonic mean

Let ABCD be a trapezoid withAB//CD. If the diagonalsAC andBDintersect atK, and the line throughK parallel toAB intersectAD andBC atP andQ respectively, thenPQ is the harmonic mean ofAB andCD:

2

PQ=

1

AB+

1

CD.

a

b

harmonic mean

K

P Q

D C

A B

Another construction

a

b

harmonic mean

Page 210: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1112 Basic geometric constructions

32.4 A.M≥ G.M. ≥ H.M.

A trapezoid with parallel sidesa andb is given. Here is a constructionof the geometric mean

√ab as a parallel to the bases, making use of the

arithmetic and harmonic means. As is well known, the parallel throughthe intersection of the diagonals gives the harmonic mean2ab

a+b. LetH be

the endpoint of this parallel on the sideAB of the trapezoid. Constructthe perpendicular toAB atH to intersect the circle with diameterAB atP . Bisect the right angleAPB and let the bisector intersectAB atG.

a

b

A

B

M

H

P

G

Then the parallel throughG to the bases has length√

ab.

Proof. Note thatAPB is a right angle, andAP 2 : BP 2 = AH : BH =a : b. SincePG bisects angleAPB, AG : BG = AP : PB =

√a :√

b.It follows that the parallel throughG has length

a ·√

b + b · √a√b +√

a=

√ab(√

a +√

b)√

a +√

b=√

ab.

Page 211: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

32.4 A.M≥ G.M. ≥ H.M. 1113

Exercise

1. Given triangleABC, construct the equilateral trianglesBCX, CAYandABZ externally on the sides of the triangle. JoinAX, BY ,CZ. What can you say about the intersections, lengths, and direc-tions of these lines (segments)?

2. Show that the90◦ angle of a right triangle is bisected by the linejoining it to the center of the square on the hypotenuse.

3. Make a sketch to show that for two given positive quantitiesa andb,

a + b

2≥√

ab ≥ 2ab

a + b.

4. Construct the following diagram.AB

C D

5. Construct the following diagram.AB

C D

Page 212: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1114 Basic geometric constructions

6. Two congruent circles of radiia have their centers on each other.Consider the circle tangent to one of them internally, the other ex-ternally, and the line joining their centers. It is known that thiscircle has radius

√3

4a. Construct the circle.

7. An equilateral triangle of side2a is partitioned symmetrically intoa quadrilateral, an isosceles triangle, and two other congruent trian-gles. If the inradii of the quadrilateral and the isosceles triangle areequal, the common inradius is(

√3−√

2)a. Construct the partition.

Page 213: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 33

Construction of a triangle fromthree given points

33.1 Some examples

A

B CMa

MbMc

G

O

A

B C

I

Ta

TbTc

A

B C

H

Ha

Hb

Hc

Solve the construction problems of a triangleABC from the givendata in each case.

A1 : B, C, H B1 : B, C, I C1 : A, I, Mb

A2 : A, B, Ma B2 : A, Ma, Mb C2 : A, H, Mb

A3 : A, H, Ma B3 : A, O, H C3 : A, B, Ta

A4 : A, O, G B4 : A, I, Tb C4 : A, G, Mb

A5 : O, Mb, Mc B5 : A, Mb, Mc C5 : A, G, Hb

A1 A is the orthocenter of triangleBCH.

A2 ExtendBMa to C such thatBMa = MaC.

Page 214: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1116 Construction of a triangle from three given points

A3 Construct the parallel toAH throughMa, and the pointO on thisline such that the vectorMaO = 1

2· HA. Construct the circle

O(A). This is the circumcircle of the triangle. Construct the per-pendicular toOMa at Ma to intersect the circumcircle atB andC.

A4 Construct the circumcircleO(A). ExtendAG to Ma such thatAG :GMa = 2 : 1. JoinOMa. Construct the perpendicular toOMa atMa to intersect the circumcircle atB andC.

A5 O is the orthocenter ofMaMbMc. Therefore,Ma can be constructedas the orthocenter of triangleOMbMc. Now, construct lines throughMa, Mb, Mc parallel respectively toMbMc, McMa, MaMb. Theselines bound the required triangleABC.

B1 Let X be the perpendicular foot ofI on BC. Construct the circleI(X), then the tangents fromB andC to the circle. These tangentsintersect atA. 1

B2 Trisect the segmentAMa atG. JoinMb to G and extend it toB suchthat MbG : GB = 1 : 2. ExtendBMa to C such thatBMa =MaC.

B3 Construct the circumcircleO(A). Construct a line throughO paral-lel to AH, and on this line mark a pointMa such that the vectorOMa = 1

2·AH. The perpendicular toOMa at Ma intersects the

circumcircle atB andC.

B4 Construct the perpendicular footY of I on the lineATb and thecircle I(Y ). This is the incircle of the triangle. ConstructA(Y ) tointersect the incircle again atZ. The linesAZ andITb intersect atB. Construct the circleB(Y ) to intersect the incircle again atX.The linesBX andATb intersect atC.

B5 ExtendAMc to B such thatAMc = McB andAMb to C such thatAMb = MbC.

C2 ExtendAMb to C such thatAMb = MbC. B is the orthocenter oftriangleHAC.

C4 ExtendAMb to C such thatAMb = MbC. ExtendMbG to B suchthatGB = 2 ·MbG.

1These tangents can be constructed easily as follows. Let thecirclesB(X) andC(X) intersect the circleI(X) again atZ andY respectively. The linesBZ andCY are the tangents, and their intersection isA.

Page 215: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

33.2 Wernick’s construction problems 1117

33.2 Wernick’s construction problems

1. A, B, O L 36. A, Mb, Tc S 71. O, G, H R 106. Ma, Hb, Tc U2. A, B, Ma S 37. A, Mb, I S 72. O, G, Ta U 107. Ma, Hb, I U3. A, B, Mc R 38. A, G, Ha L 73. O, G, I U 108. Ma, H, Ta U4. A, B, G S 39. A, G, Hb S 74. O, Ha, Hb U 109. Ma, H, Tb

5. A, B, Ha L 40. A, G, H S 75. O, Ha, H S 110. Ma, H, I

6. A, B, Hc L 41. A, G, Ta S 76. O, Ha, Ta S 111. Ma, Ta, Tb

7. A, B, H S 42. A, G, Tb U 77. O, Ha, Tb 112. Ma, Ta, I S8. A, B, Ta S 43. A, G, I S 78. O, Ha, I 113. Ma, Tb, Tc

9. A, B, Tc L 44. A, Ha, Hb S 79. O, H,Ta U 114. Ma, Tb, I U10. A, B, I S 45. A, Ha, H L 80. O, H, I U 115. G, Ha, Hb U11. A, O, Ma S 46. A, Ha, Ta L 81. O, Ta, Tb 116. G, Ha, H S12. A, O, Mb L 47. A, Ha, Tb S 82. O, Ta, I S 117. G, Ha, Ta S13. A, O, G S 48. A, Ha, I S 83. Ma, Mb, Mc S 118. G, Ha, Tb

14. A, O, Ha S 49. A, Hb, Hc S 84. Ma, Mb, G S 119. G, Ha, I

15. A, O, Hb S 50. A, Hb, H L 85. Ma, Mb, Ha S 120. G, H, Ta U16. A, O, H S 51. A, Hb, Ta S 86. Ma, Mb, Hc S 121. G, H, I U17. A, O, Ta S 52. A, Hb, Tb L 87. Ma, Mb, H S 122. G, Ta, Tb

18. A, O, Tb S 53. A, Hb, Tc S 88. Ma, Mb, Ta U 123. G, TA, I

19. A, O, I S 54. A, Hb, I S 89. Ma, Mb, Tc U 124. Ha, Hb, Hc S20. A, MA, Mb S 55. A, H,Ta S 90. Ma, Mb, I S 125. Ha, Hb, H S21. A, Ma, G R 56. A, H,Tb U 91. Ma, G, Ha L 126. Ha, Hb, Ta S22. A, Ma, Ha L 57. A, H, I S 92. Ma, G, Hb S 127. Ha, Hb, Tc

23. A, Ma, Hb S 58. A, Ta, Tb S 93. Ma, G, H S 128. Ha, Hb, I

24. A, Ma, H S 59. A, Ta, I L 94. Ma, G, Ta S 129. Ha, H, I L25. A, Ma, Ta S 60. A, Tb, Tc S 95. Ma, G, Tb U 130. Ha, H, Tb U26. A, Ma, Tb U 61. A, Tb, I S 96. Ma, G, I S 131. Ha, H, I S27. A, Ma, I S 62. O, Ma, Mb S 97. Ma, Ha, Hb S 132. Ha, Ta, Tb

28. A, Mb, Mc S 63. O, Ma, G S 98. Ma, Ha, H L 133. Ha, Ta, I S29. A, Mb, G S 64. O, Ma, Ha L 99. Ma, Ha, Ta L 134. Ha, Tb, Tc

30. A, Mb, Ha L 65. O, Ma, Hb S 100. Ma, Ha, Tb U 135. Ha, Tb, I

31. A, Mb, Hb L 66. O, Ma, H S 101. Ma, Ha, I 136. H, Ta, Tb

32. A, Mb, Hc L 67. O, Ma, Ta L 102. Ma, Hb, Hc L 137. H, Ta, I

33. A, Mb, H S 68. O, Ma, Tb U 103. Ma, Hb, H S 138. Ta, Tb, Tc U34. A, Mb, Ta S 69. O, Ma, I S 104. Ma, Hb, Ta S 139. Ta, Tb, I S35. A, Mb, Tb L 70. O, G, Ha S 105. Ma, Hb, Tb S

R Redundant. Given the location of two of the points of the triple, thelocation of the third point is determined.

L Locus Restricted. Given the location of two points, the third must lieon a certain locus.

S Solvable. Known ruler and compass solutions exist for thesetriples.

U Unsolvable with ruler and compass.

Page 216: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 34

The classical triangle centers

The following triangle centers have been known since ancient times. Weshall adopt the following notations. LetABC be a given triangle. Thelengths of the sidesBC, CA, AB opposite toA, B, C are denoted bya,b, c.

34.1 The centroid

The centroidG is the intersection of the three medians. It divides eachmedian in the ratio2 : 1.

C

A

B

D

EF

G

The triangleDEF is called themedial triangle ofABC. It is theimage ofABC under the homothetyh(G,−1

2).

The lengths of the medians are given by Apollonius’ theorem:

m2a =

1

4(2b2 + 2c2 − a2),

etc.

Page 217: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1202 The classical triangle centers

Exercise

Calculate the lengths of the medians of a triangle whose sidelengths are136, 170, and174.

34.2 The circumcircle and the circumcenter

The perpendicular bisectors of the three sides of a triangleare concurrentat thecircumcenterof the triangle. This is the center of the circumcircle,the circle passing through the three vertices of the triangle.

O

C

A

B

D

EF O

C

A

B

D

Theorem 34.1(The law of sines). Let R denote the circumradius of atriangle ABC with sidesa, b, c opposite to the anglesA, B, C respec-tively.

a

sin A=

b

sin B=

c

sin C= 2R.

Since the area of a triangle is given by△ = 12bc sin A, the circumra-

dius can be written as

R =abc

4△ .

Page 218: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

34.3 The incenter and the incircle 1203

34.3 The incenter and the incircle

The internal angle bisectors of a triangle are concurrent atthe incenterof the triangle. This is the center of theincircle, the circle tangent to thethree sides of the triangle.

If the incircle touches the sidesBC, CA andAB respectively atX,Y , andZ,

AY = AZ = s− a, BX = BZ = s− b, CX = CY = s− c.

s − b

s − b

s − c

s − c

s − a

s − a

Z

X

Y

I

C

A

B

Denote byr the inradius of the triangleABC.

r =2△

a + b + c=△s

.

Page 219: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1204 The classical triangle centers

34.4 The orthocenter and the Euler line

The orthocenterH is the intersection of the three altitudes of triangleABC. These altitudes can be seen as the perpendicular bisectorsof theantimedialtriangleXY Z of ABC, which is bounded by the three lineseach passing throughA, B, C parallel to their respective opposite sides.

O

C

A

B

X

Z

Y

H G

XY Z is the image of triangleABC under the homothetyh(G,−2).It follows that H is the image ofO under the same homothety. Weconclude thatO, G, andH are collinear, andOG : GH = 1 : 2.

The line containingO, G, H is the famous Euler line of triangleABC.

Page 220: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

34.5 The excenters and the excircles 1205

34.5 The excenters and the excircles

The internal bisector of each angle and theexternalbisectors of the re-maining two angles are concurrent at anexcenterof the triangle. Anexcirclecan be constructed with this as center, tangent to the lines con-taining the three sides of the triangle.

Z

X

Y

Ic

Ib

Ia

C

A

B

The exradii of a triangle with sidesa, b, c are given by

ra =△

s− a, rb =

△s− b

, rc =△

s− c.

Exercise

1. Given a triangleABC, construct a triangle whose sides have thesame lengths as the medians ofABC.

2. Construct the incircle of triangleABC, and mark the points of con-tactX on BC, Y on CA, andZ on AB. Are the linesAX, BY ,CZ concurrent? If so, is their intersection the incenter of triangleABC?

3. Given three non-collinear points as centers, construct three circlesmutually tangent to each other externally.

4. Let D, E, F be the midpoints ofBC, CA, AB of triangleABC.Construct the circumcircle ofDEF . This is called thenine-point

Page 221: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1206 The classical triangle centers

circle of triangle ABC. Construct also the incircle of triangleABC. What do you observe about the two circles? How wouldyou justify your observation?

5. Construct the circle through the excenters of triangleABC. How isits center related to the circumcenter and incenter of triangleABC?

Page 222: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 35

The nine-point circle

35.1 The nine-point circle

The following nine points associated with a triangle are on acircle whosecenter is the midpoint between the circumcenter and the orthocenter:(i) the midpoints of the three sides,(ii) the pedals (orthogonal projections) of the three vertices on their op-posite sides,(iii) the midpoints between the orthocenter and the three vertices.

N O

H

D

EF

G

Ec

Ea

Eb

X

Y

Z

A

B C

Proof. (1) Let N be the circumcenter of the inferior triangleDEF .SinceDEF andABC are homothetic atG in the ratio1 : 2, N , G,O are collinear, andNG : GO = 1 : 2. SinceHG : GO = 2 : 1, thefour are collinear, and

HN : NG : GO = 3 : 1 : 2,

Page 223: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1208 The nine-point circle

andN is the midpoint ofOH.(2) Let X be the pedal ofH on BC. SinceN is the midpoint of

OH, the pedal ofN is the midpoint ofDX. Therefore,N lies on theperpendicular bisector ofDX, andNX = ND. Similarly,NE = NY ,andNF = NZ for the pedals ofH on CA andAB respectively. Thismeans that the circumcircle ofDEF also containsX, Y , Z.

(3) Let Ea, Eb, Ec be the midpoints ofAH, BH, CH respectively.The triangleEaEbEc is homothetic toABC at H in the ratio1 : 2.Denote byN ′ its circumcenter. The pointsN ′, G, O are collinear, andN ′G : GO = 1 : 2. It follows thatN ′ = N , and the circumcircle ofDEF also containsEa, Eb, Ec.

This circle is called thenine-point circle of triangleABC. Its centerN is called the nine-point center. Its radius is half of the circumradius ofABC.

35.2 Feuerbach’s theorem

The nine-point circle of a triangle is tangent internally tothe incircle,and externally to each of the excircles.

A

B C

I

Ia

Ib

Ic

Aa

Ba

Ca

Ab

Bb

Cb

Ac

Bc

Cc

Fc

Fa

FbF

I

N

Page 224: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

35.3 Lewis Carroll’s unused geometry pillow problem 1209

35.3 Lewis Carroll’s unused geometry pillow problem

According to [Rowe], one of the pillow problems Lewis Carroll had at-tempted but did not include in his collection of pillow problems was thefollowing.

Given a triangleABC, to find, by paper folding, a lineℓ whichintersectsAC andAB at Y andZ respectively) such that ifA′ is the reflection ofA in ℓ , then the reflections ofB in A′Zand ofC in A′Y coincide.

W

C

A

B

A′

Y

Z

The pointW is both the reflection ofB in A′Y , and that ofC inA′Z. It follows thatA′B = A′W = A′C, andA′ is on the perpendicularbisector ofBC.

Page 225: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1210 The nine-point circle

Consider thedirectedangle∠BA′C. This is

∠BA′C =∠BA′W + ∠WA′C

=2∠Y A′W + 2∠WA′Z

=2∠Y A′Z

=− 2∠Y AZ

sinceA′Y AZ is a kite. This means that∠BA′C = −2∠BAC. Thereflection ofA′ in the sideBC is therefore the pointQ on the perpen-dicular bisector such that∠BQC = 2∠BAC, which is necessarily thecircumcenterO of triangleABC. We therefore conclude thatA′ is thereflection of the circumcenterO in the sideBC, and the reflection lineℓis the perpendicular bisector of the lineAA′.

O

D

H

C

A

B

N

A′

Let D be the midpointBC andH the orthocenter of triangleABC.In a standard proof of the Euler line theorem, it is established thatAH =2OD, 1 and that the midpoint ofOH is the nine-point center of triangleABC. This means thatAH = OA′, andAOA′H is a parallelogram. Itfollows that the midpoint ofAA′ is the same as that ofOH, the nine-point centerN of triangleABC. The Lewis Carroll paper-folding lineis the perpendicular toAN at N .

1AH = 2 · OD = 2R cos A, whereR is the circumradius of triangleABC.

Page 226: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

35.4 Johnson’s theorem 1211

35.4 Johnson’s theorem

Theorem 35.1.Three congruent circles with centersA, B, C have acommon pointO. The three pairwise intersections (apart fromO) lie ona circle congruent to the given ones.

A

B C

A′

B′C′

N

H

O

Proof. Let A′ = (B)∩ (C), B′ = (C)∩ (A), andC ′ = (A)∩ (B), apartfrom the common pointO.A′ is the reflection ofO in BC. As such, it is the reflection ofA inthe nine-point centerN ; similarly for B′ andC ′. Therefore,A′B′C ′

and ABC are oppositely congruent atN , and their circumcircles arecongruent, which are congruent to the given circles.

Page 227: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1212 The nine-point circle

35.5 Triangles with nine-point center on the circumcir-cle

Begin with a circle, centerO and a pointN on it, and construct a familyof triangles with(O) as circumcircle andN as nine-point center.

(1) Construct the nine-point circle, which has centerN , and passesthrough the midpointM of ON .

(2) Animate a pointD on the minor arc of the nine-point circleinsidethe circumcircle.

(3) Construct the chordBC of the circumcircle withD as midpoint.(This is simply the perpendicular toOD atD).

(4) LetX be the point on the nine-point circle antipodal toD. Com-plete the parallelogramODXA (by translating the vectorDO to X).

The pointA lies on the circumcircle and the triangleABC has nine-point centerN on the circumcircle.

Here is a curious property of triangles constructed in this way: letA′,B′, C ′ be the reflections ofA, B, C in their own opposite sides. Thereflection triangleA′B′C ′ degenerates,i.e., the three pointsA′, B′, C ′

are collinear.2

Exercise

1. Let H be the orthocenter of triangleABC. Show that the Eulerlines of trianglesABC, HBC, HCA andHAB are concurrent.3

2. For what triangles is the Euler line parallel (respectivelyperpendic-ular) to an angle bisector?4

3. Let P be a point on the circumcircle. What is the locus of themidpoint ofHP? Why?

2O. Bottema,Hoofdstukken uit de Elementaire Meetkunde, Chapter 16.3Hint: find a point common to them all.4The Euler line is parallel (respectively perpendicular) tothe bisector of angleA if and only if α = 120◦

(respectively60◦).

Page 228: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 36

The excircles

36.1 A relation among the radii

ra + rb + rc = 4R + r.

ra

r

rc

rb

D

I

A

B C

Ic

Ia

Ib

O

M

M′

ra − r =2DM ′,

rb + rc =2MD = 2(2R−DM ′);

ra + rb + rc − r =4R.

Page 229: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1214 The excircles

36.2 The circumcircle of the excentral triangle

The circle through the excenters has center at the reflectionof the incen-ter in the circumcenter, and radius twice the circumradius.

A

B C

Ic

Ia

Ib

O O′

X′D

I

O′Ia =ra + O′X ′

=ra + 2OD − r

=ra + 2(R−DM ′)− r (from previous page)

=ra + 2R− (ra − r)− r

=2R.

Similarly, O′Ib = O′Ic = 2R.

Page 230: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

36.3 The radical circle of the excircles 1215

36.3 The radical circle of the excircles

The circle orthogonal to each of the excircles has center at the Spiekerpoint, the incenter of the medial triangle. Its radius is1

2

√r2 + s2.

A

B C

I′I

Page 231: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1216 The excircles

36.4 Apollonius circle: the circular hull of the excircles

I′

A

B C

Fc

Fa

Fb

F ′a

f′b

F ′c

N

Page 232: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

36.5 Three mutually orthogonal circles with given centers 1217

36.5 Three mutually orthogonal circles with given cen-ters

Given three pointsA, B, C that form an acute-angled triangle, constructthree circles with these points as centers that are mutuallyorthogonal toeach other.

A

B C

Y

X

Z

HF

D

E

Solution. Let BC = a, CA = b, andAB = c. If these circles haveradii ra, rb, rc respectively, then

r2b + r2

c = a2, r2c + r2

a = b2, r2a + r2

b = c2.

From these,

r2a =

1

2(b2+c2−a2), r2

b =1

2(c2+a2−b2), r2

c =1

2(a2+b2−c2).

These are all positive sinceABC is an acute triangle. Consider theperpendicular footE of B on AC. Note thatAE = c cos A, so thatr2a = 1

2(b2 + c2 − a2) = bc cos A = AC · AE. It follows if we extend

BE to intersect atY the semicircle constructed externally on the sideAC as diameter, then,AY 2 = AC · AE = r2

a. Therefore we have thefollowing simple construction of these circles. (1) With each side asdiameter, construct a semicircle externally of the triangle. (2) Extendthe altitudes of the triangle to intersect the semicircles on the same side.Label theseX, Y , Z on the semicircles onBC, CA, AB respectively.These satifyAY = AZ, BZ = BX, andCX = CY . (3) The circlesA(Y ), B(Z) andC(X) are mutually orthogonal to each other.

Page 233: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 37

The Arbelos

37.1 Archimedes’ twin circle theorem

Theorem 37.1.The two circles each tangent toCP , the largest semi-circle AB and one of the smaller semicircles have equal radiit, givenby

t =ab

a + b.

A BOO1 O2P A BOO1 O2P

Q

Proof. Consider the circle tangent to the semicirclesO(a + b), O1(a),and the linePQ. Denote byt the radius of this circle. Calculating in twoways the height of the center of this circle above the lineAB, we have

(a + b− t)2 − (a− b− t)2 = (a + t)2 − (a− t)2.

From this,

t =ab

a + b.

The symmetry of this expression ina andb means that the circle tangentto O(a + b), O2(b), andPQ has the same radiust.

Page 234: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1302 The Arbelos

37.2 Incircle of the arbelos

Theorem 37.2(Archimedes). The circle tangent to each of the threesemicircles has radius given by

ρ =ab(a + b)

a2 + ab + b2.

A BOO1 O2P

C

X

Y

Proof. Let ∠COO2 = θ. By the cosine formula, we have

(a + ρ)2 = (a + b− ρ)2 + b2 + 2b(a + b− ρ) cos θ,(b + ρ)2 = (a + b− ρ)2 + a2 − 2a(a + b− ρ) cos θ.

Eliminatingθ, we have

a(a + ρ)2 + b(b + ρ)2 = (a + b)(a + b− ρ)2 + ab2 + ba2.

The coefficients ofρ2 on both sides are clearly the same. This is a linearequation inρ:

a3 + b3 + 2(a2 + b2)ρ = (a + b)3 + ab(a + b)− 2(a + b)2ρ,

from which

4(a2 + ab + b2)ρ = (a + b)3 + ab(a + b)− (a3 + b3) = 4ab(a + b),

andρ is as above.

Page 235: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

37.2 Incircle of the arbelos 1303

Theorem 37.3(Leon Bankoff). If the incircleC(ρ) of the arbelos touchesthe smaller semicircles atX andY , then the circle through the pointsP , X, Y has the same radius as the Archimedean circles.

A BOO1 O2P

C

Z

X

Y

Proof. The circle throughP , X, Y is clearly the incircle of the triangleCO1O2, since

CX = CY = ρ, O1X = O1P = a, O2Y = O2P = b.

The semiperimeter of the triangleCO1O2 is

a + b + ρ = (a + b) +ab(a + b)

a2 + ab + b2=

(a + b)3

a2 + ab + b2.

The inradius of the triangle is given by√

abρ

a + b + ρ=

ab · ab(a + b)

(a + b)3=

ab

a + b.

This is the same ast, the common radius of Archimedes’ twin circles.

Page 236: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1304 The Arbelos

37.2.1 Construction of incircle of arbelos

LetQ1 andQ2 be the “highest” points of the semicirclesO1(a) andO2(b)respectively. The intersection ofO1Q2 andO2Q1 is a pointC3 “above”P , andC3P = ab

a+b= t. This gives a very easy construction of Bankoff’s

circle in Theorem 37.3 above. From this, we obtain the pointsX andY .The center of the incircle of the arbelos is the intersectionC of the linesO1X andO2Y . The incircle of the arbelos is the circleC(X). It touchesthe largest semicircle of the shoemaker atZ, the intersection ofOC withthis semicircle.

A BOO1 O2P

C

X

YC3

Q1

Q2

Z

Note thatC3(P ) is the Bankoff circle, which has the same radius asthe Archimedean circles.

37.3 Archimedean circles in the arbelos

Let UV be the external common tangent of the semicirclesO1(a) andO2(b), which extends to a chordHK of the semicircleO(a + b). Let C4

be the intersection ofO1V andO2U . Since

O1U = a, O2V = b, and O1P : PO2 = a : b,

C4P = aba+b

= t. This means that the circleC4(t) passes throughP andtouches the common tangentHK of the semicircles atN .

Let M be the midpoint of the chordHK. SinceO andP are sym-metric (isotomic conjugates) with respect toO1O2,

OM + PN = O1U + O2V = a + b.

it follows that(a + b)−QM = PN = 2t. From this, the circle tangentto HK and the minor arcHK of O(a + b) has radiust. This circletouches the minor arc at the pointQ.

Page 237: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

37.3 Archimedean circles in the arbelos 1305

A BOO1 O2P

N

U

V

H

K

C4

M

C5

Theorem 37.4(Thomas Schoch). The incircle of the curvilinear trianglebounded by the semicircleO(a+b) and the circlesA(2a) andB(2b) hasradiust = ab

a+b.

A BOO1 O2P

S

Proof. Denote this circle byS(x). Note thatSO is a median of thetriangleSO1O2. By Apollonius theorem,

(2a + x)2 + (2b + x)2 = 2[(a + b)2 + (a + b− x)2].

From this,

x =ab

a + b= t.

Exercise

(1) The circles(C1) and(C ′1) are each tangent to the outer semicircle of

the arbelos, and toOQ1 at Q1; similarly for the circles(C2) and(C ′2).

Page 238: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1306 The Arbelos

Show that they have equal radiit = aba+b

.

C1

C2

C′1

C′2

A BOO1 O2P

Q1

Q2

(2) We call the semicircle with diameterO1O2 themidwaysemicircleof the arbelos.

Show that the circle tangent to the linePQ and with center at theintersection of(O1) and the midway semicircle has radiust = ab

a+b.

C

C′

A BO PO1 O2

Q

(3) Show that the radius of the circle tangent to the midway semi-circle, the outer semicircle, and with center on the linePQ has radiust = ab

a+b.

C

A BO PO1 O2

Q

Page 239: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

37.4 Constructions of the incircle 1307

37.4 Constructions of the incircle

A BOO1 O2P

O3

Z

X Y

M

N

L

A BOO1 O2P

O3

Z

XY

M

N

L

S

A BPOO1 O2

O3

Z

XY

O

L′ A BOO1 O2P

O3

Z

XY

M

N

L

M′

N′

Page 240: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1308 The Arbelos

Page 241: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 38

Menelaus and Ceva theorems

38.1 Menelaus’ theorem

Theorem 38.1(Menelaus). Given a triangleABC with pointsX, Y ,Z on the side linesBC, CA, AB respectively, the pointsX, Y , Z arecollinear if and only if

BX

XC· CY

Y A· AZ

ZB= −1.

A

B CX

Y

Z

W

Proof. (=⇒) Let W be the point onAC such thatBW//XY . Then,

BX

XC=

WY

Y C, and

AZ

ZB=

AY

Y W.

It follows that

BX

XC· CY

Y A· AZ

ZB=

WY

Y C· CY

Y A· AY

Y W=

CY

Y C· AY

Y A· WY

Y W= −1.

Page 242: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1310 Menelaus and Ceva theorems

(⇐=) Suppose the line joiningX andZ intersectsAC at Y ′. Fromabove,

BX

XC· CY ′

Y ′A· AZ

ZB= −1 =

BX

XC· CY

Y A· AZ

ZB.

It follows thatCY ′

Y ′A=

CY

Y A.

The pointsY ′ andY divide the segmentCA in the same ratio. Thesemust be the same point, andX, Y , Z are collinear.

Example 38.1.The external angle bisectors of a triangle intersect theiropposite sides at three collinear points.

a

bc

B

C

A

Y ′

Z′

X′

Proof. If the external bisectors areAX ′, BY ′, CZ ′ with X ′, Y ′, Z ′ onBC, CA, AB respectively, then

BX ′

X ′C= −c

b,

CY ′

Y ′A= −a

c,

AZ ′

Z ′B= − b

a.

It follows that BX′

X′C· CY ′

Y ′A· AZ′

Z′B= −1 and the pointsX ′, Y ′, Z ′ are

collinear.

Page 243: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

38.2 Ceva’s theorem 1311

38.2 Ceva’s theorem

Theorem 38.2(Ceva). Given a triangleABC with pointsX, Y , Z onthe side linesBC, CA, AB respectively, the linesAX, BY , CZ areconcurrent if and only if

BX

XC· CY

Y A· AZ

ZB= +1.

P

X

Y

Z

A

B C

Proof. (=⇒) Suppose the linesAX, BY , CZ intersect at a pointP .Consider the lineBPY cutting the sides of triangleCAX. By Menelaus’theorem,

CY

Y A· AP

PX· XB

BC= −1, or

CY

Y A· PA

XP· BX

BC= +1.

Also, consider the lineCPZ cutting the sides of triangleABX. ByMenelaus’ theorem again,

AZ

ZB· BC

CX· XP

PA= −1, or

AZ

ZB· BC

XC· XP

PA= +1.

Multiplying the two equations together, we have

CY

Y A· AZ

ZB· BX

XC= +1.

(⇐=) Exercise.

Page 244: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1312 Menelaus and Ceva theorems

Example 38.2.(1) The centroid. If D, E, F are the midpoints of thesidesBC, CA, AB of triangleABC, then clearly

AF

FB· BD

DC· CE

EA= 1.

The mediansAD, BE, CF are therefore concurrent. Their intersectionis thecentroidG of the triangle.

CB

A

G

F

D

E

Consider the lineBGE intersecting the sides of triangleADC. Bythe Menelaus theorem,

−1 =AG

GD· DB

BC· CE

EA=

AG

GD· −1

2· 11.

It follows that AG : GD = 2 : 1. The centroid of a triangle divideseach median in the ratio 2:1.

(2) The incenter. Let X, Y , Z be points onBC, CA, AB such thatAX, BY , CZ bisect anglesBAC, CBA andACB respectively. Then

AZ

ZB=

b

a,

BX

XC=

c

b,

CY

Y A=

a

c.

CB

A

IZ

X

Y

It follows thatAZ

ZB· BX

XC· CY

Y A=

b

a· cb· ac

= +1,

andAX, BY , CZ are concurrent. Their intersection is theincenterofthe triangle.

Page 245: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

38.2 Ceva’s theorem 1313

(3) In triangleABC, A = 5π8

, B = π4, andC = π

8. Prove that the

A-altitude, theB-bisector, and theC-median are concurrent.

B C

A

X

Y

Z

Solution. SupposeAX = 1. Consider the two squaresAXBP andAXTY .

P Q

TB C

A

X

Y

Z

Note that triangleATC is isosceles since∠TAC = ∠ATX−∠ACB =π4− π

8= π

8= C. Therefore,

BX

XC=

1

1 +√

2,

CY

Y A=

BC

BA=

2 +√

2√2

= 1 +√

2.

SinceZ is the midpoint ofAB,

BX

XC· CY

Y A· AZ

ZB= 1.

The three linesAX, BY , CZ are concurrent by Ceva’s theorem.

Page 246: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1314 Menelaus and Ceva theorems

Exercise

1. Given triangleABC with a = 15, b = 14, c = 9.(a) Find pointsX onBC, Y onCA, andZ onAB such thatBX =CY = AZ andAX, BY , CZ are concurrent.(b) Find also pointsX ′ onBC, Y ′ onCA, andZ ′ onAB such thatX ′C = Y ′A = Z ′B andAX ′, BY ′, CZ ′ are concurrent.

A

B CX

Z

Y

P

A

B C

Q

X′

Y ′Z′

2. ABC is a right triangle. Show that the linesAX, BY , andCQ areconcurrent.

Q

PA B

C

Z Z′

Y

Y ′

X′

X

Page 247: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

38.2 Ceva’s theorem 1315

3. ABC is a triangle withBC = 12, CA = 13, andAB = 15. Showthat the medianAD, angle bisectorBE, and the altitudeCF areconcurrent.

B A

C

F

E

D

P

4. Given three circles with centersA, B, C and distinct radii, showthat the exsimilicenters of the three pairs of circles are collinear.

A

B

C

X

Y

Z

Page 248: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1316 Menelaus and Ceva theorems

Page 249: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 39

Routh and Ceva theorems

39.1 Barycentric coordinates

In a given triangleABC, every pointP is coordinatized by a triple ofnumbers(x : y : z) in such a way that the system of massesx at A, yat B, andz at C will have itsbalance pointat P . A massy at B and amassz at C will balance at the pointX on the lineBC. A massx at Aand a massy + z atX will balance at the pointP .

(y + z)X = yB + zC,

(x + y + z)P = xA + (y + z)X = xA + yB + zC.

We say that with reference to triangleABC, the pointP has

(i) absolutebarycentric coordinatexA + yB + zC

x + y + zand

(ii) homogeneousbarycentric coordinates(x : y : z).

C(massz)B(massy)

A(massx)

P balance

CB

A(massx)

P balance

Z

X(massy + z)

Y

Page 250: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1318 Routh and Ceva theorems

39.2 Cevian and traces

Let P be a point with homogeneous barycentric coordinates(x : y :z) with reference to triangleABC. The three lines joining a pointPto the vertices of the reference triangleABC the ceviansof P . TheintersectionsX, Y , Z of these cevians with the side lines are called thetracesof P . The coordinates of the traces can be very easily writtendown:

X = (0 : y : z), Y = (x : 0 : z), Z = (x : y : 0).

CB

A

P

Z

X

Y

Theorem 39.1(Ceva theorem). Three pointsX, Y , Z onBC, CA, ABrespectively are the traces of a point if and only if they havecoordinatesof the form

X = 0 : y : z,Y = x : 0 : z,Z = x : y : 0,

for somex, y, z.

Page 251: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

39.2 Cevian and traces 1319

Example 39.1. The centroid. The midpoint points of the sides havecoordinates

X = (0 : 1 : 1),Y = (1 : 0 : 1),Z = (1 : 1 : 0).

The centroidG has coordinates(1 : 1 : 1).

CB

A

G

Z

X

Y

Example 39.2.The incenter

CB

A

I

Z

X

Y

The traces of the incenter have coordinates

X = (0 : b : c),Y = (a : 0 : c),Z = (a : b : 0).

The incenterI has coordinatesI = (a : b : c).

Page 252: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1320 Routh and Ceva theorems

39.3 Area and barycentric coordinates

Theorem 39.2. If in homogeneous barycentric coordinates with refer-ence to triangleABC, P = (x : y : z), then

∆PBC : ∆APC : ∆ABP = x : y : z.

CB

A(massx)

P balance

Z

X(massy + z)

Y

Proof. Consider the traceX of P on BC. Since a massx at A and amassy + z atX balance atP , AP : PX = y + z : x, andPX : AX =x : x + y + z. It follows that

∆PBC : ∆ABC = PX : AX = x : x + y + z.

Similarly,∆APC : ∆ABC = y : x+y + z and∆ABP : ∆ABC =z : x + y + z. Combining these, we have

x : y : z = ∆PBC : ∆APC : ∆ABP.

Because of this theorem, homogeneous barycentric coordinates arealso known asarealcoordinates.

Page 253: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

39.3 Area and barycentric coordinates 1321

A useful area formula

If for i = 1, 2, 3, Pi = xi · A + yi · B + zi · C (in absolute barycentriccoordinates), then the area of the oriented triangleP1P2P3 is

∆P1P2P3 =

∣∣∣∣∣∣

x1 y1 z1

x2 y2 z2

x3 y3 z3

∣∣∣∣∣∣

·∆ABC.

Example 39.3.Let X, Y , Z be points onBC, CA, AB such thatBX :XC = 2 : 1, CY : Y A = 5 : 3, AZ : ZB = 3 : 2. (The numbersindicated along the lines are proportions of lengths, and are not actuallengths).

2 1

5

3

3

2

A

B CX

Z

Y

Their homogeneous barycentric coordinates areX = 0 : 1 : 2, Y =3 : 0 : 5, andZ = 2 : 3 : 0.

∆XY Z =1

3· 18· 15

∣∣∣∣∣∣

0 1 23 0 52 3 0

∣∣∣∣∣∣

∆ABC =28

120∆ABC =

7

30∆ABC.

Page 254: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1322 Routh and Ceva theorems

Example 39.4.With the same pointsX, Y , Z in the preceding example,the linesAX, BY , CZ bound a trianglePQR. Suppose triangleABChas area∆. Find the area of trianglePQR.

2 1

5

3

3

2

A

B CX

Z

Y

P

Q

R

We have already known the coordinates ofX, Y , Z. From these, it iseasy to find those ofP , Q, R:

P = BY ∩ CZ Q = CZ ∩AX R = AX ∩ BY

Y = (5 : 0 : 3) Z = (2 : 3 : 0) X = (0 : 1 : 2)Z = (2 : 3 : 0) X = (0 : 1 : 2) Y = (5 : 0 : 3)

P = (10 : 15 : 6) Q = (2 : 3 : 6) R = (10 : 3 : 6)

This means that theabsolute barycentric coordinatesof X, Y , Z are

P =1

31(10A + 15B + 6C), Q =

1

11(2A + 3B + 6C), R =

1

19(10A + 3B + 6C).

The area of trianglePQR

=1

31 · 11 · 19

∣∣∣∣∣∣

10 15 62 3 610 3 6

∣∣∣∣∣∣

·∆ =576

6479∆.

Page 255: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

39.3 Area and barycentric coordinates 1323

Exercise

1. ABC is a triangle of area1, andA1, A2, B1, B2, C1, C2 are thepoints of trisection ofBC, CA andAB respectively. Which of thetwo areas is larger, the one bounded by three linesAA1, BB1, CC1

or the one bounded by the four linesBB1, BB2, CC1, CC2?

A

B C

B1

C1

A1

A

B C

B1

B2C1

C2

2. Let X, Y , Z be points dividingBC, CA, AB in the golden ratio.Let P be the intersection ofBY andCZ, Q thatCZ andAX, andR that ofAX andBY . Show that(i) P , Q, R are respectively the midpoints ofBY , CZ, AX;(ii) P dividesQC in the golden ratio; so doQ andR divide RAandPB.(iii) Compare the areas of trianglesXY Z andPQR. 1

1Crux Math. Problem 3609. Answer:4.

Page 256: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 40

Elliptic curves

40.1 A problem from Diophantus

Problem IV.24 of Diophantus’Arithmetica: To divided a given numberinto two parts such that the product is a cube minus its side.Solution. Given number6. First partx; therefore second =6− x, and6x − x2 = a cube minus its side. Form a cube from a side of the formmx − 1, say,2x − 1, and equate6x − x2 to this cube minus its side.Therefore,8x3 − 12x2 + 4x = 6x − x2. Now, if the coefficient ofxwere the same on both sides, this would reduce to a simple equation,amdx would be rational. In order that this may be the case, we must putm for 2 in our assumption, where3m −m = 6 (the 6 being the givennumber in the original hypothesis). Thus,m = 3. We therefore assume(3x− 1)3 − (3x− 1) = 6x− x3, or 27x3 − 27x2 + 6x = 6x− x2, andx = 26

27. The parts are26

27and 136

27.

Remark.This problem seeksrational solutions of the equation

y3 − y = 6x− x2.

Clearly, (0,−1) is a rational Solution. The line throughP (0,−1)with slopem (assumed rational) has equationy = mx − 1. This linecuts the curveE : y3 − y = x2 − 6x at three points, one of which is(0,−1).

In general, there is no guarantee that any of the remaining two pointsis rational. However, if this line is tangent toE, then the point of tan-gency being counted twice, it is clear that the remaining point is rational.

Page 257: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1402 Elliptic curves

P

Q

R

S

T

The tangent toE atP (0,−1) turns out to bey = 3x− 1 (exercise), andwe obtainQ(26

27, 17

9) for the third point.

Exercise

1. Note thatR(0, 1) is also a point on the curveE : y3− y = 6x−x2.Find the coordinates of the intersectionS of E with the tangent atR.

Answer.(−28

27, −19

9

).

2. Find the intersection of the curveE with the linePS.

Answer.(

378125

, 5625

).

3. Use the method of Arithmetica IV.24 to find a rational point ony2 = x3 + 2, starting with(−1, 1).

Answer. (174, 71

8).

Page 258: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

40.2 Dudeney’s puzzle of the doctor of physic 1403

40.2 Dudeney’s puzzle of the doctor of physic

The Doctor of physic produced two spherical phials, and pointed outthat one phial was exactly one foot in circumference, and theother twofeet in circumference. “I do wish,” said the Doctor, “to havethe exactmeasures of two other phials, of a like shape but different insize, thatmay together contain just as much liquid as is contained by these two”.

This is solving the equation

x3 + y3 = 13 + 23

in rational numbers.

A

B

C

D

Beginning with the pointA(1, 2), by the method of tangents we ob-tain

B =

(

−17

7,

20

7

)

,

C =

(188479

90391, −36520

90391

)

,

D =

(1243617733990094836481

609623835676137297449,

487267171714352336560

609623835676137297449

)

.

Since the coordinates ofD are both positive, they give a solution tothe puzzle of the Doctor of physic.

Page 259: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1404 Elliptic curves

Exercise

Here is Dudeney’s silver cubes puzzle:Master Herbert brought with him two cubes of solid silver that be-

longed to his mother. He showed that, as they measured two inchesevery way, each contained eight cubic inches of silver, and therefore thetwo contained together sixteen cubic inches. He wanted to know: couldanybody give him exact dimensions for two cubes that should togethercontain just seventeen cubic inches of silver?

This amounts to find a positive rational solution ofx3 + y3 = 17.

1. Verify that183−13 = 17·73 and find a point on the curvex3+y3 =17 with rational coordinates.

2. Make use of the point in (1) above to find a point on the curvex3 + y3 = 17 with positive rational coordinates.

40.3 Group law ony2 = x3 + ax2 + bx + c

Consider an elliptic curve

(E) y2 = f(x) := x3 + ax2 + bx + c.

We shall write a pointP on (E) in the formP = (x[P ], y[P ]), and putthe identity at a point of infinity, so that

y[−P ] = −y[P ].

P

Q

P ∗ Q

P + Q

Page 260: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

40.3 Group law ony2 = x3 + ax2 + bx + c 1405

Consider a line of slopem passing throughP . It has equationy − y[P ] = m(x − x[P ]). It intersects the elliptic curve(E) at pointswhosex-coordinates are the roots of the equation

(mx + (y[P ]−mx[P ]))2 = x3 + ax2 + bx + c,

or equivalently,

x3−(m2−a)x2−(2m(y[P ]−mx[P ])−b)x+c−(y[P ]−mx[P ])2 = 0.

Since the sum of the three roots of the cubic ism2 − a, we make thefollowing conclusions.

(1) If the line is the tangent atP , then(i) m = f ′(x[P ])

2y[P ],

(ii) the third intersection hasx-coordinate

m2 − a− 2x[P ] =f ′(x[P ])2

4y[P ]2− a− 2x[P ]

=x[P ]4 − 2bx[P ]2 − 8cx[P ] + (b2 − 4ac)

4y[P ]2

=x[P ]4 − 2bx[P ]2 − 8cx[P ] + (b2 − 4ac)

4(x[P ]3 + ax[P ]2 + bx[P ] + c).

They-coordinate can be computed from the equation of the line.

x[2P ] =x[P ]4 − 2bx[P ]2 − 8cx[P ] + (b2 − 4ac)

4(x[P ]3 + ax[P ]2 + bx[P ] + c).

(2) If the line joins two pointsP1 andP2 on (E), then(i) m = y[P1]−y[P2]

x[P1]−x[P2];

(ii) the third intersection hasx-coordinate

m2 − a− x[P1]− x[P2]

=

(y[P1]− y[P2]

x[P1]− x[P2]

)2

− a− (x[P1] + x[P2])

=x[P1]x[P2](x[P1] + x[P2] + 2a) + b(x[P1] + x[P2]) + 2c− 2y[P1]y[P2]

(x[P1]− x[P2])2.

They-coordinate can be computed from the equation of the line.

Page 261: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1406 Elliptic curves

Page 262: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 41

Applications of elliptic curves togeometry problems

41.1 Pairs of isosceles triangle and rectangle with equalperimeters and equal areas

The isosceles(5, 5, 6) and the rectangle6×2 both have perimeter16 andarea12.

More generally, we seek an isosceles triangle and a rectangle, bothwith integer sidelengths and have equal perimeters and equal areas.

An isosceles triangle with sides(m2 + n2, m2 + n2, 2(m2− n2) hasperimeter4m2, height2mn, and area2mn(m2 − n2). A rectangle ofinteger dimensionsp× q has the same perimeter and area as the triangleif and only if

p + q = 2m2,

pq = 2mn(m2 − n2).

Note that(p− q)2 = (p + q)2− 4pq = 4m4− 8mn(m2− n2). If we put

x =2n

m, y =

p− q

m2,

this condition becomes

y2 = x3 − 4x + 4.

Page 263: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1408 Applications of elliptic curves to geometry problems

(1) Clearly, the point(1, 1) is on the curve. With1 = 2nm

, we takem = 2, n = 1. This gives the isosceles triangle(5, 5, 6) and rectangle6× 2 as above.

(2) There is another obvious pointP = (2, 2). Indeed, on the ellipticcurve2P = (0, 2), 3P = (−2,−2), 4P = (1,−1).

k ±kP (m, n) side and base p × q perimeter, area

−4 (1, 1) (2, 1) 5, 6 2 × 6 (16, 12)

7(

10

9, 26

27

)(9, 5) 106, 112 42 × 120 (324, 5040)

−10(

88

49, 554

343

)(49, 44) 4337, 930 462 × 4340 (9604, 2005080)

13(

206

961, 52894

29791

)(961, 103) 934130, 1825824 103664 × 1743378 (3694084, 180725536992)

−15(

9362

10609, 1175566

1092727

)(10609, 4681) 134462642, 181278240 52009232 × 173092530

Page 264: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

41.2 Triangles with a median, an altitude, and an angle bisector concurrent 1409

41.2 Triangles with a median, an altitude, and an anglebisector concurrent

Given triangleABC, the altitude onBC, the bisector of angleB and themedian onAB are concurrent if and only if

cos β =a

c + a.

B C

A

D

E

F

P

By the law of cosines,cos β = c2+a2−b2

2ca, we have

a3 − ab2 − a2c− b2c + ac2 + c3 = 0.

By puttinga = 1, b = x andc = y, we have

1− x2 − y − x2y + y2 + y3 = 0.

Clearly,P = (1, 1) is a point on the curve, corresponding to the equi-lateral triangle. On the other hand, withx = −1 the equation becomesy(y − 1)(y + 2) = 0. This gives the pointQ = (−1,−2) on the curve.The linePQ has equation3x − 2y = 1. Substitutingy = 1

2(3x − 1)

into the cubic equation, we obtain18(x− 1)(x + 1)(15x− 13) = 0. The

line PQ intersects the curve again at(

1315

, 45

). This yields the triangle

(a, b, c) = (15, 13, 12).Further examples are(a, b, c) = (308, 277, 35), (3193, 26447, 26598).

Page 265: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1410 Applications of elliptic curves to geometry problems

Page 266: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 42

Integer triangles with analtitude equal to a bisector

42.1 A quartic equation

Consider triangleABC with altitudeAX equal to the bisectorBY .

a

c

c

A

B CXX′

Y

If CB is extended toX ′ such thatBX ′ = BA, thenAX ′ is parallelto Y B and

sinB

2=

AX

AX ′ =BY

AX ′ =BC

X ′C=

a

c + a.

Sincecos B = 1− 2 sin2 B2, by the law of cosines, we have

b2 = c2 + a2 − 2ca

(

1− 2a2

(c + a)2

)

b2(c + a)2 = (c2 − a2)2 + 4ca3.

Page 267: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1412 Integer triangles with an altitude equal to a bisector

We seekintegertriangles satisfying this condition.

If we putu = ca

andv = b(c+a)a2 , this equation becomes

v2 = (u2 − 1)2 + 4u

= u4 − 2u2 + 4u + 1.

Note thata : b : c is determined byu andv:

a : b : c = 1 + u : v : u(1 + u).

u

v

O′

P

Q

Since the geometric problem has an obvious solution(a, b, c) = (1, 1, 1),we have a rational point on the quartic curve, namely,O′ = (1, 2).

The tangent atO′ is the linev = u + 1. It intersects the curve againat two points,P = (0, 1) andQ = (−2,−1). None of these pointscorresponds to a genuine triangle.

The tangent atP , being the linev = 2u + 1, intersects the quarticcurve again at two points. These, however, are not rational points. 1

Likewise, the tangent atQ, being the linev = 10u + 19, intersects thecurve again at two irrational points.

1These are the points±(√

6, 1 + 2√

6), corresponding to the trianglea : b : c = 1 +√

6 : 1 + 2√

6 :6 +

√6.

Page 268: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

42.2 Transformation of a quartic equation into an elliptic curve 1413

42.2 Transformation of a quartic equation into an el-liptic curve

A quartic equation of the form

v2 = u4 + 6cu2 + 4du + e

can be converted into a cubic equation by putting

2u(x + c) = y − d, v = 2x− u2 − c.

This substitution leads to

y2 = 4x3 − (3c2 + e)x + (c3 + d2 − ce).

u

v

C′

O′

B′

x

y

O

A

B

C

R

Applying this to the quartic equationv2 = u4 − 2u2 + 4u + 1, wehave, withc = −1

3, d = e = 1,

u =3(y − 1)

2(3x− 1), v = 2x− u2 +

1

3,

and

y2 = 4x3 − 4

3x +

35

27.

Page 269: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1414 Integer triangles with an altitude equal to a bisector

The pointO′ = (u, v) = (1, 2) arising from the equilateral trianglecorresponds to a rational point on the cubic curve, namely,O =

(43, 3).

The tangent to the cubic curve atO is the line9y = 30x − 13. Itintersects the curve again atR =

(19, −29

27

). This points corresponds

to (u, v) =(

143, −191

9

)on the quartic, and does not yield a genuine

triangle.Now, with x = 1

3, we do have a rational pointA =

(13, 1)

on thecubic curve. This does not correspond to a finite point on the quarticcurve. The tangent atA is horizontal. It intersects the cubic atB =(−2

3, 1). This corresponds toB′ = (0,−1) on the quartic, which again

does not yield a genuine triangle.The tangent atB, being the line6x− 3y +7 = 0, intersects the cubic

curve again atC =(

73, 7). This corresponds toC ′ =

(32, 11

4

)on the

quartic, and yields the triangle(a, b, c) = (10, 11, 15).

Exercise

1. Find the (third) intersection of the lineAR with the cubic curve,and show that it yields the triangle(a, b, c) = (51, 191, 238).

2. Find the intersection of the cubic curve with its tangent atC. Showthat the reflection of this intersection in thex-axis yields the trian-gle (a, b, c) = (7469, 8191, 1940).

Page 270: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 43

The equilateral lattice L (n)

43.1 Counting triangles

Consider an equilateral latticeL (n) of ordern, consisting of equi-lateral triangles of unit sidelengths, withn unit segments along the base.

Let T (n) be the number of equilateral triangles of various sizes in thelattice. Clearly,T (1) = 1, T (2) = 4. ConsiderL (n) as resulting fromL (n − 1) by adding a new base line of lengthn. There are two newtypes of triangles added:

(1) Upright ones with bases along the bottom line: since there aren + 1 points, there are

(n+1

2

)such triangles.

(2) Inverted ones with exactly one vertex on the new base line: thereare1 + 2 + · · ·+ 2 + 1︸ ︷︷ ︸

n−1 terms

such triangles.

T (n) = T (n− 1) +

(n + 1

2

)

+ 1 + 2 + · · ·+ 2 + 1︸ ︷︷ ︸

n−1 terms

.

Page 271: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1502 The equilateral lattice L (n)

From this,

T (3) = T (2) +

(4

2

)

+ 1 + 1 = 5 + 6 + 2 = 13,

T (4) = T (3) +

(5

2

)

+ 1 + 2 + 1 = 13 + 10 + 4 = 27,

T (5) = T (4) +

(6

2

)

+ 1 + 2 + 2 + 1 = 27 + 15 + 6 = 48.

We shall interpretT (0) = 0 so that this recurrence relation holds forn ≥ 1.

Exercise

1. The palindromic sum1 + 2 + · · ·+ 2 + 1︸ ︷︷ ︸

n−1 terms

, first increasing steadily

by 1 and then decreasing by1, is equal ton2−δn

4, where

δn =

{

1, if n is odd,

0, if n is even..

2. With δn defined above, show thatn∑

k=1

δk =n + δn

2.

3. Define

εn =

{

1, if n is even,

0, if n is odd..

Show thatn∑

k=1

εk =n− 1 + εn

2.

Therefore,

T (n)− T (n− 1) =

(n + 1

2

)

+n2 − δn

4=

3n2 + 2n− δn

4,

and

Page 272: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

43.1 Counting triangles 1503

T (n) = T (0) +

n∑

k=1

(T (k)− T (k − 1))

=

n∑

k=1

3k2 + 2k − δk

4

=12n(n + 1)(2n + 1) + n(n + 1)− n+δn

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 · · ·

Page 273: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1504 The equilateral lattice L (n)

43.2 Counting parallelograms

LetP (n) be the number of parallelograms in the latticeL (n). Clearly,P (1) = 0, andP (2) = 3.

Each parallelogram is determined uniquely by the endpointsof a longdiagonal, which do not lie on a line parallel to any sides of the equilateraltriangle. There are

(n+2

2

)points in the lattice. The three lines through

each point altogether contain2n + 1 points. The number of parallelo-grams

P (n) =1

2

(n + 2

2

)((n + 2

2

)

− (2n + 1)

)

=1

8(n + 2)(n + 1)n(n− 1)

= 3

(n + 2

4

)

.

n 2 3 4 5 6 7 8 9 10 · · ·P (n) 3 15 45 105 210 378 630 990 1485 · · ·

Exercise

1. Show thatP (n) is the 12(n− 1)(n + 2)-th triangular number.

Page 274: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

43.3 Counting regular hexagons 1505

43.3 Counting regular hexagons

Let H(n) be the number of regular hexagons in the latticeL (n).Clearly,H(1) = H(2) = 0, andH(3) = 1. Removing the perimeterof the outermost equilateral triangle and the unit segmentsconnected toit, we are left with the latticeL (n − 3). Each vertex inL (n − 3) isthe center of a unique regular hexagon with one or more edges along theperimeter excised. There are

(n−1

2

)such regular hexagon, and none of

these belong to the latticeL (n− 3). Therefore,

H(n)−H(n− 3) =

(n− 1

2

)

.

Here we interpretH(0) = 0.

(i) n = 3k.

H(3k) = H(0) +

k∑

j=1

H(3j)−H(3(j − 1))

=

k∑

j=1

(3j − 1

2

)

=1

2

k∑

j=1

(3j − 1)(3j − 2)

= · · ·

=1

2k(3k2 − 1).

Page 275: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1506 The equilateral lattice L (n)

(ii) n = 3k + 1:

H(3k + 1) = H(1) +

k∑

j=1

H(3j + 1)−H(3j − 2))

=

k∑

j=1

(3j

2

)

= · · ·

=3

2k2(k + 1).

(iii) n = 3k + 2:

H(3k + 2) = H(2) +

k∑

j=1

H(3j + 2)−H(3j − 1))

=

k∑

j=1

(3j + 1

2

)

= · · ·

=3

2k(k + 1)2.

Summary:

H(n) =

118

n(n2 − 3), if n ≡ 0 (mod 3),118

(n− 1)2(n + 2), if n ≡ 1 (mod 3),118

(n + 1)2(n− 2), if n ≡ 2 (mod 3).

n 3 4 5 6 7 8 9 10 11 · · ·H(n) 1 3 6 11 18 27 39 54 72 · · ·

Page 276: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

43.3 Counting regular hexagons 1507

Exercise

1. In the following diagram, there aren small squares along each rowand each column. How many squares of all sizes are there?

2. In the following diagram, there area small squares along each col-umn andb small squares along each row. Givena ≤ b, how manysquares of all sizes are there?

Page 277: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1508 The equilateral lattice L (n)

Page 278: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Chapter 44

Counting triangles

44.1 Integer triangles of sidelengths≤ n

For a given integern ≥ 1, denote bya(n) the number of triangles withsidelengths which are integers≤ n. Clearly, a(1) = 1. For n ≥ 2,the differencea(n) − a(n − 1) is the number of triangles with longestsidelengthn. This is the number of lattice points(a, b) in the region

{(a, b) : 1 ≤ a ≤ b ≤ n, a + b > n}.

b

a0 n1

n

A simple counting shows that

a(n)− a(n− 1) = n + (n− 2) + · · ·+{

2 if n is even,

1 if n is odd

=1

4((n + 1)2 − εn),

Page 279: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1510 Counting triangles

where

εn :=

{

1, if n is even,

0, if n is odd.

Therefore,

a(n) = a(0) +

n∑

k=1

(a(k)− a(k − 1))

=1

4

n∑

k=1

((k + 1)2 − ε(k))

=1

4

(1

6(n + 1)(n + 2)(2n + 3)− 1− n− 1 + εn

2

)

=1

4

(1

6(n + 1)(n + 3)(2n + 1)− εn

2

)

=1

4⌊(n + 1)(n + 3)(2n + 1)

6⌋.

Here are some of the beginning values:

n 1 2 3 4 5 6 7 8 9 10 · · ·a(n) 1 3 7 13 22 34 50 70 95 125 · · ·

44.2 Integer scalene triangles with sidelengths≤ n

A scalene triangle is one whose sidelengths are distinct. Wedeterminethe numberb(n) of scalene triangles with sidelengths≤ n. Clearly,b(1) = b(2) = b(3) = 0, andb(4) = 1.

Consider a scalene triangle with integer sidelengthsa < b < c. Notethata must exceed1, for otherwise,1 + b > c > b, an impossibility. Ifa′ = a−1, b′ = b−2, c′ = c−3, then(a, b, c)↔ (a′, b′, c′) is a one-onecorrespondence between such scalene triangles of sidelengths≤ n andinteger triangles of sidelengths≤ n + 3. It follows that forn ≥ 3,

b(n) = a(n + 3).

Page 280: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

44.3 Number of integer triangles with perimetern 1511

44.3 Number of integer triangles with perimetern

44.3.1 The partition numberp3(n)

The number of ways of writing a positive integern as a sum of twopositive integers is

p2(n) := |{(a, b) : 1 ≤ a ≤ b, a + b = n}| = ⌊n2⌋ =

n− δn

2.

We shall also make use ofp′2(n), the number of ways of writing anonnegative integern as a sum of two nonnegative integers. This is

p′2(n) := |{(a, b) : 0 ≤ a ≤ b, a + b = n}| = ⌈n + 1

2⌉ =

n + 1 + εn

2.

Making use of this, we compute the number of partitions ofn into asum of three positive integer. Note that the smallest summand must be≤ ⌊n

3⌋.

p3(n) =

⌊n3⌋

a=1

p′2(n− 3a).

We distinguish between the following cases.(1) n = 3k:

p3(3k) =

k∑

a=1

p′

2(3(k − a))

=

k−1∑

j=0

p′

2(3j)

=1

2

k−1∑

j=0

(3j + 1 + ε3j)

=1

1

2k(1 + 3(k − 1) + 1) +

1

2

k−1∑

j=0

εj

=1

4k(3k − 1) +

k + 1 − εk

4

=1

4

(3k

2 + 1 − εk

)

=1

4

(n2

3+ 1 − εn

)

=n2

12+

δn

4.

Page 281: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1512 Counting triangles

(2) n = 3k + 1:

p3(3k + 1) =k∑

a=1

p′

2(3(k − a) + 1)

=

k−1∑

j=0

p′

2(3j + 1)

=1

2

k−1∑

j=0

(3j + 2 + ε3j+1)

=1

2

k−1∑

j=0

(3j + 2 + δj)

=1

1

2k(2 + 3(k − 1) + 2) +

1

2

k−1∑

j=0

δj

=1

4k(3k + 1) +

k − δk

4

=1

4

(3k

2 + 2k − δk

)

=1

4

(1

3(n2

− 1) − εn

)

=n2

12−

3 + εn

12.

Page 282: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

44.3 Number of integer triangles with perimetern 1513

(3) n = 3k + 2:

p3(3k + 2) =k∑

a=1

p′

2(3(k − a) + 2)

=

k−1∑

j=0

p′

2(3j + 2)

=1

2

k−1∑

j=0

(3j + 3 + ε3j+2)

=1

2

k−1∑

j=0

(3j + 3 + εj)

=1

3

2k(k + 1) +

1

2

k−1∑

j=0

εj

=1

4· 3k(k + 1) +

k + 1 − εk

4

=1

4

(3k

2 + 4k + 1 − εk

)

=1

4

(1

3(n2

− 1) − εn

)

=n2

12−

3 + εn

12.

In all three cases, the difference betweenp3(n) and n2

12is no more

than 13. Therefore,p3(n) is the integer nearest ton

2

12.

For a real numberx (which is not a half-integer,i.e., 2x is not aninteger, let{x} denote the integer nearest tox. Thus,{

√2} = 1 and

{√

3} = 2.

Summary:p3(n) ={

n2

12

}

.

Page 283: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1514 Counting triangles

Theorem 44.1.The number of integer triangles with perimetern is

c(n) =

{n2

48

}

, if n is even,

{(n+3)2

48

}

, if n is odd.

Proof. The number of triangles of perimetern is p3(n), subtracting thenumber of those partitionsa ≤ b ≤ c with c ≤ a+b = n−c, i.e., c ≤ n

2:

c(n) = p3(n)−⌊n

2⌋

c=1

p2(c).

Note that

h∑

c=1

p2(c) =1

2

h∑

c=1

(c− δc)

=1

2

(1

2h(h + 1)− h− δh

2

)

=1

4

(h2 + δh

).

n p3(n)∑⌊n

2⌋

c=1 p2(c) c(n)

12k n2

12n2

16n2

48

12k + 1 n2−112

(n−1)2

16n2+6n−7

48(n+3)2−16

48

12k + 2 n2−412

n2−416

n2−448

12k + 3 n2+312

n2−2n−316

n2+6n+2148

(n+3)2+1248

12k + 4 n2−412

n2

16n2−16

48

12k + 5 n2−112

(n−1)2

16n2+6n−7

48(n+3)2−16

48

12k + 6 n2

12n2−4

16n2+12

48

12k + 7 n2−112

n2−2n−316

n2+6n+548

(n+3)2−448

12k + 8 n2−412

n2

16n2−16

48

12k + 9 n2+312

(n−1)2

16(n+3)2

48

12k + 10 n2−412

n2−416

n2−448

12k + 11 n2−112

n2−2n−316

n2+6n+548

(n+3)2−448

Page 284: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

44.3 Number of integer triangles with perimetern 1515

From the alternatives toc(n) given in the rightmost column, it is clearthat the difference betweenc(n) andn2

48for evenn (and (n+3)2

48for oddn)

is no more than13. Thereforec(n) is the integer nearest ton

2

48or (n+3)2

48according asn is even or odd.

n 1 2 3 4 5 6 7 8 9 10 11 12c(n) 0 0 1 0 1 1 2 1 3 2 4 3

n 13 14 15 16 17 18 19 20 21 22 23 24c(n) 5 4 7 5 8 7 10 8 12 10 14 12

Page 285: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1516 Counting triangles

Page 286: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

Bibliography

[1] I. Adler, Make up your own card tricks,Journal of RecreationalMath., 6 (1973) 87–91.

[2] I. Affleck and H. L. Abbott, Problem 1884,Crux Math., 19 (1993)264; solution, 20 (1994) 231–233.

[3] M. Aigner and G. M. Ziegler,Proofs from the BOOK, Springer,1998.

[4] U. Alfred, On square Lucas numbers,Fibonacci Quarterly, 2(1964) 11–12.

[5] P. R. Allaire and A. Cupillari, Artemis Martin: An amateur math-ematician of the nineteenth century and his contribution tomath-ematics,College Math. Journal, 31 (2000) 22–34.

[6] G. E. Andrews, A note on partitions and triangles with integersides,American Math. Monthly, 86 (1979) 477–478.

[7] W. S. Anglin, The square pyramid puzzle,American Math.Monthly, 97 (1990) 120–124.

[8] T. M. Apostol, A property of triangles inscribed in rectangles,Crux Math., 3 (1977) 242–244.

[9] Y. Arzoumanian and W. O. J. Moser, Enumerating 3-, 4-, 6-gonswith vertices at lattice points,Crux Math., 19 (1993) 249–254;279–284.

[10] D. F. Bailey, Counting arrangements of1’s and−1’s, Math. Mag.,69 (1996) 128–131.

[11] W. W. R. Ball and H. S. M. Coxter,Mathematical Recreations andEssays, 13th edition, Dover, 1987.

Page 287: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1518 BIBLIOGRAPHY

[12] S. Beatty et al., Problem 3177,Amer. Math. Monthly, 33 (1926)159; solution, 34 (1927) 159–160.

[13] A. Beiler,Recreations in the Theory of Numbers, Dover, 1963.

[14] A. T. Benjamin and J. J. Quinn, Recounting Fibonacci andLucasidentities,College Math. Journal, 30 (1999) 359–366.

[15] A. T. Benjamin and J. J. Quinn,Proofs that Really Count: The Artof Combinatorial Proof, Math. Assoc. Math., forthcoming.

[16] A. T. Benjamin and J. J. Quinn, The Fibonacci numbers – e

[17] A. Bliss et al., Four constants in four 4s,Math. Mag., 74 (2001)272.

[18] A. Bourbeau, H. L. Nelson, et al., Problem 142,Crux Math., 2(1976) 93; solution, 175–178, 3 (1977) 106–108.

[19] A. L. Bouton,Annals of Math., ser. 2, 3 (1902) 33–59.

[20] W. G. Brady and C. W. Twigg, Problem 232,Pi Mu Epsilon Jour-nal, 5.2 (1969) 24; solution 5.3 (1970) 139.

[21] A. Bremner, Positively prodigious powers or how Dedeney doneit? Math. Mag., 84 (2011) 120–125.

[22] I. Bruce, Another instance of the golden right triangle, FibonacciQuarterly, 32 (1994) 232–233.

[23] M. Buckheimer and A. Arcavi, Farey series and Pick’s area for-mula,Math. Intelligencer, 17:4 (1993) 64–67.

[24] R. H. Buchholz and R. L. Rathbun, An infinite set of Heron tri-angles with two rational medians,American Math. Monthly, 104(1997) 107–115.

[25] P. R. Buckland, The mathematical background of teachers in train-ing, Math. Gazette, 53 (1969) 357–362.

[26] S. Bulman-Fleming and E. T. H. Wang, Problem 1143,CruxMath., 12 (1986) 107; solution, 13 (1987) 237–238.

[27] D. Burger, Wednesday dinner parties,Scripta Math., 15 (1949)26–32.

Page 288: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

BIBLIOGRAPHY 1519

[28] F. Burk, Natural logarithms via long division,College Math. Jour-nal, 30 (1999) 309–310.

[29] C. K. Caldwell, Truncatable primes,Journal of RecreationalMath., 19 (1987) 30–33.

[30] C. K. Caldwell, Near repdigit primes,Journal of RecreationalMath., 21 (1988) 299–304; (1989) 101–109.

[31] , C. K. Caldwell, The PRIME Pages,http://http://primes.utm.edu.

[32] C. K. Caldwell and H. Dubner,The near-repunit primes1n−k−1011k, Journal of Recreational Math., 27 (1995) 35–41.

[33] C. K. Caldwell and H. Dubner, Unique-period primes,Journal ofRecreational Math., 29 (1998) 43–48.

[34] L. Carroll, Pillow Problems and A Tangled Tale, 1895 and 1885,Dover reprint, 1958.

[35] D. Cass and G. Wildenberg, A novel proof of the infinitudeofprimes, revisited,Math. Mag., 76 (2003) 203.

[36] G. Chaves and J. C. Santos, Why some elementary functions arenot rational?,Math. Mag., 77 (2004) 225–226.

[37] P. L. Chessin and W. B. Carver, Problem E 1111,American Math.Monthly, 61 (1954) 258; solution 712.

[38] A. J. Cole and A. J. T. Davie, A game based on the euclideanalgorithm and a winning strategy for it,Math. Gazette, 53 (1969)354–357.

[39] D. B. Coleman, Sketch, a geoboard game,Math. Mag., 51 (1978)49–54.

[40] J. H. Conway and R. K. Guy,The Book of Numbers, Springer,1996.

[41] R. J. Covill and T. O’Keeffe, Problem 679,Journal of Recre-ational Math., 10 (1977–1978) 285; solution, 11 (1978–1979)312.

[42] H. S. M. Coxeter, The golden section, phyllotaxis, and Wythoff’sgame,Scripta Mathematica, 19 (1953) 135–143.

Page 289: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1520 BIBLIOGRAPHY

[43] K. David, Rencontres reencountered,College Math. Journal, 19(1988) 139–148.

[44] T. R. Dawson, Ornamental squares and triangles,Math. Gazette,30 (1946) 19–21.

[45] M. N. Desphande, An unexpected encounter with the Fibonaccinumbers,Fibonacci Quarterly, 32 (1994) 108 – 109.

[46] D. W. DeTemple, The triangle of smallest perimeter which cir-cumscribes a semicircle,Fibonacci Quarterly, 30 (1992) 274.

[47] C. Dodge, T. Schoch, P. Y. Woo, and P. Yiu, Those ubiquitouscircles,Math. Mag., 72 (1999) 202–213.

[48] H. G. Dworschak and L. Sauve, Problem 19,Crux Math., 1 (1975)8; solution, 1 (1975) 32–33.

[49] H. Dubner, Recursive prime generating sequences,Journal ofRecreational Math., 29 (1998) 170–175.

[50] H. E. Dudeney,Amusements in Mathematics, 1919, Dover reprint,1958.

[51] H. E. Dudeney,536 Curious Problems and Puzzles, edited byM. Gardner, Barnes and Noble reprint, 1995.

[52] H. E. Dudeney,Canterbury Puzzles, 1919, Dover reprint, 2002.

[53] U. Dudley,Mathematical Cranks, Math. Assoc. America, 1992.

[54] H. G. Dworschak and L. Sauve, Problem 19,Crux Math., 1 (1975)8; solution 32.

[55] E. J. Eckert, Primitive Pythaogrean triples,College Math. Journal,23 (1992) 413–417.

[56] E. J. Eckert and H. Haagensen, A Pythagorean tiling of the plane,Math. Mag., 62 (1989) 175.

[57] R. E. Edwards et al., Problem 889,Math. Mag., 47 (1974) 46–47;solution 289–292.

[58] R. B. Ely, III, Magic designs,Journal of Recreational Math., 1(1968) 5–17.

Page 290: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

BIBLIOGRAPHY 1521

[59] A. Engel,Problem Solving Strategies, Springer, 1998.

[60] R. Epp and T. Furguson, A note on takeaway games,FibonacciQuarterly, 18 (1980) 300–303.

[61] P. Erdos and G. Szekeres, Some number theoretic problems onbinomial coefficients,Australian Math. Soc. Gazette, 5 (1978) 97–99.

[62] S. Forman, A serendipitous application of the Pythagoreantriplets,College Math. Journal, 23 (1992) 312–314.

[63] R. L. Francis, Mathematical haystacks: another look atrepunitnumbers,College Math. Journal, 19 (1988) 240–246.

[64] A. S. Fraenkel and H. Herda, Never rush to be first in playingnimbi, Math. Mag., 53 (1980) 21–26.

[65] H. Fukagawa and D. Pedoe,Japanese Temple Geometry, CharlesBabbage Research Centre, Wennipeg, 1989.

[66] H. Fukagawa and J. F. Rigby,Traditional Japanese MathematicalProblems, 2002, SCT Publishing, Singapore.

[67] H. Furstenberg, On the infinitude of primes,American Math.Monthly, 62 (1955) 353.

[68] J. Gallego-Diaz and D. L. Silverman, Problem 1453 (corrected),American Math. Monthly, 68 (1961) 177; correction, 572; solution69 (1962) 166.

[69] J. A. Gallian, The mathematics of identification numbers,CollegeMath. Journal, 22 (1991) 194–202.

[70] M. Gardner, Mathematical card tricks,Scripta Math., 14 (1948)99–111.

[71] M. Gardner,Hexaflexagons and Other Mathematical Diversions,The First Scientific American Book of Mathematical Puzzles andDiversions, University of Chicago Press, 1988.

[72] M. Gardner,The Second Scientific American Book of Mathemati-cal Puzzles and Diversions, University of Chicago Press, 1987.

[73] M. Gardner,The Colossal Book of Mathematics, Norton, 2001.

Page 291: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1522 BIBLIOGRAPHY

[74] R. Gauntt and G. Rabson, The irrationality of√

2, American Math.Monthly, 63 (1956) 247.

[75] I. Gessel, Problem H-187,Fibonacci Quarterly, 10 (1972) 417–419.

[76] R. A. Gibbs, M. Chamberlain, and R. Lyons, Problem 1031,Math.Mag., 51 (1978) 69; solution, 52 (1979) 116.

[77] S. Golomb, Permutations by cutting and shuffling,SIAM Review,3 (1961) 114–118.

[78] S. Golomb, Iterated binomial coefficients,American Math.Monthly, 87 (1980) 719 - 727.

[79] S. Golomb, Problem 477,Pi Mu Epsilon Journal, 7.3 (1980) 187;solution, 8.5 (1981) 348–349.

[80] S. Golomb and M. S. Klamkin, Problem 232,Pi Mu Epsilon Jour-nal, 5.2 (1970) 87; solution, 5.4 (1971) 208.

[81] R. Goormaghtigh, Lemoyne’s theorem,Scripta Math., 18 (1953)182–184.

[82] H. D. Grossman, Ternary epitaph on coin problems,ScriptaMath., 14 (1948) 69–71.

[83] R. K. Guy, Problem 1153,Crux Math., 12 (1986) 139; solution,13 (1987) 286–287.

[84] R. K. Guy, Problem 1220,Crux Math., 13 (1987) 54; solution, 14(1988) 125–126.

[85] R. K. Guy, The strong law of small numbers,Amer. Math.Monthly, 95 (1988) 697–712.

[86] R. K. Guy and M. E. Marcin, Problem 1915,Crux Math., , 20(1994) 48; solution, 21 (1995) 30.

[87] R. K. Guy and C. Springer, Problem 1367,Crux Math., 14 (1988)202; solution, 15 (1989) 278–279.

[88] R. K. Guy, The second strong law of small numbers,Math. Mag.,63 (1990) 3–20.

Page 292: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

BIBLIOGRAPHY 1523

[89] R. K. Guy, Unsolved Problems in Number Theory, 2nd edition,Springer, 1994.

[90] R. K. Guy and R. E. Woodrow,The Lighter Side of Mathematics,MAA, 1994.

[91] A. Hall, Genealogy of Pythagorean triples,Math. Gazette, 54(1970) 377–379.

[92] C. L. Hamberg and R. A. Gibbs, Problem 975,Math. Mag., 49(1976) 96; solution, 50 (1977) 266.

[93] G. H. Hardy,A Mathematician’s Apology, Cambridge UnivesityPress, 1940.

[94] G. H. Hardy,A Course in Pure Mathematics, 10th edition, 1952,Cambridge; reprint 1963.

[95] A.P. Hatzipolakis and P. Yiu, The Lucas circles of a triangle,Amer.Math. Monthly, 108 (2001) 444 – 446.

[96] O. Higgins, Another long string of primes,Journal of Recre-ational Math., 14 (1981-82) 185.

[97] A. M. Hinz, Pascal’s triangle and the tower of Hanoi,Amer. Math.Monthly, 99 (1992) 538–544.

[98] V. Hoggatt and L. Moser, Problem E 861,American Math.Monthly, 56 (1949) 262; solution 57 (1950) 35.

[99] A. Holshouser and H. Reiter, One pile nim with arbitrarymovefunction,Electronic Journal of Combinatorics, 10 (2003) #N7.

[100] R. Honsberger, Semi-regular lattice polygons,College Math.Journal, 13 (1982) 36–44.

[101] R. Honsberger,In Polya’s Footsteps, Math. Assoc. America,1997.

[102] A. F. Horadam, Fibonacci sequences and a geometric paradox,Math. Mag.35 (1962) 1–11.

[103] L. S. Johnson, Denumerability of the rational number system,amm 55 (1948) 65–70.

Page 293: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1524 BIBLIOGRAPHY

[104] J. H. Jordan, R. Walsh, and R. J. Wisner, Triangles withintegersides,American Math. Monthly, 86 (1979) 686–688.

[105] S. Kahan,s-transposable integers,Math. Mag., 49 (1976) 27–28.

[106] D. Kalman and R. Mena, The Fibonacci numbers – exposed,Math. Mag., 76 (2003) 167–181.

[107] H. Kestelman, On arithmetic and geometric means,Math.Gazette, 46 (1962) 130.

[108] C. Kicey and S. Goel, A series forln k, American Math. Monthly,105 (1998).

[109] M. S. Klamkin and P. Watson, Triangulations and Pick’stheorem,Math. Mag., 49 (1976) 35–37.

[110] D. A. Klarner,Mathematical Recreations, A Collection in Honorof Martin Gardner, Dover, 1998, originally published asMathe-matical Gardner, Wadsworth International, CA, 1981.

[111] M. Kleber, The best card trick,Math. Intelligencer, 24 (2002) 1:9–11.

[112] D. E. Knuth, Fundamental Algorithms, 2nd edition, Addison-Wesley, 1973.

[113] T. Koshy, The digital root of a Fermat number,Journal of Recre-ational Math., 31 (2002–2003) 112–113.

[114] M. Kraitchik, Mathematical Recreations, 2nd edition, 1942;Dover reprint, 1953.

[115] N. Krier and B. Manvel, Counting integer triangles,Math. Mag.,71 (1998) 291–295.

[116] S. Kumar, On Fibonacci sequences and a geometric paradox,Math. Mag., 37 (1964) 221–223.

[117] V. S. Kumar, On the digital root series,Journal of RecreationalMath., 12 (1979–80) 267–270.

[118] M. E. Larson, The eternal triangle – a history of a counting prob-lem,College Math. Journal, 20 (1989) 370–384.

Page 294: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

BIBLIOGRAPHY 1525

[119] H. Larson and V. G. Feser, Problem 566,Journal of RecreationalMath., 9 (1976) 298; solution, 10 (1977–78) 311–313.

[120] W. G. Leavitt, Repeating decimals,College Math. Journal, 15(1984) 299–308.

[121] D. N. Lehmer, Asymptotic evaluation of certain totient sums,Amer. J. Math.22 (1900) 293–335.

[122] R. B. Leigh and R. T. Ng, Minimizing aroma loss,College Math.Journal, 30 (1999) 356–358.

[123] J. Lesko, A series forln k, College Math. Journal, 32 (2001) 119–122.

[124] R. E. Lester, The malititudes of a cyclic quadrilateral, Math.Gazette, 46 (1962) 147.

[125] A. Liu, A direct proof of Pick’s theorem,Crux Math., 4 (1978)242–244.

[126] E. Lucas,Recreations Mathematiques, 4 tomes, Gauthier Villars,Paris, 1891, 1896, 1893, 1894.

[127] A. Machado, Nineteenth problems on elementary geometry,Math. Intelligencer, 17:1 (1995) 17–19.

[128] G. Markowsky, Misconceptions about the golden ratio,CollegeMath. Journal, 23 (1992) 2–19.

[129] L. Marvin and F. H. Kierstead, Problem 315,Journal of Recre-ational Math., 7 (1974) 62; solution 9 (1976–77) 307.

[130] S. W. McInnis, Magic circles,American Math. Monthly, 60 (1953)347–351.

[131] D .S. Mitrinovic, An inequality concerning the arithmetic and ge-ometric means,Math. Gazette, 50 (1966) 310–311.

[132] R. K. Morley and P. Schub, Problem E24,American Math.Monthly, 40 (1933) 111; solution, 425–426.

[133] S. B. Morris, Faro shuffling and card placement,Journal of Recre-ational Math., 8 (1975) 1–7.

Page 295: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1526 BIBLIOGRAPHY

[134] S. B. Morris, The basic mathematics of the faro shuffle,Pu MuEpsilon Journal, 6.2 (1975) 85–92.

[135] W. Moser, It is elementary (combinatorics),Crux Math., 18(1992) 257–262; 289–295; 19 (1993) 1–2.

[136] D. Nelson, A regular pentagon construction,Math. Gazette, 61(1977) 215–216.

[137] I. Niven, Note on a paper by L. S. Johnson,Amer. Math. Monthly,55 (1948) 358.

[138] L. C. Noll and D. I. Bell,n-clusters for1 < n < 7, Mathematicsof Computation, 53 (1989) 439–444.

[139] A. Porges, A set of Eight Numbers,American Math. Monthly, 52(1945) 379 - 384.

[140] A. S. Posamentier and C. T. Salkind,Challenging Problems inGeometry, Dover, 1988.

[141] C. S. Queen, Palindromes,Fibonacci Quarterly, 31 (1993) 216–226.

[142] S. Rabinowitz, Problem 1299,Journal of Recreational Math., 16(1983–1984) 139.

[143] Note on magic circles,American Math. Monthly, 60 (1953) 640.

[144] V. Revennaugh and R. W. Buckley, Problem 385,Journal ofRecreational Math., 8 (1975–76) 137; solution, 10 (1977–78)288–289.

[145] P. Ribenboim,The New Book of Prime Number Records, Springer,1996.

[146] J. Roberts,Elementary Number Theory, A Problem Oriented Ap-proach, MIT, 1975.

[147] R. R. Rowe, Carroll’s paper folding pillow problem,Journal ofRecreational Math., 4 (1971) 192–198.

[148] D. L. Silverman, R. R. Robinson and R. L. Patton, Problems 141,142, Journal of Recreational Math., 3 (1970) 237; solution, 4(1971) 222–223.

Page 296: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

BIBLIOGRAPHY 1527

[149] F. Rubin and V. G. Feser, Problem 1078,Journal of RecreationalMath., 14 (1981) 141–142; solution, 15 (1982–1983) 155–156.

[150] K. R. S. Sastry and J. H. Steelman, Problem 647,College Math.Journal, 30 (1999) 143; solution, 31 (2000) 139–140.

[151] N. Sato, An ambivalent sum,Crux Math., 23 (1997) 290–293.

[152] D. Schattschneider, Counting it twice,College Math. Journal, 22(1991) 203–211.

[153] J. Schram, A string of 176 primes,Journal of Recreational Math.,15 (1982–83) 168–169.

[154] J. Schram, A recurrence relation for Fermat numbers,Journal ofRecreational Math., 16 (1983–84) 195–197.

[155] A. J. Schwenk, Take-away games,Fibonacci Quarterly, 8 (1970)225–234.

[156] H. Shapiro, An arithmetic function arising from theφ function,Amer. Math. Monthly, 50 (1943) 18–30.

[157] D. L. Silverman and D. Singmaster, Problem 1017,Journal ofRecreational Math., 13 (1980) 298; solution, 14 (1981–1982) 313.

[158] D. Singmaster, Problem 267,Journal of Recreational Math., 6(1973) 152–153.

[159] D. Singmaster and B. Barwell, Problem 812,Journal of Recre-ational Math., 13 (1980–1981) 62–63.

[160] D. Singmaster, Triangles with integer sides and sharing barrels,College Math. Journal, 21 (1990) 278–285.

[161] J. St. C. L. Sinnadurai, A well-known geometrical problem,Math.Gazette, 46 (1962) 143–144.

[162] J. Slocum,The Tangram Book, Sterling, New York, 2003.

[163] , L. M. Smiley, A quick solution of triangle counting,Math. Mag.,66 (1995) 40.

[164] C. A. B. Smith, Compound games with counters,Journal ofRecreational Math., 1 (1968) 67–77.

Page 297: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1528 BIBLIOGRAPHY

[165] M. Somos and R. Haas, A linked pair of sequences impliestheprimes are infinite,American Math. Monthly, 110 (2003) 539–540.

[166] J. A. Spencer and H. Ahlburg, Problem 428,Crux Math., 5 (1979)77; solution, 6 (1980) 50.

[167] J. E. Trevor and W. E. Buker, Problem 178,American Math.Monthly, 43 (1937) 104; solution, 499–500.

[168] C. W. Trigg, Eight digits on a cube’s vertices,Journal of Recre-ational Math., 7 (1974) 49–55.

[169] C. W. Trigg, Tetrahedral models from envelopes,Math. Mag., 51(1978) 66–67.

[170] C. W. Trigg, Some curiosa involving the first ten perfect numbers,Journal of Recreational Math., 23 (1991) 286.

[171] T. Trotter, Perimeter-magic polygons,Journal of RecreationalMath., 7 (1974) 14–20.

[172] M. Wald, Solution to Problem 1664,Journal of RecreationalMath., 21 (1989) 236–237.

[173] F. T. Wang and C. C. Hsiung, A theorem on the tangram,Ameri-can Math. Monthly, 49 (1942) 596–599.

[174] S. R. Wassel, Rediscovering a family of means,Math. Intelli-gencer, 24.2 (2002) 58–65.

[175] C. Waiveris and Y. Chen, Folding stars,College Math. Journal, 30(1999) 370–378.

[176] M. Wald, Solution to Problem 1664,Journal of RecreationalMath., 21 (1989) 236–237.

[177] J. E. Waltrom and M. Berg, Prime primes,Math. Mag., 42 (1969)232.

[178] E. T. H. Wang and J. I. Levy, Problem 1001,Math. Mag., 49(1976) 253; solution, 51 (1978) 246.

[179] W. C. Waterhouse, Continued fractions and Pythagorean triples,Fibonacci Quarterly, 30 (1992) 144–147.

Page 298: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

BIBLIOGRAPHY 1529

[180] A. Wayne, A genealogy of120◦ and60◦ natural triangles,Math.Mag., 55 (1982) 157–162.

[181] C. S. Weaver, Geoboard triangles with one interior point, Math.Mag., 50 (1977) 92–94.

[182] D. Wells, Beauty in mathematics,Math. Intelligencer, 10:4 (1988)31.

[183] D. T. Whiteside,The Mathematical Papers of Issac Newton, vol.V, Cambridge University Press, 1976.

[184] A. W. Willcox and L. A. Ringenberg, Problem 971,AmericanMath. Monthly, 58 (1951) 417; solution 59 (1952) 105–106.

[185] P. Woo, Simple constructions of the incircle of an arbelos,ForumGeometricorum, 1 (2001) 133–136.

[186] M. Wunderlich, Another proof of the infinite primes theorem,American Math. Monthly, 72 (1965) 305.

[187] S. Yates, The mystique of repunits,Math. Mag., 51 (1978) 22–28.

[188] S. Yates, Periods of unique primes,Math. Mag., 53 (1980) 314.

[189] S. Yates,Repunits and Repetends, privately published, DelrayBeach, FL, 1982.

[190] P. Yiu, Construction of indecomposable Heronian triangles,RockyMountain Journal of Mathematics, 28 (1998) 1189 – 1202.

[191] P. Yiu and J. Young, Problem 2406,Crux Math., 25 (1999) 48;solution, 26 (2000) 53–54.

[192] P. Yiu, Mixtilinear incircles,Amer. Math. Monthly, 106 (1999)952 – 955.

[193] P. Yiu, The uses of homogeneous barycentric coordinates in planeeuclidean geometry,Int. J. Math. Educ. Sci. Technol, 31 (2000)569 – 578.

[194] P. Yiu, Heronian triangles are lattice triangles,Amer. Math.Monthly, 108 (2001) 261 – 263.

[195] P. Yiu, The volume of an isosceles tetrahedron and the Euler line,Mathematics & Informatics Quarterly, 11 (2001) 15–19.

Page 299: Problem Solvingand Recreational Mathematicsmath.fau.edu/yiu/Oldwebsites/MPS2012Fall/00PSRM2012Chapters1to44.pdf · Problem Solvingand Recreational Mathematics Paul Yiu Department

1530 BIBLIOGRAPHY

[196] N. Yoshigahara, Card-return numbers,Journal of RecreationalMath., 5 (1972) 36–38.