recreational mathematicsmath.fau.edu/yiu/psrm2015/yiu/recreationamathematics/rec2003.pdfchapter 1...

37
Recreational Mathematics Paul Yiu Department of Mathematics Florida Atlantic University Summer 2003 Version 030131

Upload: others

Post on 13-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Recreational Mathematics

Paul Yiu

Department of MathematicsFlorida Atlantic University

Summer 2003

Version 030131

Page 2: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label
Page 3: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Contents

1 Graph Labelings 11.1 Magic hexagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 The Geoboard 32.1 Stretch: A geoboard game. . . . . . . . . . . . . . . . . . . . . . . 32.2 Proof of Pick’s theorem .. . . . . . . . . . . . . . . . . . . . . . . 32.3 Geoboard triangles with one interior point . .. . . . . . . . . . . . 3

2.3.1 Geoboard polygons can never be regular. . . . . . . . . . . . 4

3 Prime Numbers 53.0.2 Is2 · 3 · 5 · · ·P + 1 a prime? .. . . . . . . . . . . . . . . . 5

3.1 Prime links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.2 Repunit primes . .. . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.2.1 Near-repunit primes . . . . . .. . . . . . . . . . . . . . . . 113.2.2 Near repdigit primes . . . . . .. . . . . . . . . . . . . . . . 11

3.3 Palindromic primes . . .. . . . . . . . . . . . . . . . . . . . . . . 143.4 Primes inπ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.5 Perfect numbers .. . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.5.1 The first 10 perfect numbers . .. . . . . . . . . . . . . . . . 163.6 Abundant and deficient numbers . . .. . . . . . . . . . . . . . . . 17

4 Number Trivia 19

5 Pell’s equation 21

6 Heron triangles 236.1 Perfect cuboid . .. . . . . . . . . . . . . . . . . . . . . . . . . . . 23

7 Interpolation 257.0.1 Method of differences . . . . .. . . . . . . . . . . . . . . . 257.0.2 Another pattern . .. . . . . . . . . . . . . . . . . . . . . . . 267.0.3 Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

8 The Catalan numbers 298.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Page 4: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label
Page 5: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Chapter 1

Graph Labelings

1.1 Magic hexagrams

J. R. Hendrick,JRM, 25 (1993) 10–12.

Label the star of David with (consecutive) positive integers such that the sum of the4 numbers along each line is constant.

a

b c d e

f g

h i j k

l

Page 6: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

2 Graph Labelings

a b c d e f g g i j k l constant13 12 3 1 11 2 5 9 6 4 8 7 271 2 6 10 8 12 4 7 3 5 11 9 261 2 7 12 5 10 4 8 3 6 9 11 261 2 8 9 7 11 4 6 3 5 12 10 261 2 8 10 6 12 4 5 3 7 11 9 261 3 5 11 7 12 4 8 2 6 10 9 261 3 6 12 5 11 4 8 2 7 9 11 261 3 7 11 5 12 4 6 2 8 10 9 261 3 8 9 6 10 4 7 2 5 12 11 262 4 5 11 6 12 3 7 1 8 10 9 262 4 6 9 7 10 3 8 1 5 12 11 262 4 7 10 5 9 3 8 1 6 11 12 262 4 8 9 5 10 3 6 1 7 12 11 262 4 5 9 8 11 2 7 1 6 12 10 262 4 5 10 7 12 2 6 1 8 11 9 262 4 6 11 5 9 2 8 1 7 10 12 262 4 7 9 6 11 2 5 1 8 12 10 26

Page 7: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Chapter 2

The Geoboard

A lattice polygon is one whose vertices are lattice points, points withinteger coordi-nates. For a lattice polygon, we denote by(i) I the number of interior points, and(ii) B the number of boundary points.

Theorem 2.1 (Pick). The area of a lattice polygon is I + B2 − 1.

2.1 Stretch: A geoboard game

Reference:Math. Mag. 51 (1978) 49–54.Start with a convex lattice polygon enclosed by rubber bands. Players take turn to

modify the figures subject to the rules:(1) The modified figure must be convex.(2) The numberI of interior lattice points cannot change.(3) The numberB of boundary points must increase.(4) At most one side can be disturbed. (Extending a side does not disturb the side).

The player who cannot move loses.This paper shows that the game must end by provingB ≤ 9I for a convex polygon.

But the bound is far from the best.

2.2 Proof of Pick’s theorem

Reference: A. Liu,Math. Mag., (1979)A. Liu, Crux Math., 4 (1978)A primitive geoboard triangle is one without interior point,i.e., I = 0.The area of aprimitive geoboard triangle must be12 .

2.3 Geoboard triangles with one interior point

Reference: Charles S. Weaver,Math. Mag., 50 (1977) 92–94.

Page 8: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

4 The Geoboard

Theorem 2.2 (Weaver). If a geoboard triangle has exactly onepoint in the interiorandB points on its boundary, thenB = 3, 4, 6, 8, or 9. These numbers are all possible.

Construct explicit examples.

2.3.1 Geoboard polygons can never be regular

The only values ofn for which sin πn is rational isn = 6.

Page 9: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Chapter 3

Prime Numbers

The filePrimeTable.txt contains a list of first 100,000 prime numbers.Euclid’s proof of the infinitude of prime numbers.G.H. Hardy,A Mathematician’s Apology:

The proof is byreductio ad absurdum, andreductio ad absurdum, whichEuclid loved so much, is one of a mathematician’s finest weapon. It is a farfiner gambit than any chess gambit: a chess player may offer the sacrificeof a pawn or even a prize, but a mathematician offersthe game.

3.0.2 Is2 · 3 · 5 · · ·P + 1 a prime?

2 + 1 =3,2 · 3 + 1 =7,

2 · 3 · 5 + 1 =31,

2 · 3 · 5 · 7 + 1 =211,2 · 3 · 5 · 7 · 11 + 1 =2311,

2 · 3 · 5 · 7 · 11 · 13 + 1 =30031,2 · 3 · 5 · 7 · 11 · 13 · 17 + 1 =510511,

2 · 3 · 5 · 7 · 11 · 13 · 17 · 19 + 1 =9699691,2 · 3 · 5 · 7 · 11 · 13 · 17 · 19 · 23 + 1 =223092871,

2 · 3 · 5 · 7 · 11 · 13 · 17 · 19 · 23 · 29 + 1 =6469693231,2 · 3 · 5 · 7 · 11 · 13 · 17 · 19 · 23 · 29 · 31 + 1 =200560490131,

...

The next string for which2 · 3 · 5 · · ·P + 1 is prime has length 75, withP = 379

Page 10: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

6 Prime Numbers

and the prime has 154 digits

1719620105458406433483340568317543019584575635895742560438771105058321655238562613083979651479555788009994557822024565226932906295208262756822275663694111.

The next time this is time, the string has 171 primes and the last prime is 1019. It isinteresting to note that the very next string (with 172 primes ending at 1021) also givesa prime.

Guy’s Example 11

[I]f you go to thenext prime, its difference from the product is always aprime.

If there arem primes numbers less than the product2 · 3 · · · pk, then

pm+2 − 2 · 3 · · · pk

is a prime. This seems to be the rule for the five lines. The prime number skippedover are 3, 7, 31, 211 and 2311. But in the next line, Guy did not jump over 30047 to30059. The difference is 29. Likewise, the primes in the next two lines are 510551 and9699727. The differences are 41 and 37.

5− 2 =3,11− 2× 3 =5,

37− 2× 3× 5 =7,223− 2× 3× 5× 7 =13,

2333− 2× 3× 5× 7× 11 =23,30047− 2× 3× 5× 7× 11× 13 =17,

510529− 2× 3× 5× 7× 11× 13× 17 =19,9699713− 2× 3× 5× 7× 11× 13× 17× 19 =23,

Page 11: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

7

k pm+2 differnce6 30059 297 510551 418 9699727 379 223092917 4710 6469693319 8911 200560490197 6712 7420738134911 10113 304250263527317 10714 13082761331670097 6715 614889782588491519 10916 32589158477190044803 7317 1922760350154212639159 8918 117288381359406970983437 16719 7858321551080267055879229 13920 557940830126698960967415619 229

According to Guy, this is called Fortune’s conjecture. Here are the primes for thefirst 100 cases.

(1, 3) (1, 5) (1, 7) (1, 13) (1, 23) (17, 29) (19, 41) (23, 37) (37, 47) (61, 89)(1, 67) (61, 101) (71, 107) (47, 67) (107, 109) (59, 73) (61, 89) (109, 167) (89, 139) (103, 229)

(79, 163) (151, 193) (197, 269) (101, 157) (103, 173) (233, 523) (223, 233) (127, 157) (223, 251) (191, 193)(163, 179) (229, 383) (643, 647) (239, 311) (157, 223) (167, 317) (439, 509) (239, 457) (199, 211) (191, 503)(199, 251) (383, 479) (233, 617) (751, 1019) (313, 347) (773, 863) (607, 827) (313, 349) (383, 389) (293, 563)(443, 601) (331, 419) (283, 367) (277, 349) (271, 449) (401, 829) (307, 397) (331, 811) (379, 563) (491, 521)(331, 773) (311, 359) (397, 643) (331, 449) (353, 419) (419, 823) (421, 631) (883, 1129) (547, 863) (1381, 1609)(457, 797) (457, 683) (373, 409) (421, 461) (1, 409) (1061, 1319) (523, 607) (499, 661) (619, 1231) (727, 1409)(457, 941) (509, 631) (439, 503) (911, 991) (461, 619) (823, 1031) (613, 1361) (617, 659) (1021, 1063) (523, 617)(941, 1409) (653, 1163) (601, 641) (877, 941) (607, 691) (631, 733) (733, 1097) (757, 1229) (877, 1087) (641, 751)

How about 2 · 3 · 5 · · ·P− 1?

Harvey Dubner, Recursive prime generating sequences,Journal of Recreational Math-ematics, 29 (1998) 170–175.

Construct an increasing sequence of primes

p1, p2, . . . , pn, . . .

such that eachQn =∏n

k=1 pk + 1 is prime.Dubner has

2, 3, 5, 7, 11, 19, 29, 37, 97, 107, 157, . . .

It does not seem to be right. I have 47 after 37:

2× 3× 5× 7× 11× 19× 29× 37 =4709397,2× 3× 5× 7× 11× 19× 29× 37× 47 =2213416591,

and then 67, 103, 179, 191, 223, 271. . . .Here is a Mathematica program:

Page 12: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

8 Prime Numbers

Block[{n, p,Q, c, qq},c = 1; Q = 3; qq = 3;While[c < 40000,While[!PrimeQ[qq],c++; qq = (Q− 1) ∗ Prime[c] + 1];Q = qq;Print[Prime[c]];c++;qq = (Q− 1) ∗ Prime[c] + 1]]

Up to the first 10,000 primes

2 3 5 7 11 19 29 37 47 67103 179 191 223 271 293 317 577 643 673809 863 877 1049 1093 1129 1151 1381 1613 1637

2089 2131 2311 2957 3623 3833 4253 4271 4423 46735939 7717 8167 9133 9533 9539 9679 11059 11743 11969

14759 15859 15971 16139 17431 17713 17761 19309 19373 2074720983 23741 25261 25933 26501 26627 30859 30869 30881 3121931957 32647 33049 37087 40487 40531 42019 44059 48239 4878152181 53309 53323 54437 54787 55603 56401 57809 62219 6409164997 65011 67231 67601 68687 70373 71171 71527 72277 7423176819 77431 77933 81929 85381 86137 86711 86857 87179 8749191303 97001 97231 97379 104579 104717 110269

pn Qn = p1 · · · pn + 12 33 75 317 21111 231119 4389129 127281137 4709397147 221341659167 148298911531103 15274787887591179 2734187031878611191 522229723088814511223 116457228248805635731271 31559908855426327282831293 9247053294639913893869191317 2931315894400852704356533231577 1691369271069292010413719673711

Exercise

Variations of the theme:(1) do not requirep1, p2, . . . , to beprime numbers.(2) replaceQn by

∏nk=1 pk − 1 or

∏nk=1 pk ± 1.

Page 13: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

9

2p1 · p2 · · · pn − 1 = prime.

3 5 13 23 37 53 67 79 157 173191 197 277 281 461 479 503 619 829 907997 1033 1303 1459 1493 1663 2357 2467 3331 3347

3407 4093 4441 4591 4987 5179 5189 6911 8807 . . .

pn Qn = 2p1 · · · pn − 13 55 2913 38923 896937 33188953 1759016967 117854138979 93104769809157 14617448860169173 2528818652809409

(3) require both∏n

k=1 pk + 1 and∏n

k=1 pk − 1 to be primes.

Page 14: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

10 Prime Numbers

3.1 Prime links

A prime link of lengthn is a permutation of 1, 2, . . .n beginning with 1 and endingwith n such that the sum of each pair of adjacent terms is prime. This was proposedand solved by Morris Wald [12]. Forn ≤ 6, the link is unique. Forn = 7 there are twolinks: 1, 4, 3, 2, 5, 6, 7 and and1, 6, 5, 2, 3, 4, 7. Wald suggested working backwards.Start withn and precede it with the greatest remaining member of the set whose sumwith n is a prime, and repeat in like fashion. Here are the first 20 links:

1.1, 2.1, 2, 3.1, 2, 3, 4.1, 4, 3, 2, 5.1, 4, 3, 2, 5, 6.1, 4, 3, 2, 5, 6, 7.1, 2, 3, 4, 7, 6, 5, 8.1, 2, 3, 4, 7, 6, 5, 8, 9.1, 2, 3, 4, 7, 6, 5, 8, 9, 10.1, 4, 3, 2, 5, 6, 7, 10, 9, 8, 11.1, 4, 3, 2, 5, 6, 7, 10, 9, 8, 11, 12.1, 4, 3, 2, 5, 6, 7, 12, 11, 8, 9, 10, 13.1, 2, 5, 8, 3, 4, 7, 12, 11, 6, 13, 10, 9, 14.1, 2, 5, 8, 3, 4, 7, 12, 11, 6, 13, 10, 9, 14, 15.1, 2, 5, 8, 3, 4, 7, 12, 11, 6, 13, 10, 9, 14, 15, 16.1, 4, 3, 2, 5, 6, 7, 12, 11, 8, 9, 10, 13, 16, 15, 14, 17.1, 4, 3, 2, 5, 6, 7, 10, 9, 8, 11, 12, 17, 14, 15, 16, 13, 18.1, 4, 3, 2, 5, 6, 7, 10, 9, 8, 11, 12, 17, 14, 15, 16, 13, 18, 19.1, 4, 3, 2, 5, 6, 7, 10, 9, 8, 11, 12, 19, 18, 13, 16, 15, 14, 17, 20.

Guy [7, C1] calls this a prime pyramid, and commented that Wald’s solutions “arealmost certain to work, but a proof of this may be as difficult as proving the Goldbachconjecture”.

Exercise

Does this construction cover all primes (except 2) up to2n? This is the case for verysmalln, and also forn = 8, 9, 10.

Up ton = 27, there is at most one more missing prime.What are the missing primes (apart from 2) forn = 11, . . . ,20?In these cases, can you find another construction of the prime link with all primes

(between 3 and2n− 1) covered?

3.2 Repunit primes

Rn = 1n.

Page 15: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

3.2 Repunit primes 11

Samuel Yates.

Records of repunit primes.

3.2.1 Near-repunit primes

Caldwell and Dubner:JRM, 27 (1995) 35–41.

Rn,k := 1n−k−1011k.

3.2.2 Near repdigit primes

C. K. Caldwell,JRM, 21 (1988) 299–304; (1989) 101–109.

31331333133331333331333333133333331

all primes.

Page 16: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

12 Prime Numbers

3313313331333313333313333331333333315555511112222222111222222221112222211111115555555555551777777777771118888888888888117777777771111111444444444444444112222222222222222218888888888888888881777777777777777777716666666666666666666616666666666666666666661777777777777777777777712222222222222222222111114444444444444444444444411333333333333333333333111118888888888888888888888111114444444444444444444444444441777777777777777777777777111116666666666666111111111111111117777777777777777777777777777771333333333333333333333333311111119999999999999999999999999999999916666666666666666666666666661111111222222222222222222222222222222221113333333333333333333333311111111111113333333333333333333333333333333311111222222222222222222222222222221111111112222222222222222222222222222222222111113333333333333333333333333333333333333331444444444444444444444444444444444411111113333333333333333333333333111111111111111116666666666666666666666666666666666666666661444444444444444444444444444444444444444111119999999999999999999999999999999999999999999917777777777777777777777777777777777711111111111777777777777777777777777777777777777777777711119999999991111111111111111111111111111111111111117777777777777777777777777777777777777777777711111333333333333333333333333333333333333333333333333312222222222222222222222222222222222222222222111111119999999999999999999999999999999991111111111111111111999999999999999999999999999999999999911111111111111112222222222222222222222222222222222222222222111111111114444444444444444444444444444444444444444444444444444441999999999999999999999999999999999999999999999999999111115555555555555555555555555555555555555555555555555555111119999999999999999999999999999999999999999999999999991111111888888888888888888888888888888888888888888888888888881111113333333333333333333333333333333333333333333333333333333333312222222222222222222222222222222222222222222222222222222111111444444444444444444444444444444444444444444444444444441111111116666666666666666666666666666666666666666666666666666111111111119999999999999999999999999999999999999999999999999999999991111111222222222222222222222222222222222222222222222222111111111111111116666666666666666666666666666666666666666666666666666666666666666612222222222222222222222222222222222222222222222222222222222221111111777777777777777777777777777777777777777777777777711111111111111111113333333333333333333333333333333333333333333333333333333311111111111119999999999999999999999999999999999999999999999999991111111111111111111

Page 17: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

3.2 Repunit primes 13

Almost without efforts,3k1 is prime for

k = 17, 39, 49, 59, 77, 100, 150,

1777777777111111199927777777772222222111444111111144477777774444444777444444444744444449995555555557666666666188811111118888888111877777777788888887779991111111

Length 50:

(41, 9) 11111111111111111111111111111111111111111999999999(49, 1) 11111111111111111111111111111111111111111111111119(17, 33) 22222222222222222111111111111111111111111111111111(29, 21) 22222222222222222222222222222777777777777777777777(49, 1) 33333333333333333333333333333333333333333333333331(7, 43) 44444441111111111111111111111111111111111111111111(7, 43) 44444443333333333333333333333333333333333333333333(17, 33) 44444444444444444333333333333333333333333333333333(1, 49) 53333333333333333333333333333333333333333333333333(29, 21) 55555555555555555555555555555777777777777777777777(37, 13) 55555555555555555555555555555555555559999999999999(47, 3) 77777777777777777777777777777777777777777777777111(1, 49) 79999999999999999999999999999999999999999999999999(9, 41) 99999999977777777777777777777777777777777777777777(27, 23) 99999999999999999999999999977777777777777777777777(31, 19) 99999999999999999999999999999997777777777777777777

Page 18: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

14 Prime Numbers

Length 60:

(37, 23) 111111111111111111111111111111111111133333333333333333333333(31, 29) 333333333333333333333333333333311111111111111111111111111111(47, 13) 333333333333333333333333333333333333333333333331111111111111(49, 11) 333333333333333333333333333333333333333333333333311111111111(59, 1) 333333333333333333333333333333333333333333333333333333333331(17, 43) 555555555555555551111111111111111111111111111111111111111111(47, 13) 555555555555555555555555555555555555555555555557777777777777(19, 41) 999999999999999999977777777777777777777777777777777777777777

Length 100:

171729, 181719, 187713

29911,311789,411389, 447353,439761,489911,511989,79911,731969, 773927,89317,857743, 873727,

3.3 Palindromic primes

101113111114111

11118111111117771111

1111118111111111111151111111

111111188811111111111111111111111111

11111111116111111111111111111111111111111111

1115555555555555555555111

3.4 Primes inπ

Caldwell and Dubner:JRM, 29 (1998) 282–289.

Page 19: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

3.4 Primes inπ 15

Projects

Search records for primes of the following types:

• palindrome

• almost repdigit primes:NR(n, k; a, b) := an−k−1b1ak. Caldwell and Dubner,JRM, 28 (1996–1997) 1–9.

• palindromic prime pyramids, Honaker and Caldwell,JRM, 30 (1999–2000) 169–176.

• Mersenne primesMn = 2n − 1.

Page 20: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

16 Prime Numbers

3.5 Perfect numbers

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

1. (Euclid): If 1+2+22+· · ·+2k−1 = 2k−1 is a prime number, then2k−1(2k−1)is a perfect number.

2. (Euler): Every even perfect number is of the form given by Euclid.

3. Dudley,Cranks, pp. 243–244.

4. (Open problem): Does there exist anodd perfect number?

5. A theorem-joke by Hendrik Lenstra:Perfect squares do not exist. 1

Proof. Supposen is a perfect square. Look at the odd divisors ofn. They alldivide the largest of them, which is itself a square, sayd2. This shows that theodd divisors ofn come in pairsa, b wherea · b = d2. Only d is paired to itself.Therefore the number of odd divisors ofn is also odd. In particular, it is not2n.Hencen is not perfect, a contradiction: perfect squares don’t exist.

3.5.1 The first 10 perfect numbers2 3 63 7 285 31 4967 127 812813 8191 3355033617 131071 858986905619 524287 13743869132831 2147483647 230584300813995212861 2305843009213693951 265845599156983174465469261595384217689 618970019642690137449562111 191561942608236107294793378084303638130997321548169216

Some curiosa given by C. W. Trigg [11].

• P1 is the differenc of the digits ofP2. In P2, the units digit is the cube of the oftens digit.

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

• P4 terminates bothP11 andP14. 2

• 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 nonzero digits atleast once. It is zerofree.

• P10 is the smallest perfect number to contain each of the ten decimal digits atleast once.

1Math. Intelligencer, 13 (1991) 40.2These contain respectively 65 and 366 digits.

Page 21: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

3.5 Perfect numbers 17

Exercise

The isle of Pythagora, while very sparsely populated, is capable of supportinga population of thirty million. On the 6th day of the 28th anniversary of hisaccession to the throne, the king of the island called a meeting of his 496 advisorsto decide how to celebrate the auspicious occasion. They decided to divide theregal jewels among the people of the land. All the people, including the kingthe advisors, were lined up in a single file, and the jewels were distributed asfollows.Starting with the second in line, each person was given one jewel.Starting with the 4th in line, each second person was given two jewels.Starting with the 6th in line, each third person was given three jewels.Starting with the 8th in line, each fourth person was given four jewels, and so on.The man at the extreme end of the line noticed that the number of jewels hereceived corresponded to his position in line.How many people were there in Pythagora ?

Page 22: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

18 Prime Numbers

3.6 Abundant and deficient numbers

A numbern is abundant, perfect, or deficient if the sum of its proper divisors (including1 but excludingn itself) is greater than, equal to, or less thann. If we denote byσ(n)the sum ofall divisors ofn, including 1 andn itself, thenn is abundant, perfect, ordeficient according asσ(n) is greater than, equal to, or less than2n. The advantage ofusingσ(n) is that it can be easily computed if we know hown factors into primes:3

Proposition 3.1. If n =∏

k pak

k , then

σ(n) =∏k

pak+1 − 1pk − 1

.

What numbers are obviously deficient?4

All multiples of 6 are abundant. But not conversely. 20 is abundant.Are all odd numbers deficient? It is not true! 945 is the first odd abundant number.4095 is also abundant, but 4096 = is perfect!5775 and 5776 are the first pair of abundant numbers.Pairs of consecutive abundant numbers up to 10,000:

5775, 5776 5984, 5985 7424, 7425 11024, 1102521735, 21736 21944, 21945 26144, 26145 27404, 2740539375, 39376 43064, 43065 49664, 49665 56924, 5692558695, 58696 61424, 61425 69615, 69616 70784, 7078576544, 76545 77175, 77176 79695, 79696 81080, 8108181675, 81676 82004, 82005 84524, 84525 84644, 8464589775, 89776 91664, 91665 98175, 98176 . . .

Always the odd number smaller? True up to150, 000, 000.171078830,1,2 are the first triple of abundant numbers. (discovered in 1975 by

Laurent Hodges and Reid, Pickover, p.364.)

n factorization σ(n) σ(n) − 2n171078830 2 · 5 · 13 · 23 · 29 · 1973 358162560 16004900171078831 33 · 7 · 11 · 19 · 61 · 71 342835200 677538171078832 24 · 31 · 344917 342158656 992

Abundant numbers up to 200:12,18,20,24,30,36,40,42,48,54,56,60,66,70,72,78,80,84,88,90,96,100,102,104,108,112,114,120,126,132,138,1

196,198,20020: 1, 2, 4, 5, 10.Deficienteven numbers up to 200:2,4,8,10,14,16,22,26,32,34,38,44,46,50,52,58,62,64,68,74,76,82,86,92,94,98,106,110,116,118,122,124,128,13

172,178,182,184,188,190,194.Still more deficient numbers than abundant numbers.

3In Mathematica,σ(n) is given byDivisorSigma[1, n].4Primes

Page 23: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

3.6 Abundant and deficient numbers 19

σ(n) =∑d|n

d.

Check Honsberger on superabundant numbers.

Page 24: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

20 Prime Numbers

Page 25: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Chapter 4

Number Trivia

1. What is the largest prime what square has no duplicate digit?1

If p2 has no duplicate digits,p2 < 1010 andp < 105. There areπ(105) below105. We start from the top.

2. Twigg: 2 There is only one 5-digit number whose last three digits are alike andwhose square has no duplicate digits.

Thebault: 3 Determine the largest and smallest perfect squares which can bewritten with the 10 digits used one each in both cases.4

3. JRM 2543:5 Pandigital society number.

4. Knuth: 6 A positive integer is sorted if its digits in its decimal notation are non-decreasing from left to right.

(i) If n = 3h6k7, thenn2 is sorted. For example,

336472 = 13334263849.

What is the square of3h6k71?

(ii) Which positive integersn are such thatn andn2 are both sorted?

See also Blecksmith and Nicol, Monotonic numbers,Math. Mag., 66 (1993)257–262.

5. Twigg, Permutation-twin square integers,JRM, 21 (1989) 170–173.

N2 and(N + 1)2 have the same digit set; they have the same digital root.

1C. W. Trigg, E 385.396.S404.2Twigg, E389.397.S405.3E404.401.S408.432043 and 99066.5JRM, 30 (1999–2000) 227.6MG1234.861.S871.

Page 26: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

22 Number Trivia

The digital roots of successive integers form a periodic sequence

1, 4, 9, 7, 7, 4, 1, 9, . . .

132 = 169, 142 = 196;1572 = 24649, 1582 = 24964;9132 = 833569, 1592 = 835396;45132 = 20367169, 45142 = 20376196.

How about not requiring equality of multiplicities?

6. Charles Twigg,JRM, 24 (1992) 5: What three-digit squares have the followingcharacteristics?

(a) are palindromes.

(b) are permutations of consecutive digits.

(c) form reversal pairs.

(d) are three permutations of the same digit set.

(e) three of its permutations are prime.

(f) the sum of the digits is 19.

(g) is also a cube.

(h) the central digit is perfect.

(i) are composed of even digits.

(j) the central digit is a nonzero cube.

7. JRM 2049, 25 (1993) 156–157.

(a) Use each of the digits 1 through 9 once to form prime numbers such that thesum of the primes is as small as possible. What is this sum?

(b) Use each of the digits 0 through 9 once to form prime numbers such that thesum of the primes is as small as possible. What is this sum?

Answers:

(a) are palindromes. 121, 484, 676

(b) are permutations of consecutive digits. 324, 576

(c) form reversal pairs. 144 and 441; 169 and 961

(d) are three permutations of the same digit set. 169, 196, 961

(e) three of its permutations are prime. 163, 613, 631 of 361

(f) the sum of the digits is 19. 289, 676, 784

(g) is also a cube. 729

(h) the central digit is perfect. 169, 361, 961

(i) are composed of even digits. 400, 484,

(j) the central digit is a nonzero cube. 289, 484, 784

Page 27: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Chapter 5

Pell’s equation

1. Ramanujan’s house number.

2. An unidentified country has 7-digit population – and everyone has been given aNational ID Number, sequentially from one, allocated by no identifiable logic.

The Censure Minister has chosen three names at random, and is finding their IDnumber on the computer. When the first number appears on the screen, the Gov-ernment’s mathematical whizz-kid informs the Minister that there is preciselya 50-50 chance that the other two numbers will both be less than the one justdisplayed.

What is the population, and what is the first number?1

3. Heron triangle of consecutive sides. Solution in MG.

1Problem 2585,JRM, 31 (2002–2003) 71.

Page 28: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

24 Pell’s equation

Page 29: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Chapter 6

Heron triangles

From the MathWorld:1

A Heronian tetrahedron, also called a perfect tetrahedron, is a (not neces-sarily regular) tetrahedron with rational sides, face areas, and volume.

The smallest examples of integer Heronian tetrahedra composed of fouridentical copies of a single acute triangle have pairs of opposite sides

(148, 195, 203), (533, 875, 888), (1183, 1479, 1804), (2175, 2296, 2431),(1825, 2748, 2873), (2180, 2639, 3111), (1887, 5215, 5512), (6409, 6625,8484), and (8619, 10136, 11275)

(Guy 1994, p. 190; Buchholz 1992).

The only integer Heronian tetrahedron with maximum side length less than156 has edge lengths 51, 52, 53, 80, 84, 117, faces (117, 80, 53), (117, 84,51), (80, 84, 52), (53, 51, 52), face areas 1170, 1800, 1890, 2016, andvolume 18144 (Buchholz 1992; Guy 1994, p. 191).

6.1 Perfect cuboid

From the MathWorld:2

A solution giving integer space and face diagonals with only a single nonintegralpolyhedron edge is

a = 18720, b =√211773121, c = 7800, dab = 23711, dbc = 16511, dca =

20280, dabc = 24961.

1http://mathworld.wolfram.com/HeronianTetrahedron.html2http://mathworld.wolfram.com/PerfectCuboid.html

Page 30: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

26 Heron triangles

Page 31: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Chapter 7

Interpolation

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.

There is the famous Lagrange interpolation formula to find such a polynomial. If thevalue of a polynomial of degree≤ n are given atn+ 1 distinct points, the polynomialis uniquely determined. More precisely, if

f(x0) = y0, f(x1) = y1, . . . , f(xn) = yn,

then by puttinggi(x) =∏n

k �=i(x− xk) for k = 0, 1, . . . ,n, we have

f(x) =n∑

k=0

yk · gk(x)gk(xk)

.

Here is an approach to the problem, by considering the successive 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 given atn+ 1 consecutive integers 0, 1,. . . ,n.Then we can easily find the values off(x+ 1)− f(x) at 1, 2 . . . ,n. By repeating theprocess, we obtain the values of

7.0.1 Method of differences1, 2, 4, 8, 16,31,57,991, 2, 4, 8,15,26,421, 2, 4,7,11,16

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

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

Page 32: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

28 Interpolation

What isf(n+ 2)? How does the sequence

1, 4, 11, 26, 57

continue?The differences are

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

The next two terms are therefore 120 and 247.

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

=2n+2 − (n+ 3).

What about negative values?

f(−1) ={0 if n is odd,1 if n is even.

The values off(−2) are

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

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

7.0.2 Another pattern1

Now 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)?Answer: Ifn is odd,f(n+ 1) = 2

n+1 andf(n+ 2) = 1.If n is even,f(n+ 1) = 0 andf(n+ 2) = − n

n+2 .

7.0.3 Derivatives

For distinct indicesi andj, let

gi,j =∏

k �=i,j

(x− xk).

What is the derivative ofgi?

1See also [8, pp.174–175].

Page 33: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

29

log gi(x) =∑j �=i

log(x− xj);

g′i(x)gi(x)

=∑j �=i

1x− xj

g′i(x) =∑j �=i

gi,j(x).

Page 34: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

30 Interpolation

Page 35: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Chapter 8

The Catalan numbers

Cn =1

n+ 1

(2nn

).

Cn+1 =n∑

k=1

CnCn−k, C0 = 1.

The first 20 Catalan numbers are

C0 = 1, C1 = 1, C2 = 2, C3 = 5,C4 = 14, C5 = 42, C6 = 132, C7 = 429,C8 = 1430, C9 = 4862, C10 = 16796, C11 = 58786,C12 = 208012, C13 = 742900,C14 = 2674440, C15 = 9694845,C16 = 35357670, · · ·

• Catalan:

• Guy’s Example 74: The number of ways2n people at a round table can shakehands in pairs without their hands crossing.

• Euler:Cn is the number of triangulations of a convex(n+2)-gon into nonover-lapping triangles.

• Cn is the numbers of arrangements ofn 1’s andn −1’s so that the partial sumsare all nonnegative.1

1More generally, if

{nk

}denotes the number of arrangements ofn 1’s andk −1’s so that the partial

sums of all nonnegative, then

{n1

}= n, and forn ≥ k ≥ 2,

{nk

}=

(n − k + 1)(n + 2) · · · (n + k)

k!=

n − k + 1

n + 1

(n + k

k

).

See D. F. Bailey, Counting arrangements of 1’s and−1’s, Math. Mag., 69 (1996) 128–131.

Page 36: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

32 The Catalan numbers

– The number of mountain ranges you can draw withn upstrokes andndownstrokes.2 SupposeA andB are candidates for office and there are2n voters,n voting forA andn for B.

– In how many ways can the ballots be counted so thatA is always ahead ofor tied with B ? The answer isCn. 3

• Singmaster, Monthly, 85 (1978) 366–368.

• Cn is the number of ways of arrangingn pairs of parentheses meaningfully.4

8.1

The only odd Catalan numbers areCn for n = 2k − 1.

2Guy’s Example 71.3Hilton-Pederson, Math. Intelligencer, 13.? (1991) 64–75.4Guy, end of Strong law of small numbers.

Page 37: Recreational Mathematicsmath.fau.edu/yiu/PSRM2015/yiu/RECREATIONAMATHEMATICS/rec2003.pdfChapter 1 Graph Labelings 1.1 Magic hexagrams J. R. Hendrick, JRM, 25 (1993) 10–12. Label

Bibliography

[1] A. Beiler, Recreations in the Theory of Numbers, Dover, 1963.

[2] J. H. Conway and R. K. Guy,The Book of Numbers, Springer, 1996.

[3] U. Dudley,Mathematical Cranks, Math. Assoc. America, 1992.

[4] R. K. Guy, The strong law of small numbers,Amer. Math. Monthly, 95 (1988)697–712.

[5] R. K. Guy and C. Springer, Problem 1367,Crux Math., 14 (1988) 202; solution,15 (1989) 278–279.

[6] R. K. Guy, The second strong law of small numbers,Math. Mag., 63 (1990)3–20.

[7] R. K. Guy,Unsolved Problems in Number Theory, 2nd edition, Springer, 1994.

[8] R. Honsberger,In Polya’s Footsteps, Math. Assoc. America, 1997.

[9] D. E. Knuth,Fundamental Algorithms, 2nd edition, Addison-Wesley, 1973.

[10] P. Ribenboim,The New Book of Prime Number Records, Springer, 1996.

[11] C. W. Trigg, Some curiosa involving the first ten perfect numbers,Jour. Recre-ational Math., 23 (1991) 286.

[12] M. Wald, Solution to Problem 1664,Jour. Recreational Math., 21 (1989) 236–237.