You are on page 1of 204
STUDENT’S SOLUTIONS MANUAL FOR ELEMENTARY NUMBER THEORY WITH APPLICATIONS Second Edition Thomas Koshy ELEMENTARY NUMBER THEORY WITH APPLICATIONS Second Edition THOMAS KOSHY FRAMINGHAM STATE COLLEGE Contents Preface How to Study Math How to prepare for an Exam in Math How to Take an Exam in Math 1 Fundamentals 2 Divisibility 3. Greatest Common Divisors 4 Congruences 5 Congruence Applications 6 Systems of Linear Congruences 7 Three Classical Milestones 8 Multiplicative Functions 9 Cryptology 10 Primitive Roots and Indices 11 Quadratic Congruences 12 Continued Fractions 18 Miscellaneous Nonlinear Diophantine Equations Appendix A.1 ix 45 63 17 89 99 113 131 173 181 191, CONTENTS Preface ‘This manual contains detailed solutions of all even-mumbered exercisos inthe author's Elementary Number Theory with Applications, second edition. In addition, it includes some helpful suggestions on How to Study Math, How to Prepare for an Exam in Math, and How to Take an Bsam in Math | would like to thank Ward Heilman of Bridgewater State College, Roger W. Leezor of California State University at Sacramento, and Don Redmond of Southern Iinois University at Carbondsle for preparing the solutions of all even-numbered exercises in the first edition. I am also grateful to Kevin Jackson-Mead for combing through all solutions in the first edition, both even and odd, for inaccurate and incomplete solutions, and typographical errors. Althougit great care has been taken to ensure the accuracy of solutions and proofs, some errors may remain. These are solely my own responsibilty. I would appreciate hearing from users concerning any errors, as well as your thoughts and comments about the book, Finally, enjoy the book and have fun with this rich, dynamic, and fascinating area of mathematics. ‘Thomas Koshy thoshy@fre.mass.edu it PREFACE How to Study Math © Propare a well-planned and well-balanced schedule for each day of the week, ‘* Read a few sections in advance before each class. * Go to class well prepared. Be ready to ask and answer questions. + Do not skip classes. The information is cumulative; so every step counts, Always take down notes (on the RHS of your notebook; use the LHS for solutions of corresponding exercises from the book) ‘* Always have enough paper and peneils with you. ‘* Study the material taught in class again on the same day as the class. ‘© Pay close attention to symbols, notations, definitions, properties, and theorems. # Develop a decent working vocabulary of the subject. (Math is a concise and precise language; so ty to speak the language of math Muently,) '* Keep practicing definitions, properties, as well as theorems and their proofs in your own words. ‘* Study the examples, proofs, and exercises done in class; close your notebook; try to do them on your ‘own. If you eannot do them without help, study them again and try again. ‘= Do the exercises at the end of a seetion, after studying the section; do not reverse the order. ‘© Do not skip steps until you have mastered the material. ‘© Do not write over previous steps in a solution or proof. ‘+ If you cannot solve a problem because it involves a new theorem, formula, or some property, then resstudy the relevant portion of the section, ‘* Math can be learned in small quantities only. So, do math every day. Remember, practice is the best way to succeed. © Work with others whenever helpful. Seek help when in doubt or trouble. (e.g. teacher, fellow student, or tutor) HOW TO STUDY MATH Mako the best use of your professor's office hours. Go to him/her always well-prepared. Bring a list of questions to ask the professor. Math is a cumulative subject. So, build a good foundation to do additional work Always review earlier materials before each week. Things must be fresh in your mind for you to build on them. Use your time wisely and carefully. How to prepare for an Exam in Math © Review notations, definitions, formulas, properties, and theorems. Practice by writing them down. * Study every example worked out in clas. © Do a few typical problems from each section. On the night before the exam, go to bed early and get a good nights sloop, Otherwise, you won't be able to concentrate during the exam, your mind will wander, and the material will 1ook foggy. Do not stay up late to learn any new material. In fact, do not try to learn anything new the night before the exam. ‘The morning of the exam, glance ovor all materials to refresh your memory; focus on formulas, prop- erties, and theorems. « Ifa scientific calculator is allowed in the exam, make sure you know how to use the various keys and functions vii vit HOW TO PREPARE FOR AN EXAM IN MATH How to Take an Exam in Math ‘+ Taking an exam (in math) is en art. So, master the steps wel. '* Take enough writing tools (and a good scientific calculator with extra batteries, if allowed for use in the exam). ‘© Take a fow minutes to quickly glance over every problem. '* Do the problems that are easiest for you and those that carry the most weight. ‘The order in which ‘you answer the problems has no bearing on the score; what matters is the final output. ‘Always write the formula, if a formula is involved. © Save all your work on scrap paper for later vasification. # Thon do the less easy problems. ‘* Whenever possible, save enough time to check your answers at the end. ‘© Always double-check the solutions that carry the most weight. Good Luck HOW TO TAKE AN EXAM IN MATH Solutions to Even-Numbered Exercises HOW TO TAKE AN EXAM IN MATH Chapter 1 Fundamentals Exercises 1.1 (p. 7) 2 tor-t 4. 00r1 6 0 8. 1,9, 45, 55, 99 10. 635, 318, 657 = 59* + 1584 = 1334 + 1344 12, A number which is a square, cube, and fifth power must be of the form n?*% = n%, So the desired number is 2°° = 1, 073, 741, 824, 14, Let n be an arbitrary positive integer such that: n? can be displayed on a 16-cigit calculator. Then n® < 999, 999, 999, 999, 999; that is, m < 3VTIT, TTT, TTT, TIT, TTL. Thus n < 31,622,776; that is, there are 31,622,776 positive integers whose squares can be displayed on the calculator. Including 0, the final answer is 31,622,777. 16, proof: case 1 Suppose a, > 0, Then ab > 0,0 [ab| =a case 2 Suppose a > 0 and b <0, Since a{-b) > 0, Ja(—b)] = a(-8) al - |b] = Jal - fp), But a(—8) = ~ab, so [a(—b)| = |-ab] = jab]. Ths ja = [a case 3 The case « $0 and 6 > 0 is similar to case 2. case 4 Suppose @,6 <0. Then ab > 0 and [ab] = \(~a)(~8)] = [0] |b), by case 1. Thus |ad| = |a\- 2 18. proof: Let n= 2k-+1 for some intoger &. Then [n/2] = [k + 1/2] = = (n= 1/2. 20, proof: Lot n = 2k +1 for some integer k. Then [n2/4] = [k@+k-+1/4] = RP +k = A(R +1) = (m= 1)/2- (9+ )/2= (0? = 1)/4 4 CHAPTER 1. FUNDAMENTALS 22, ease 1 If mis even, then [n/2] + [n/2] = n/2+n/2 case 2 fn is odd, say, n = 2k-+1 for some integer b, then [n/2) +[n/2] = k+(k-+1) = 2k-+1 =n. 24, proof: Let c= k+2", where 0 <2" <1. Then ~ 26. proof: Let z= k+2', where 0 <2! <1 Then ko if 1/2 R44 otherwise So [2k +22") —b- [zx'] =k + [22' - [2'} e412) ite’ < 1/2 _ fk+o-0 k41-0=k+1=[241/2| otherwise Thus [22] — {xj = | +1/2] 28. proof: d(x, y) =|y ~2] 2 0, since Jal > 0 for all a 30. proof: Suppose d(z,y) = 0. Then |y~2| =0, so x = y. Conversely, let 2 = y. Then y—2 =0 and hence |y — 2 = 0. ‘Thus d(r,y) = 0. 2. dle) = |y—al=ly-2) + -2)] lr at lea] Aey) + dle, 2) = dle 2) + dle) 3 n ifmisoda fo (0 one =} Exercises 1.2 (p. 14) 2. SG4A)= 34 Hk=5.34 4.0 3=6-3=18 a 6. 1 Mw : M4: S0-2) = 3543 a8. BE SE oT 10. SG oKyk = @ 12. Est 14, S464) = Proof: RES = z grin =F of, whore} = n-+m—t = LHS 2. Sas ay (n+ys—1 (ny iP—1 as Therefore $ By Eins) as a aT Sai? +344] aye + age + a 35-4+3n(n+1)/24n, where § denotes the desired sum n? 43n? +3n—3n(n+1)/2—n m3 43n? +2n— 3n(n+1)/2 a(n + 1)(n +2) — 3n(n + 1)/2 n(n + 1)(2n+1)/2 n(n + 1)(2n+ 1/6 ) = Eee 643-42) E(ai=0s) 12s 4681 = 12. BE + 63 405 Cee = E(eZ-$s+E)) RVR RITE = = Eor-H+9) = 637-1551 =6- 8! 15.5 = 55 h & 6 CHAPTER 1. FUNDAMENTALS %. F@+)=0+N04)2+H841) <2 8. TL io 30. Sp p=2434547=17 32. [] (3-1) =(8-1-1)(8-2-1)-3-)@-5-1) = 1120 er BA. SD (12/a) = (12/1) + (12/2) + (22/3) + (12/4) + (12/6) + (12/12) = 28 36. esta Sltl¢1¢1=4 38 (a 7) (g ») (g ») ( ») = (14°15)22224 99 (6) = 20,995, 200,000 4 40. 38 — 9-1) = 31-3 = 81-1 = 80 2 = Blow tanta) = (anton +a) +(012 +002 +082) = 941 +13 + Gai + G29 +031 + O92 44. ay tan +3 von to 46. TL G+ 1/n) = TL 8 BB gf = 1028 48, Soke M = S[(k-41)!- Al] = (ntl = (ntay!-1 50. By Exercise 48, Jo kk! 1000! — 1 = ...999, s0 the hundreds digit is 9. Exercises 1.3 (p. 24) 2. no; has no least element. 4. yes 6. proof (by contradiction): Assume there is an integer n’ € such that n! < mot l= 1. Then ng +I 1 < *, Since n —no +1 € S* and w—~no +1 < 1°, I" is not a least clement of S*, a contradiction. 8, Let A be a non-empty set of nogative integers. Then B = {ala € A} is a non-empty set of positive integers and has « least element / in B, by the well-ordering principle. Thus —a > ! for every a € A; that is, a-<¢ for every ain A. Since -1 € A, —1 is a largest element in A. eee eae eee andi + 1 + on = on + (Ht) $e DY Fo FB ET = (ti) + (tt) + + (R41) + (HI) + (ned) = n(ntl) s = san 14. Basis stop: When n= 1, LHS = 1? =1=1.2.3/6=1. Therefore, P() is true. Induction step: Assume P(k): 3° = MALIOR Then = HAMOEED a yay _ cee [Hebe _ Ge Te (KADELBK+3) _ (k++ DARED +1) é 6 ‘Therefore, P(E + 1) is true. Thus P(n) is true for every n > 1 16. basis step When n = 1, LHS 2t—) _ RHS. Therefore, P(1) is true. induction step Assume P(k) is true: So ar! = 2. Then: ket & Sart 2 Sarl! + ort tar’, by the inductive hypothesis i 1 sark(r=1) _ a(rtt1—1) rat ‘Thus, P(K) implies P(k +1), s0 the result follows by induction as, $9 42) = $642.58 1 = (60-61/2)2 + 2-50 = 1,625, 725 20. SP = Fa) + [2/2] + J9/a) +--+ [DEL a DE Db eo (a2) + (m/2) if mis even TL ert 24 24. + (n-124(n—/24 (n+ 1)/2 otherwise a ecereemey) ifn is even ai MAL +B@+--- + (n—1)/2]+(n+1)/2 otherwise 2An/2)(n/2+1)/2 if nis even 2 = 1/2]l(n— 1/241) + (04 1)/2 otherwise n(n + 2/4 if nis-even (n+1)?/4 otherwise 2, Luwry-Le +38 ti pet per lett) in 42) as Moen AS 28 +3243) MEY n(n +1) +2nt1 41) = Tot bE) a2 SED guts) it fe= ah = ferme saa.. a were u Sum of the numbers in the magie square = 142+. That i, nk = MOE, go k= nite, L424 ade HONE =r a1 ‘Total number of grains a 4 feseeyaein 4 ataen] iutth (aug 4 4) = atin case 1 Let n be even. Then OLED Et (0/21) + Ltt 4 On ont + (n/2— Dj +n/2= CHAPTER 1, FUNDAMENTALS gfe wopnt 9. mason 4 nen) nn) 42) ica ny M(o3V/2 = (pyre /2 2 (n/2— 1 +n/2 2(n/2—1)(n/2+1) on Soaacaeaaeia case 2 Let n be odd. Then Om = OFTET H+ (n— 1/24 (n—1)/2 2. Bol adh = M42+ (nV n= o 1 2 ife no To prove that P(n) is true for every n > no: Let S denote the set of integers > mo such that P(n) is false. If $ = 0, then we are done. So, assume S #8. Since P(np) is true, no ¢ S. By the well-ordering principle, $ has a least element ! and P(() is false, Since ng ¢ $ and Le 5,1 # no; $0 1 > no; that is, 12 ng-41, orl —1 > no, Sinee 1 no, Exercises 1.4 (». 2) 21,347 41,235) 10 6, 8 10, 12. 14, 16. 18, 20. 2. 24, 26. CHAPTER 1 1,2,8,6 a = 3 Oy = Gn $5, 232 a = 1 =a; + (n= Nd sat (n= 1d Oy = Taney WB? Sy = atbartar? poeta PSq = arbartesebar™! ar 1S, —Sn = ar"—a; thatis, (r—1)S, = a(t" —1) SoS, = # Gm = Ona + (n—1) ana2 + (n~2) + (n-1) On-3 + (n — 3) + (n —2) + (n~1) ay tit 2b (n=l) = 14 [bP been) = MeENa1, nel MOEN +1 < 2076 < Met sO) < onra < mast nin- 1) <4182< n(n +2) ‘Therefore, n = 64. a =i On Gna tn?, nd2 proof (by induction): Let P(n) : by =2"—1, where n > 1 basis step Since b; = 1, the statement P(1) is true, FUNDAMENTALS induction step Assume P({) is true for an arbitrary integer k > 1: bj = 2*— 1. Then beer = 2y +1 = 2124 1) $1 formula works for every integer n> 1 (98) = 1 +1 _ 1, so the formula works with n= k+1. Thus, by induetion, the u 28. f(91) = J(f(202)) = f(201) = 91 So f(f(91)) = f(91) =91. 0. (90) = f(FQ201)) = FOL) = f(F(102)) = #092) = F(F(103)) = 7(93) = F(F(208)) = F199) = 1, by Exercise 29 32, A(O,7)=7+1=8 34, Key steps: A(2,1) 5 A(1, 2) 4 A(1,5) A(1,8)= 11 A(1,3}= 15 AQ,5) = 13 AQ,13)=29 AG,3)=61 A(5,0) = A(a,1) AGB, A(2,5)) (3,13) A(2, A(2, 2, AG, 3)).u) = A(@,AQ,.-AQ,61))..) ea = 65,533 36, Let P(n) denote the given statement. basis step When n = 0, LHS A(1,0) = A(0,1), by definition, 141, by definition = RHS Therefore, P(0) is true Induction step Assume P(k) is true: A(1,k) =k +2, Then: AG,B+1) = A@,AQ,8)), by definition = A(0,k-+2}, by the inductive hypothesis = (kt) 41843 ‘Thus P(R) implies P(k +1), so the result holds for every integer n > 0. 38. 4,0) = A(2,1) = AQ,AQ,0) = AQ,AG,1) = AQ,A(,40,0) = AQ,A@,A0,1))) = AQ,AO,2) = AG,3) A(0, A(L,2)) = A(0,4) 5 AGI} = A(2,A(3,0)) = AQ,AQ,1)) = Al2,5) = 13 2 CHAPTER 1. FUNDAMENTALS Similarly, A(3,2) = 29, A(3,3) — 61, and A(3, 4) = 125. Thus we have: AG3,0) = AGA) A@,2) = (3.3) AGA) = 125 = 249-3 Following this pattern, we conjecture that A(3,n) = 2"*5 - 3,n > 0, 40. We have: In general, Since 9999 mod 4 = 3, it follows that uswoo = u us us dats 4 ifmmod4 5 ifnmod4 2 ifnmodd = 2 1 otherwise te Exercises 1.5 (p. 38) 6 (tay)? ‘Total number of gifts sent by the nth day = So C(-+1,2)=C(n +2,3) (22 — a)" =F O(09(82)(-9—" Coefficient of xt? C(G,r)2"(-3)°", where = ©(9,4)24(-3)° = -489, 888 Screen 8+ L2x8y + 60aty? + 160x%y! + 2402%y! + 192ey4 + 64y* 10, 12 4, 16, 18, 20. 22, 24, 26. 13 (41/079 = Scions Middle coefficient = (10,5) = 252 (et =F C(r)etyh Largest binomial coefficient = C(6,3) = 20 (ery y Cryer Largest binomial coefficient = C(8, 4) B= ¥C0,)B.= Be By = 55 O(1,i)B)= Bo + By =2 By = 3 C(2,4)B, = Bo + 2B) + By =142-142=5 a YC(B,)B = Bo + 3B: + 3B + By = 143-143-245 =15 (n=1) nwa)! RES = Fas = FED a 2 gn =) ~ aR Gnjnsinn) (any _ (2) GST = meri = nat ‘The LHS is the difference of two integers, so the LHS is an integer. Consequently, the RHS is an integer. Therefore, (n+ 1)|(2*). proof: (1 +2)" = x ()2. Let 2 = 2, Then -Ex() proof: (1+) = (x +1)(1 +2)". The coefficient of 2"* on the LHS is (,2%,) and that on the RHS is (2) (). Hence the rest: Let 5-Yet «(7 ay Reverse the sum on the RHS: s-Yeeetn na(,",) = Sole+ oma (2) (2) 4 CHAPTER 1, FUNDAMENTALS Adding equations (1.1) and (1.2), 28 = Soensns(t) = aan (") = Gan 2° im S = (tatndja"-? 28. proof: By Exercise 27, (2) < (2) < + < (2) < (0), where r < $2. Therefore, (*) is maximum when r is the largest integer < "2 case 1 Let n be odd, say, n= 2k +1. Then case 2 Let n be even, say, n= 2h, Then $2 = 2! — b+ J. Sor must be k= n/2 = [n/2). Thus, by eases (1) and (2), (%) is maximum when r= [n/2]. 30. proof (by induction): Let P(n) denote the given statement. When n= 1, LHS = =RHS, Therefore, P() is true, Assume P(A) is true, where & > 1 = +1. Sor must be k= 34 = [n/2] BO ser SC) = SUC) C2) win ft ia - E244) = EQ eeen(eh) Ze-06 8) E4) - £0-£0-£0 = betty 1428, by the IM and Exercise 25 = (eno ‘Therefore, P(k +1) is true. Thus, by induction, P(n) is true for every n > 1. Hence the result (rat). Let 2 = 1. Then n-2"1 = ¥ r() = ct 32, proof: n(1 + 2)"! = 2 = 1-0 EO = O+@=113-1-9 EO = O+O+@=-1+3+6=0-@ 6 36. As in Exercise 34, we conjecture that $5 (5) = (*f") mt), 38. Using Bxercises 34 and 36, we conjecture that 3° ({) = (S21 Exercises 1.6 (p. 48) 2. Let tn = 666; that is, n(n + 1)/2 = 666. Then n? +n — 1832 = 0; that is, (nm —36)(n +36) = 0. So n= 36, 4, Bey ETS Salm $1)/2-+ 1 = dn(n +1) +1 = dn? $n 1 = (2041)? = song 8 Py = Pao +3n—2= Pao + (3n— 1) - 2430-2 Pua + 3{(n~1)-+n}—2-2 = Pag $3l(n—2)+(n—1) +n] ~3-2 = FAA I En) = 200-1) 1+ 8{n(n + 1)/2—1]-2(n—1) = n(3n-1)/2 8B tits = n(n-1/2+n? = nQn~1)/2= Px 10. y+ toa = n(3n = 1)/2 + n(n — 1)/2 = n(2n—1) = hh 12. By Theorem 1.13, 8in-1 +1 (2n—1)?, $0 8tya1+4n = (2n— 1)? +4n 14. proof: — 2ny(en+y) tay — 2p 7 16, By ‘Theorem 1.11, ty +t:-1 =. Letting, k = th, this yields the desired result. (This can be confirmed algebraically also.) 18. proof: Let n= m(m + 1)/2. Then (Qk+1)m tty = (2k+1)%m(n+ 1)/2-+ bl + 1)/2 = [2b +)? (m? + (2k +1)? E+ I)] /2 = [Qk-+ 1pm + Ak + 1)m4 1/2 = N(V41)/2, where = (2k 1)ma +k = twovenyas 8 triangular number 16 CHAPTER 1. FUNDAMENTALS 20. in = gat +4 —3= hina + [A(t — 1) — 3) + (4-3) haa + dif — 1) +n] -2-3 FAQ 434---4n) +3(0-D 14 4249-4---4n)+3(n— 1) = 1+ 4in(n+1)/2-1]-a(n-1) = nQn~1) 22. er = lien ena tnd, n>2 24. 1,8, 21, 40 Ont +60 — 5 = On~2 + [(6(n — 1) ~ 5] + (6n—5) onan +6l(n 1) +n] -2-5 = os + 6l(n—2) + (n= 1) +n] -3-5 1 + 6(2+34--+n)—5(n-1) 14 6[n(n-+1)/2-1)-5(n-1) 1+8n(n +1) 6 -5(n=1) n(8n— 2) 28. Both 6 and 6? = 36 are triangular numbers. 30. 1225 = 49. 50/2 = 35%; 41616 = 288. 280/2 = 204%; 1413721 92. 9g = WISER roiaVia2 _ aartaaana sre4s70-2 2 35, as = OtAVEP ar sa/—2 _ aurea ginaee 34 a Exercises 1.7 (p. 52) 10. 5 Pa Tan + Toca ey Tyg + CHPOaD 4 fostn nines) 4 Gegbe mbn ‘ nie) 144 te ep UB yD AA. 4 stm minty sary Spar tn? Spat (n— 1)? +n? Snaat(n— 2)? + (a 1? +n? SAP AP ek (na IP be? LER (WP bn? nan) 3 = Pit EY nde 3 a= Sek -1) pie Sea o[seyen] agin bey] mG) _ ale 9009 4 1) 3] nition 2 En CHAPTER 1, FUNDAMENTALS = nat 2nt—n Hy-a+ [2(n—1)? ~ (n-1)] + (Qn? ~n) Hy-a-+ [2(n— 1)? + 2nd) = [(n— 1) +m] = Hy + 2[(n— 2)? + (n= 1)? +4] —[n—2) + (m1) +] = Wt QR 4324 nt)— 4340 4M) = 14202438 tnt) (2434+-+n) = seen fasengonsn 9] [ayen = 1p neuen nies yy F Men S 4 [se -aha] = sr i5(an + 1) ~ 9] snenyanes) _ ste] ns y(sn=2) Exercises 1.8 (. 57) 2 o) Ce mm) 2 Gat pay aa iat ~ aS = atatinlin +) ~ a] = Athy = Cnl0.25em) CP) = a Re = hip = Cn eH) = 2@)—2Re = (2-28) = al) = Ze JOM = ()24Ca + (3)2Cr + (3)2°C2 = lere-4- 14242 19 10. C(x) = Cy $ Cyn + Cyn? 4-H gz + (Clay? = CoCo + (CoCr + CCa)e + (CoC + CrCr + C2Co)2? + Oy + Cort Cyr? +--+ Capit + 12. Since Vi=ae = it follows that at By Exercise 11, this implies that That is, dow “yo ()= Equating the coeflicients of 1", we get the desired result: sans) Review Exercises (p. 60) 2 SH er4ay) = Seuss hs Biss it 4 7 = Sara t2)-20 = m?_m-4 6 Hise = fs = fpamene a yey = tye ase pus sian grinsinins2y/3 16. mona CHAPTER 1, FUNDAMENTALS =2%, where T, denotes the nth tetrahedral number. £(8:)-§ae-he-o h(n 1) +4(n 1) h(n 2) -+-4(n 2) $4(n = 1) ‘(w —3) + 4(n 3) 4 4(n = 2) + 4Gn~ 1) AQ) 44 424-4 (nD) 044-(n—1)n/2 Qn(n—1), m 21 anit n(n+1) aq-2t (n= Int n(n +1) aq-at (n~2)(n—1)+(n~ Dn+n(n +1) ey F2-348-4 4 bn(n +1) 1242-34--4n(n 4) Eieen- Berke insayana pais nest) ana tort Cr en a yas FMF INF BONE ay F242 tbo THERE OM 2-1, mel 22. ay = nar t {n/2], whore ay =1 LA [2/21 + [3/21 + [4/2] + 15/2] 4+ Ff} = 1LF14 2424-04 [nf] _ [e248 etna) if mis even Ol 4 2434-4 (n—1)/2]+ (nt 1)/2 otherwise 2n/2}(nf2+1)/2 if nis even 2i(n—1)/2-(n+1)/2/2+ (n+ 1)/2 otherwise n(n +2)/4 if nis even (n+1)?/4 otherwise 24. proot: Since ( Va ~ vB) 20, a+b-2Vab > 0; that is, (a + 0)/2 > Vib. 26. When n= 1, LHS 3822) = RHS, Thoroforo, P(1) is true Assume P(k) is true: (28-1)? = M2, hen: ken b Vei-1? = Vei-?+ee+1? a iat (ak? 1) ora oh 41)? = RADOE+ YOR) Sreaeec ver aeECEa (E+ 1a +1)? — 1) Ss ‘Therefore, P(k) implies P( +1), so the result follows by induetion. 2 Let P(n): an = Bettie) When n = 1, a1 = 492 = 2. So P(L)is true, Assume P(A) is true. Then ona = ant HE +2) EEN a py = (eenasn [f+] -Merueeneen ‘Thus P(k) implies P(k + 1), so the result follows by induction. 80. Let P(n}: an = 2"~ 2. Since ay Then age = an +2* = (24-1) +2 induetion, 21-1 = 1, P(1) is true, Assume P(k) is true: ag = 2* ~1 HH — 1, So Pk) implies P(k +1) and the result follows by 32. proof: 34. thot tao H tay tae tian ties = tas thao t+ tay tts tag + tro + tar + toy + tga + tot tas = tae + tart tse tse + tao 2 CHAPTER 1, FUNDAMENTALS 36. = Se-2 J=8-g-8-1 Thus So n(n + 1)/2) 40, 2tgtyan = 28 ED MED abet 1y 42 gta tlacatey = MERIBAD 4 (etn = Mts 1) += 1k-1)) hte tae 44, DHS = Qk-+1)2. MED 4 MeeD oke1)'n*4(0k-1)tnth(el) Qeerjnsei|i2e tyne = tekenth 46. proof (by induction on n): Clearly, itis en integer when n= 0 and 2 Now, assume the result is true for an arbitrary integer k > 0. Then: [e+ 1)r] (ry) e+ apr}! kiiry (kr trib r= 1). (kr 1) err (krtr= 1)... (r+) ey a Since the RHS is an integer, so is the LHS. So the result is also true when m = k+1. Thus, by induction, the result is true for every integer n> 0. 48, Since ay satisfies the same definition as Fy, it follows that ay = Fy, n> 1. Supplementary Exercises (». 62) 2 (PLDC a2) = (a2? 4 Bad) 4 (a2? + BCA) (0% + UPd? + Dabed) + (ad? + B22 — 2abed) (ac-+ bd)? + (ad — be}? 6. Let $= Si. Sum of the numbers in the array = $428 +39 4-408 = (142484 dns? But the sum of the numbers in the array also equals the sum ofthe elements in euch gnomon, which i424 beknd = L. Thsj be & a = 1 Oy = an + MED, nd nip ot i! 10. LHS = Sis EES AT = tail inl nt Doe aca Tana we = Rus 12. (by J. Snow) To evaluate the given expresion, we use the follwing denis mG) =k asgar dS kG) = nae XC) Dat )e wa a ek 4+2k-1) = EGE meee EG} = n{Sie-n(f Ja-nsays (f= e-we (ED} = nfin-03( hoa) (k= 2-41) + 2(n — 129-2 42" ‘}, by (8) and (2) . nfin-nf(r)a-a4 (- 2) | senate ‘| = nf(n= ln 2)2"-9 + 2"8] 4 02"-}} = nfl 1)fna"-9 2"? 97] nat = nfn2QF = nD"-3 4. nh“) = m(n?2"3 — "3.4 dn2"4) 24 CHAPTER 1. FUNDAMENTALS = n(n?"-3 432") = ni2t%n 4a) 14, nou $ 1)(n+2)(0 +3) 41 = (n+ 304 1)F and n? 4 Bn + 1 = MentdelnAy int) 16. 8444596 18. The given sets contain 1,2,3,4,... elements respectively. Let F denote the first element in the nth set and L the last element, Notice that Z is the k-th element of the arithmetic sequence of odd positive integers where k = n(n +1)/2. So 5,7...) with first term a= 1 and common difference d = nfoe +1) boot th-naniea[ 7 weeniern—a ‘Therefore, last term in the (n—L)st set = (n—I}n—1, by changing n ton—1, Then F-= n(n 1) +1. Since the n-th set contains n elements, [(m—1yn +2 = Su FUP +E) =F flr) +1) + [n(n + 1) - a} = Flom -1) tan ny] =n? 20. Let Su = 3 = Do MY, where k= n(n +4)/2. Then: a fare 1 [A(k+ 1) QR +1), k(E +1) s 3[E°-E4 [aes 2 AURA IE+2) _ [rf 3)]fr(n +1) + Brin +1) +4] 6 Fe eevee Ee as eeEaPEE n® 4 3n+ Ont + 13n? + Lan? + $n ssSoeCTTEaEeL geen veELSEREESIEEE Changing 2 ton =1, = 3n6 +9n! ~ 1309 + Ldn? ~ Sn 6 = Sebtaget ten _ nntessy Sno Therefore, desived sum = Sy, 22. Georsia Chapter 2 Divisibility Exercises 2.1 (p. 70) 2.057 42 6. 12 has six positive factors: 1, 2, 3, 4, 6, and 12; so f(12) 8. 17 has exactly 2 positive factors, namely, 1 and 17; 80 f(47) 10. No. of positive integers < 3076 and divisible by 28 = [3076/23] = 133 12, No. of positive integers < 3076 and not divisible by 24 3076 — [9076/24] = 3076 ~ 128 = 2048, 151 ~ 131 = 120 14. (3776/15) 16, No. of positive integers < 3776 and not divisible by 19 = 3776 — [3776/19] = 3776 — 198 = 9578 No. of positive integers < 1975 and not divisible by 19 — [1975/19] = 1975 — 103 = 1872 Desired answer = 9678 — 1872 = 1708 eT 20. F 22. Fy 26 CHAPTER. 2. DIVISIBILITY 24. 26. F 28, 3] — 3 and —3)3, but 34 —3. 30. 412-6, but 4 J2 and 4 6. 32, Sp 1 = number of positive factors of 12 = 6 34. 5 1 = sum of the positive factors of 18 =1 =2+3+64+9418 = 39 ie 7 36, f(16) = 1+ #(17) =141+ f(18) = 2+ f(18) =241=3 38. proof: (ran)b, 90 mn = 1, Thus m ince alb and bla, b— ma and a = nb for some positive integers m and n. ‘Then b = m(nt) = & =leoa 40. proof: Let x and y be any two even integers. Then 2 = 2m and y = 2n for some integers mm and m. Then a+ y = 2m 2n = 2(m +n) and xy = (20)(2n) = 2(2mn) are even integers. 42, proof: Let x and y be any odd integers, Then © = 2m +1 and y= 2n-+1 for some integers m and n. ‘Then ay = (2m + 1)(2n + 1) = 2(2mn + m+n) + 1, which is an odd intoger. 44, proof (by contradiction): Let 2 be any integer such that 2 is even. Suppose 2 is odd, so 2 = 2k+1 for some integer k. Then 2? = (2k +1)? =2(K2 42k) 41, an odd integer, which is a contradiction, 46. proof: Let « and y = 2+ 1 be two consecutive integers. Suppose = is even, say, x = 2m some integer (2ma)(2mn + 1) = 2(2m? +m) is an even integer. On the other hand, let = 2m 1 be (2m + 1)(2m +2) = 2mm + 1)(2me +1) is even, Thus, in both eases, zy is even, m, Then 2 odd. Then ay 48. proof: Let n be an odd integer. By the division algorithm, n is of the form 4k +1, where r = 0, 1,2, or 3. But r #0 or 2, since m is odd. ‘Thus n is of the form 4k+1 or 4k +3, 50. proof: Let x and y be any two integers of the form 4k +1. Let x = 4m +1 and y integers m and n. ‘Then xy = (4m +1)(4n +1) = 4(4mn +m +n) +1 is also of the same form, in +1 for some 52. proof (by contradiction): Let x and y be any two integers. Suppose 2 or y is even. Then, by Exercises 40 and 43, ry is even. This contradicts the given hypothesis, so the result follows, 54. case 1 Let n be an even integer, 2k. Then Dn +3n7 n= 2(2K)* 4 3(2K)? + 2k = 2(8k9 +68? +4) an oven intoger. or case 2 Lot n yk + 1, an odd integer. Then ant 4 an? +n 2(2k + 1)% + 3(2k +1)? + (2k+1) 208K + 128? + Ok +1) + 3(4K? + 4h +1) + (241) 2(8E* 4 18K? + 13k 43) a ‘an even integer. 56. proof (by 8. B. Tadlock); = nlnt 1) n(n? = 1){n? +1) nla —I)fn+1)(n? —5n +6450 —5) nla I)(n+1){la~ 2)(m—3) +5(a— 1) = (n= 3)(n—2)(r— n(n + 1) + 5(r = 1Pn(n 3) ‘The first term on the RHS is the product of five consecutive integers, so it is divisible by 5! — 120 Since 31|(n—1)n(n +1), the second term on the RHS is divisible by 5-6 = 30. ‘Thus the RHS is divisible by min{120,30} = 30. Consequently, 30)n — n for every n. 58. proof: Let a and b two integers such that a? +1 = 8%, Then (b+a)(b—a) —6?—0? = 1, s0b-ba=1, Thus b=1-@<0, since a> 1. 60. proof: Let n—1, n, and n-+1 be threo arbitrary eonsecutive integers. Then (n—1)*-+n+(n-+1)® = ks that is, nin? +2) = 8, so 3th, 62, proof: Let P(n) donote the given statement. Then P(0) is true. Assume P(k) for an arbitrary integer A> 0: 2k? + 3k? + kis divisible by 6. Let 24° + 3k? +k = 6m for some integer m. ‘Then ARDS +304 TP (E41) = (2+ 3K? +) + (2K? 42k 41) = 6m+6(2k" 42k +1) is divisible by 6, so P(k+1) is true, Thus, by PML, the result is true for every integer n > 0. 84. 24 3n—1 = (3-1) 43n 1 = EF eps (ay + an-1 te ? (am)gt—r(ayr = an 14 dn = Se epsteay- on SB (PIB E+ (G5) 9) — 9H Which is clearly divisible by 9. 28 CHAPTER 2. DIVISIBILITY 66. The largest nontrivial factor of N = 2° 1 is N/d, where d is the smallest factor of N. Notice that 2 UN, So 3|n. Thus the largest factor of Nis N _ 2-12" 41) _ 32767-32769 sie: 3 = 82767-10923 = 32767-3-11-831 , 909, 493, 977, 543 Exercises 2.2 (p. sr) 2. 27 4. 6518 6. 1244. 8. 81C satan 10. 32. 12. 265.0 14. 37eixteoon 16. BBcaten 18, 1001111 ng 2, 11101011010 22, 6484442 if 2 4 8 43 8" 172" 34d* 688 30-43 = 86 1172 4 344 +688 = 1290 29 24, 9692-44 I reteset revere 1eriee.a so [ne 206" 4729441888 36-59 = 236 + 1888 = 2124 26. spe 7 3 7 aa 86" 172 sua 688 30-43 = 86 4172 + 344 + 688 = 1290 28. fs eae9 tara ana aaea so 18236" 472 9441868" 36-59 = 236 + 1888 = 2124 30. 2? 4 8 w ai 62" 124 248496 902° 1076 = 992 + 62 +[22 quotient = 32 +2 = 34 remainder = 22 2. i eaceana tae eremno Haare 43 [86 172 3H 6881376 2076 = 1376 + 688+[12 quotient = 32 + 16 = 48 remainder = 12 34. 1076, 3056, 3CAB, SABC, CACB 36, 12 38.5 40, Clearly, b> 5. 5420? + 2b-+4 = 7642, 90 b° +20? +3b = 7698, Since 7638 = 2-3-19-67 and 617638, b= 19 or 67. 445 46.3 =19 works, but not 67. 30 48. 50, 54. 10BFaieteen 45 17,340 * 310 me 30 5 3190 go er 1 59.35.52 =( so the ones digit is 7, I Exercises 2.3 (p. 87) 4 6 10. 2 4 16. 18, 40050 WBOvwatve 1101042 1285 weve Lewe BTA rwetve 11010 iyo 38toavin CHAPTER 2. DIVISIBILITY 2. x [01 ofoo 0 ifo1 2 2J0 2 4 ns 3)0 3 1 4 2 a]o 4 13 2 3 22. 101010100 24. 163662.een 26. 101004 28. 16056B.en 30. 1001010120 32, 2BAM830eaete al Exercises 2.4 (p. 102) 2. 16,19 4. 6,91 6. 91, 140 8. ofight), nine) 10, 142434445 = 15 14243444546 = 2 12, 1424448416432 63 LH24448416 +324 64 17 MM. 6'-6 = 5.6.7 Bot = 67-8 16. 668667. 660667 = — 44444assses9 6666667 6666567 = 44444448888889 18, 334 111111555556 134 9839834 1111111555556 20, 10!—10%+1 = — 99ge99o00001 104-10" 41 ‘9999999000001 29, $2 — mesyaney a 32 CHAPTER 2. DIVISIBILITY 24. 1+ n(n +2) = (n+1)? 26. (QL. MN)? = 123...n. 324, where 1 Sn <9. 28. 12345679- 9n = nnnannnnn, where 1 2. So p-+q = 2ab, Consequently, p-+g has at least three {not necessarily distinct) prime factors. proof: Suppose the lengths of « right triangle are twin primes p and p-+2. Then, by the Pythagorean theorem, p? + (p-+ 2)? = m for some integer m, ‘Then 2p? + 4p-+4/= m?, so m® and hence m must be even; say, m = 2n. ‘Then p? 4 2p-+2.= 2n®. his is a contradiction, since the LHS is odd end the RUS is even. ‘Thus the lengths cannot be twin primes. proof: p=9+3 case 1 Let-q be even, Then g=2 and p=5 case 2 Let q be odd. ‘Then q +3 is an even prime > 6, which Is impossible. proof Let p and p-+2 be twin primes. Then 1 +p(p +2) =p? + 2p4-1= (p+ 1), a perfect square 35 58, proof (by PMI): Let P(n): py <2". Clearly, P(2) is true, Assume P(k) for an arbitrary integer > 2: py <2, By Bertrand’s conjecture, there is a prime p such that 2* < p< 2+; that is, pe p. nisa prime > p. If n is not a prime, then n is divisible by & 62. When n = 7,pipzpapspapapr +L = 2-3-5-T- 11-13-17 +1 = 910,510 and ps = 19. Clearly, Ps S pupapapapspepr + 1 64, We have pipapapapspsprpapspio + 1 = 2-3-5-7-11-13-17-19.23-29 +1 = 6,469, 693,230 and Pir = BL. Clearly, pit S PupapsaPsPaPrPspaPio + 1 aes 68. proof: S {rte + kp) an(na + kp)" ++--bay(no + kp) + a0 " (ann§ +++ arng +00) + p(k) Ano) + pa(k) = p+ palk) = Pll +9(k)] where gi a polynomial with integral coefficients. Therefore, plf(no-+kp), thus f(no-+kp) is composite 70. By = 510511 = 19. 26869 72. proof: Lot N be the number of primes 7 and that are V7 and are 5. By Bertrand’s postulate, p43 < (2Pn42)? < 2(2?n+1)Put2 < PaPatiPnt2 if 2° < pq. In other words, if 25, P25 3 Exercises 2.6 (p. 197) 2.20 4, 54 a = Following this pattern, we conjecture that ay = Fy —1,n>1 Qe = tyr taya— 1, n> 10, 00000, 00001, 00010, 06100, 01000, 10000, 01010, 10010, 10100, 00101, 02001, 10001, 10101 12. (1+ ¥5)/2 M.S P= Ping 2 16... Lain = Lon? 20. 2Fnaa + Fea tnaa+ (Faaa-+ Faas) = Puan + Prot = Pa [Note: In Exercises 25-34, P(n} denotes the given statement.) 22. proof (by PMI): Since Fy, = Fy = is divisible by 5. visible by 5, P(2) is true, Assume P(h) is divisible by 5: Fox Foust) = Foss = Fores + Fouts = Fonte + 2Foeis, Foxsa t+ 2(Fanes + Facya) = 8Fouse + 2g SPs + Fis) + 2Foea = Fo +5 Fo. which is clearly divisible by 5. So P(t +1) is true. Thus the result follows by PMI. a7 24. proof: When n = 1, LHS = F; Fy —1 = RHS; so P(1) is true. Assume P(n) is true for an arbitrary integer n > 1, Then: La = SFist Fonte = (Fouts = (Pat + Fang) — = 1) + Fang Final ‘Thus, P(n) implies P(n 41); 0, by induction, the result is for every n > 1 26. proof: When n = 1, LHS = E, -2=l- RHS; so P(1) is tre. Assume P(n) is true for an arbitrary inteyer n > 1. Then Dl Lait + Lanst = (Lan — 2) + Lan : an + Bans) ~2 = Langa? Thus, P(n) implies P(n +1); s0, by induction, the result is for every n> 1. 28, proof, When n = 1, LHS = FP 1-1 = iF; = RHS; so P(1) is true Assume P(n) is true for an arbitrary integer n > 1. Thon: DOF + Rigs = FaFass + Bigs = Fasi(Fa + Fast) = Fast Fuse Thus, P(n) implies P(n +1); s0, by induction, the result is for every n> 1 at [Reta [eee cea w[R all al ‘Therefore, P(1) is true Now, assume that P(k) is true. Then 30. proof: When n= 1, aaah 1ail[ Fea A )_[ Atm |[ Ata ]_ | Fae Aen roll Ah Fa Fas A © | Bet Fe ‘Therefore, P(k) implies P(k + 1); so the result holds for every n > 1. Bb = 8st 34. by bag Haptt 4 ot taget _ at Nog 944 + land = 6 +1 38 CHAPTER 2. DIVISIBILITY 1 36, Notice that a+ 8 = 1 and af ug =a + 8 = (at By ~ 208 =1-%-1) = 38, Fay = SEE = Sah _(a" +f) = Fal 40. Fag Fan = Stoel ft atti aagr tty = Svat a AVR ony gm or 2. Ry ere = eap Herat M4. a) = 1, On Sayan tn, n> 2 46. proof am and by = a2 On = Fava, 2 1 nai + dy-2 Where n> 3 and ay Also, baa + bua = ba by 2 0g = 3. Let by = ana. Then by = a1 = 2 Fy, n 28, Thus ang = Fyn > 3; that is, Exercises 2.7 (p. 142) 2. Titn>2 4, proof (by contradiction): Assume m 1m = (2k + 1)q for some integer q. Then: not a power of 2. Then m must have an odd factor 2k +1, so omer = 204] = at 41, wherea = 2 = (atl — a1 4. pa? at 1) This is « contradiction, since 2 +1 is a prime, 6. False, when m= 11, 27 23-89. 8. proof: Let fn be the triangular number tm for some positive integer m. ‘The $1 = m(m+1)/25 2°41 = m(m +1) m+ m=2 fm-+2)(m —1) ‘Therefore, both m +2 and m—1 are powers of 2, and they differ by 3. Thus m = 2 and hence n= tm = 3. 10. yes, since 257 = fs. , since 60 = 2-15, where 15 is not a Fermat prime. 39 Review Exercises (p. 148) 2. 995 4. 952 6. 9020 8, 2089.7800825 10. 524s 12, TBS imeon 14. DO33.isteon, 16. 101 ee 18. 1855. 20. 233lage 22, B6Dasteen 24, AD2xaton Eke = EC} -baea hes = aa a ta [In Exercises 28 and 30, P(n) denotes the given statement.| Gees 28. basis step When n O which is divisible by 2 Induction step Assume P(k) is true: k? ~k is divisible by 2. ‘Then (k +1)? ~ (k +1) = B+ (# — k) + 2k is divisible by 2, by the IH. Therefore, P(K) implies P(k +1), so the result follows by PML 30. When n = 1, LHS 1450 = RHS, P(1) is true Assume P(R) is true: $524 —1)? = M8=. hen a i a Len ss Der vts erry? = MER? sere (e+ 12k +1Qk+3) _ (k+ 14K +1)?-1) fee seg ares EE ‘Thus P(k) implies P(& +1), s0 the result follows by induction 40 32. 34 36. 38, 40. 42, 44, 46, 48, 50. 54, CHAPTER 2. DIVISIBILITY Horo P(n}: n(n +1) is even, basis stop Clearly, P(1) is true induction step Assume P(R) is true, Let k(k +1) = 2m for some m € Z. Then (+1642) = (R41) $241) = 2m 426+ 1) = AM+k+D), fan even integer. Thus P(k) implies P(k-+1), so the result follows by induction. 99909. 999009 = 999098000001 9909009-9990909 = 9999908000000: composite prime a 34 122, 123, 124, 125 479,001,602 through 479,001,612 Let p and p+2 be any two prime twins. Their arithmetic mean is p(p+2)/2 = p+. Suppose p-+1 is a perfect square o?. ‘Then p+ 1 = a2, so p= a? 1 = (a—1)(@ +1). Since p is prime, this implies a—1=1; that is, a= 2, So p=3, and hence the twin primes are 3 and 5. proof: (L. A. Ringenberg, 1964) Let a = 41 = a1, a9 = 48, ..., a9 = 1602 be the 41 primes produced by f for 0 1. [Note: More generally, ‘Chamberland showed in 2004 that if pis prime congruent to 4 modulo 4, then Ip" +p2"-4---+pO-D" is composite for every n > 1] 60. (by P. Dawkins) Since a, 6, and c are consecutive integers, b= a+ 1, and e=a+2. Let a8 +(a+1)5+(a+2)% _ 3{a* +307 +5043) 7 a@+iet2) ~~ afatN(e+2) S{a? +2043) ‘ela +2) = 3+), assuming a #1 rors) Since Vis an integer, ofa + 2)]9; so a[9. Thus a = +1,-+3, Clearly, a —1; and a = 3 implies that 5|9, which is impossible, Thus a = 1, ~3. ‘The corresponding solutions are (1,2,3) and (~3, -2, —1). 62. yes 64, no 66. proof (by PMI): By virtue of the equation 2? = © + 1, the result is trae when n = 2, Assume it is ‘true for an arbitrary integer # > 2: 2 = 2 Fy + Fy. Then ahhh Py +P ey = (2 t1)Pe + Fea = Pet Fa) +h = aPayt Pe ‘Thus, by PMI, the result is true for all n > 2. 68. proof (by PMI): Let P(n) be the given statement, Since Fi F2 = 1-1 assume P(k) is true for an arbitrary integer & > 1. Then F2, P(Q) is true, Now, FuFat+-++ Fact Fae+ PaeFoesi + FangiFong2 = Fh + (Fre Panst + FoesiFony2} Fox(Pan + Poess) + Presi Pania PregalPoe + Fangs) = PasiaPnia = Fh Bea 42 CHAPTER 2. DIVISIBILITY ‘Phus the result follows by PMI. Supplementary Exercises (». 148) 2. e= 1540 4. K(6174) = 7641 — 1467 e174 6. 13, 31, 17, 71, 37, 73, 79, 97 8. proof: Let n be an absolute prime with two or mote digits, If n contains 0, 2, 4, 6, or 8, then some permutation of n will end in 0, 2, 4, 6, or 8. ‘The resulting number is obviously composite. 10. 197, 719, 971 12, yes; yes 14, 179 16. 1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49 18, Since 45 = 10101 uve and 25 = 1100 liwoy 45 = 25; likewise, 47 => 29. 20, proof: Let a, b¢ Z*. Let ry denote the remainder when |a/2'| is divided by 2, where 0.< i < & and a/2 =1 = [a/2*]. Then a= Sen : ade (d b= Ser = Lwm= YL w ee 22. proof: Let n= rs, Then Sy @*-n/o-1) = OH NWODr HED gor O=1) Sineo b— 1|0" — 1, it follows that $, is composite, 24. proof: Let K = (n? +n)(n? +n 1)(n? +n +2) and L n)(n?—n+ 1)? =n +2) 2n(3nt + Tn? +2) = Gn® + 1dn8 44m = (An? + 6njn? + (Bn* + Bn? + 4)n (a? + n}(n 4nd + An? + 3+ 2) — (n? — n) (nt — 2? An? — 3n +2) = K-L 26. 28, 30. 32, 34, 26, 43 Since K is the product of three consecutive integers, itis divisible by 3. But n? +n = n(n+1) is divisible by 2. So n® +n +2 is divisible by 4. ‘Thus K is divisible by 24. Likewise, L is also divisible by 24, so K ~ Lis divisible by 24. ‘Thus n(3n* + 7n? +2) is divisible by 12. Let a = (bybe-1--biPolewo: ‘Then number of odd binomial coefficients = (0 + 1)...(br + 1)(bo +1) (by D. Mubayi) Since ({43) — gE4(2), it follows that ifm +1 is @ prime, then k +1 | (R Conversely, Jet n-+1 be composite. Let p be the smallest prime factor of n +1, so p < (n+ 1)/2. Consider 3(,",) = BE=Vf®=242), Sinco p| (n+ 1), the largest integer 1. Let p be a prime factor of (d,a). Then pld and pla. Since dl(a? + 8), p18; so pl. ‘Thus pla and pb; this is impossible, since (a, 8) = 1. Thus (da) = 1. Similarly, (8) = 1. Since d|(a? + 2ab) and (d,a) = 1, it follows that l(a + 2b). Likewise, since d(b— 2a) and (d,) = 1, d|(b— 2a). Therefore, d|{(a-+ 2b) — 2(6 ~ 2a)]; that is, d/5a. But (d,a) = 1. So d|5. Thus d= 1 or 5. 62, proof: Suppose (n-+1, n?-+1) = d, Since (2? +1)~2 = (x4 1)(¢=1), it follows that di2. So d= 1 or 2, Ifd=2, then 2I(n-+ 1); so-m must be odd, which is @ contradiction, Thus d=1 = (n-+1,n?-+1). 64. proof: case 1 Let n be even. Then (trait) (taotnga) = ((m~ Lyn /2,m(n + 1)/2)- (nfm + 1)/2, (m+ 1m + 2)/2) (n/2)(n— An $1) (m+ AY{n/2, (mn +2)/2) = (n/2) Unt) -L=n(nt D2 = th case 2 Let n be odd. Then: (encaste) (taotan) = (m= 1) /2,m(n + 1)/2) - (rf + 1)/2, (m+ 1) + 29/2) n(n — 1)/2, (0+ 1)/2) (n+ 1/2, 0-42) n-L-((n+1)/2)-1 ‘Thus, im both cases, the result is true, 66. Suppose m 0, Let «= (2k)? = 9 ~1 ‘Then: 4e-1 Since the RHS is an even integer, it follows that gm|(gn ~ 2). Since dlgm and dln. it follows that dj; sod=1or 2. Since gq is odd for every n, it follows that d— 1; thus (Gm, 9x) = 1, where m # n, g . proof: By Exercise 67, Fy[Fn if and only if 4[n; that is, 3|Fy if and only if 4jn. 70. proof: Let d= (fm, fn). Since d] fn, fialfm — 2 by Exercise 65, d|f,—2. But dl fa, so dj2. But dis odd, so d= 1. Thus (fim fa) =1 72. proof: Suppose (02,64) > 1 and p is a prime factor of (a?, 62). Then pla® and p6®. So pla and pb. ‘Then pi(a, 6}, which is a contradiction. Thus (a2, 82) = 1, as desired. 48 CHAPTER 3. GREATEST COMMON DIVISORS 14, Let d = (m-+1,n). By the euclidean algorithm, there exist integers P and Q such that d = P(m +1) + Qn= (m= n+ 1)P + n(P+Q). Then darter = ("IP + (2 (P+Q) = R (say); that is, d(™) = (m—n-+I)R. So ™P41|(™); that is, B21|(™) Exercises 3.2 (p. 172) 2. 2024 1 10244 1000 1024 1: 1000+ 24 1000 = 41-24 + 16 mM = 116 + 8 w= 28 + 0 ‘Thus (2024,1024) 8 4. 2076 1-176 +300 1776 5+ 300-4276 300 1. 276+ 24 6 = We M+ 12 24 2. 124+ 0 ‘Thus (2076,1776) = 12. 6. 3076 1-176 + 1300 1776 1.13004 476 1300 = 2- 476-4 348 476 = 1. 3484 128 348 = 2. 128+ 92 18 1. 2+ 36 92 = 2. 364 20 36 1. 204 16 2 = 1. 16H 4 1o= 4 44 0 ‘Thus (3076,1776) = 4 8 4076 12076 + 2000 2076 1-2000+ 76 2000 = 26. 76+ 24 7 = 3. 24+ 4 ‘Thus (4076,2076) = 4. 49 10. 2024 = 1-1024+ 1000 1024 1.10004 24 1000 = 41 M+ 16 24 1. + 8 wWo= 2 84 0 Therefore: 8 = 24-16 = 24— (1000-41-24) = 42-24-1000 = 42. (1024 - 1000) ~ 1000 42-1024 — 43-1000 = 42-1024 ~ 43. (2024 — 1024) = (-43)- 2024-485. 1024 12 2076 = 1-1776+300 1776 = 5+ 3004276 300 = 1. 2764 24 26 = U W+ 12 2M = 2 124 0 ‘Therefore: 12 = 276 ~11(300— 276) = 12-276 - 11-300, 12(1776~ 5-300) ~ 11-300 = 12-176 ~ 71-300, = 12-1778 — 71 - (2076 ~ 1776) = (—71) - 2076 483-1776 14. 3076 = 1-1776+1300 1776 1.13004 476 1300 = 2. 4764 348 76 B48 + 128 348 18+ 92 198 92+ 36 92 36+ 20 36 2+ 16 20 w+ 4 16 44 0 ‘Therefore 4 = 20~ (36-20) =2.20~36 = 2:(92-2-36) — 36 =2-92-5.36 2-025. (128-92) = 7-92—5.128 7: (948 — 2-128) 5 - 128 = 7-348 ~ 19-128 7-348 — 19. (476 — 348) = 26. 348 ~ 19-476 26. (1300 ~ 2-476) — 19-476 = 26- 1300-71 -476 26 1300 ~ 71 - (1776 — 1300) = 97 - 1900 — 71-176 = 97- (9076 ~ 1776) — 71-1776 = 97-3076 ~ 168-1776 50 16, 18, 20. CHAPTER 3. GREATEST COMMON DIVISORS 4076 = 1-2076+ 2000 2076 1.20004 76 2000 = 26- 76+ 24 76 3. M+ 4 m= 6 44 0 Therefore: 4 = 76 ~3(2000~ 26-76) = 79.76 — 3-200 = 79(207G— 2000) ~ 3.2900 = 79. 2076 — 82-2000 79-2076 — 82(4076 ~ 2076) = (—82) - 4076-+ 161 2076 proof (by PMI): Let P(n) denote the statement that (2,8) = (ra-1,ta), where n > 1. Since ro (a,8) = (8,11) by Theorem 3.8, so P(1) is true. Now, assume that P(k) is true for an arbitrary integer k > 1: (0,8) = (ra-isra). Since rea = gure + regs, again by Theorem 3.8, (re-1,7x) = (re,Te+1). ‘Therefore, (a,b) = (ra, resa), 90 P(k +1) is true, Thus, by PMI, the result is true for all n > 1. proof (by PMI): Let P(n) denote the given statement, Since Fi = F,=1<2, P{l) is tue. Assume P(j) is truc for every i < k. Thon Fey1 = Fit Fant $2420! < 9k 4.94 = O41 Pk + 1) js true, ‘Thus the result follows by the strong version of PMI Exercises 3.3 (p. 182) 2 4 10, 2. 4 1661 = 11-151 1976 = 2-13-19 2-1 = MQ +1) =! Nelt+ye"+41) (2 Net+ Ne +12" +1) YP +E + He +0 7-965 -4097- 16777217 = 7.9".5.18- 17-241 -167TTAAT 3965-7013. 17-241 16777217 1,004,006,004,001 = x8 44r%462 44241 = (e+ = 101! (11 13y¢ = ata Lee? 1p.aP a pee 1, 2, 8 5, 6, 9, 10, 15, 18, 30, 45, 90 16. 1, 2, 4, 5, 8, 10, 18, 16, 20, 26, 40, 52, 65, 80, 104, 130, 208, 260, 520, 1040 18. [376/5] + [976/25] + [376/125] ~ 7541543 =93 20, (1010/5) + [1010/25] + [1010/125] + [10107625 ~ 202 + 40.48.41 ~ 251 22, 375; 376; 377; 878; 379 24. 9 26, piqr? 28. (72,108) = (2°. 9?,27. 9°) = 92.9? = 36 30. (294, 450) = (2-3-74,2.37-5%) =2-3=6 32.5 34.0 36. 904 38. 249 40, 34 — 220 = 5 22, 976 ~ 1969 =7 44, 40. proof (hy induction): The statement is clearly true when n =, so assume itis true for an arbitrary positive integer k, Suppose pla. Then pla-a", so, by Lemma 3.1, pla or pla”. If pla”, then pla by the inductive hypothesis. ‘Thus, in both enses, pla. Consequently, by PMI, the statement is true for every positive integer n 48. proof (by contradiction): Assume («",8") > 1. Let p be a prime factor of (a",6"). Then pla” and B/D", so by Exercise 46, pia and pb. Consequently, pi(a,}), a contradiction, 50. proof: Using Dirichlet’s theorem with a =8 and b= 2, there are infinitely primes of the form 2n + 3. 52. proof (by strong induction): Let P(n) denote the given statement, Since 1 = 2°-1, P(1) is true, Now, assume that P(1), P(),...,P(K) are true, where & is an arbitrary integer > 1. Consider k + 1. case 1 If itis odd, then k +1=2(k +1), so #-+1 is of the desired form. case 2 Let k+1 be even, Then k-+1=29, where q = (k-+1)/2 is a positive integer 0 and m is odd. ‘Then k + 1 = 2(2*m) also of the desired form. Thus the result follows by PMI. 52 CHAPTER 3. GREATEST COMMON DIVISORS 54. proof: Let n = [Tp be the canonical decomposition of n. Assume n is a perfect square. If an exponent e, is an odd integer 2 +1, then n = (1) = (a) Tas which is not a perfoct a d de Conversely, Jot every exponent e; be an even integer 2, ‘Thonn (n 1) = (Tet), « pete square 56, 6 58, 24 60. +1) 2234 wy 64. proof: Let n= [] pit . Let es = 29) +r, where ris 0 if is even and 1 otherwise. Then =e) Ifevery r= 0, then the second product is square-free. On the other hand, ifat least one r; is nonzero, then also the second product: is squaze-free. Thus n = (perfect square) (square-free integer). 66. proof: Let n = (a m) (ne) be the factorization of a powerful number n. Then n = (oe 68. proof: Let pm, Then pt|m, but p+! J. Since p*[m, m = Ap? for some integer A, where p A. ‘Then m* = (A*)p**. So phlmt, But pi +]m*, for if p*t|mé, then m* = B- pk for some integer B. This implies Akp!* = Bp***1, that is, A* = Bp, s0 pA, a contradiction. Thus p**(m* and mt, 20 pM im, Exercises 3.4 (p. 188) 2T 47 10. F 12, 4,290 Ma 16. 18, 20. 28 32, 36. 38, 1. proof: Let [ka, kt) = 53 a a(a+1) {a,b} =abj(a,b) = ab/1 = ab = 156 . Since g = p+2, [p.p-+2] = plp+2) = p?+-2p = 923; that is, p?+2p~328 —0. Then (p+19)(p—17) = 0, 80 p= IT and hence q = 19, (0, )[a,8] = 18 - 3780. So a = 252 and b = 270. (12,18,20,28] — {[12,18,20)28] = {12,18}, 20],28] = [(36,20),28) = [180,28] = 1260 (10,10,18,24,28) = [{10,16,18,24] 28] {((10,16,18},24],28), ((((20,16),18},24).23) {({90,18},24},28) {(720,24},28) (720,28) = 50u0 False; use a= 12, b= 2, and = 3, Proof: Suppose the integers a and b have two lem’s, say, m and m’. Since [a0] = m and m’ is a common multiple of a and b, m'[m. Similarly, mjm’. Thus mlm’ and m'|m, 90m = m', and [a,8] =m. Since alm and blm, kalkm and kblkm, so fka, Kil|kra; that is, m/jhrn, On the other hand, kalm’ and kbjm!: so ajm'/k and bjm'/k; that is, m = [a,2)|m'/k. So mlm, Thus m' [km and km|m’, 50 rn” = km; that is, (ka, kb] = ka, 5) A better proof: Kab ab Go 8)" Fe.) Ga, = Mol rook: Let [a1,a25--.54n] =m [15 2,-.-y@m—a] =m, and [fm',an] =m. Since far, a2, am, ail! for 14 2: Hf fay,...ya4] = ax--.dx, thon a1,...,0% are pairwise relatively prime. Let fans. --y@eea] = 1. axer. Since [21,.-- akg] = [laay---s ua ga], by Bxercise 96, far... an), asa} 0) Oe41 = (01 ---ae)Oee1 = [an,...,as]anq1, by the inductive hypothesis, sothe numbers (a;,... 2] ‘and ox41 are relatively prime. But for)-..,0x] = @1--.x, 80 @1...d4 and Gx41 are relatively prime, Since a},..., 4 are pairwise relatively prime, it follows that a1,.-.,@x41 are pairwise relatively prime. ‘Thus P(k +1) is true, Consequently, the result follows by PML. proof: By the division algorithm, every prime > 3 is of the form 6k + 1 or 6k +5. If p is of the form 6k +1, then p-+2 = 6k +3, which is not a prime, So p = Gk +5 and hence p-+(p +2) = (Gk +5) + (6K +7) = 12(k +1). Thus 12|[p + (p +2)] proof: Let a=[]pf, b= [[pft, and c= []p%. Assume that a; 0, > 32 and t < 63, 50 32 0, so, ¢ < —d0187504/15625; that is, t < 40137504 — 15625(~2569) = 3121 3. 34 [Je 1+ 0 8404; that is, 15625(—2630452) — 1 solution of 40137504 — 156250. Since n> 0, 568.800256. Since n is minimum proof (by PMI): By Theorem 3.20, the statement is true when n = 2, Now, assume it is true for ket ee i an arbitrary integer k > 2, Consider the LDE > ast = ¢. Then J ai; = Saini + angites = Fa} 58 CHAPTER 3. GREATEST COMMON DIVISORS » Let Jari, By the inductive hypothesis, the LDE has infinitely many solutions, ‘The LDE, 2441 = also has infinitely many solutions. Thus, if the statement is true when n= &, it is 41,50, by PMT, it is true for every n > 2. utag also true when Review Exercises (p. 207) 2.30 44 6 784 = 16-48 +16 4 = 3.1640 ‘Therefore, (784,48) = 16. 8 5076 = 4.10764772 1076 1. 772-4304 772 = 2 3044164 304 = 1. 1644140 164 1. 140+ 24 140 = 5. 244 20 4 1. 204 4 20 = 5 440 Therefore, (6076,1076) 10. (20,82,56,68) = ((20,82,56),68) = (((20,32},56),68) ((4,56),68) (4,68) 4 12. (24,36,40,60,88) ((24,36,40,60),88) (((24,36,40),60),88) {(((24;38) 40) 60),88) (((12,40),60),88) = ((460),88) (4.88) 4 3) 1242-20 = 0-104 (-1)-1241- 1440-18 18. 1,3, 5, 7, 9, 15, 21, 25, 35, 45, 63, 75, 105, 175, 225, 315, 525, 1875 59 20. prgt, where 0S 7 2, Then (44 +1)(4i2+1) nit, where (m,n) = 1. Sinee alb, 6 = at = amt for some integer 8. (b,d) = (@nt, amt) = (Gn,am)t, so t\(b, 4d); that (ai, +1) (Aine +1) = [din + 1)(4ig #1). (Aig + DJing +1) = (45 + 1) (igen +1) for some integer j by the inductive hypothesis. By Lemma 3.5, this has the dosired form, Thus the given result follows by PMI 62. Witha= and b = 6 in Dirichlet’s theorem, there are infinitely primes of the form 6n +1, 64. proof (by PMI): Let P(n) denote the given statement. P(2) is true by Exercise 58 in Section 3.1. As. suming P(R) is true, (eay,c02,...;ea4, €ae41) efai,22, {(ea3,009,.--, 00%), ea+1) = (ear, a2, “Oy dee). Thus P(K-+1) bs run, so P(n) is tuo for every n> 2 1k), Ck +1) = 66, proof: Since a is odd, a +1 is even. Since a, a +1, and b are three consecutive integers, one of them is divisible by 3, But 3 fa and 3 6. So 3[(a+1). Thus 6|(a+ 1), Since ab = 2a + 1), it follows that 12\(« + 5), 68. proof Let a = []p%* (2,8) be) (c,a) (6,)0,e)(6.a) (a,b,¢) (a,0,¢) aabc(a, ye) HG, ea) ‘The formula holds in the other five cases also. 70. 12!=2!°.98-5?-7-11 72. 18! 16. 38.59.7211 13-17 b= [I pt, and c= J] pi. Assume that a, Toms Toeirhos Stn | ‘ [a,b,¢) a 74. No, since (24,52) = 4 1102. 44 (20/4) = 4+ 5tyy 78. z= 2-y+ SR Let w rust be an integer, (1 ~u)/2 must be an intogor. Let (1 —u)/2~t, 50 u = 12, Then y~ —144-3¢ and x =4-~ 6. Thus the general solution 4-Sty=-143t is 80. 1024n 156252 = 11529, so r= 11+ 152+ ERE, Let uw = BOEEBESE, go 2 “bie tet 2228 must be an integer, let u = 2654, ‘Then = = —1 + 10244, n ——4 + 156254 —143u} BB. Because = 1000-19. Because ¢> 3,¢2 60. 580, When t = 580,¢ 82, ‘The general solution is c= —620-+11t, Supplementary Exercises (p. 200) 2, Sinoe n = pi, n= [1,2,3...(n—1)04] 12.2,3,....(e-Dhe) = [-,p4] = an-iy since (n ~1)* contains p*1 4 9 = B.38.5-7 22,520 10 = 38.5.7 2,520 tit = .32.§.7-11 = 27,720 6. Using Exercise 5, six consecutive composite numbers are 7* +2 through 7° +7; that is, 422 through 47, 8. No, since 8* +1 = 841 = 29? 10. No, since 9* — 2519 = 11-299 12. proof: By the euclidean algorithm, m = qoro + 11,70 = Gi7L + P2)--457u-2 = Qucatani +m Where OS 11, A! = 0 (1mod 11). Therefore: UHH. 1000! = W+2!+,..410! (mod 11) 1424642441204 720 + 5040 + 40820 + 362880 48628800 (mod 11) , = 142464241045424541410 (mod 11) = 0 (mod 11) So the desired remainder is 0. 38. When k > 13, 1 =0 (mod 13), UE MH. +1000! SWE M+... +10! 4 12+ 121 (mod 13) = 1 $2464 24+ 1204 720-4 5040 + 40320 + 362880 + 3628800 + 39916800 4 479001600 (mod 13) = 4246+ 4345494741 4641412 (mod 13) = 9 (mod 13) (mod 12}, 50 5% = (6%) -5= 15.5 (mod 12). Thus the desired remainder is 6. 42, 19° = 2 (mod 23), s0 19" = (198). 9? 2 9.16 = 25)" .2-16 38.95 (34)'9.3 188-124 = 98.258 (mod 23) 124 ‘Thus the desired remainder is 8. 44, 42 = 1 (mod 15) and dt = 4? 24 = 4? 2 a = 1.1:1-1-4.24 (mod 15). Thus the remainder is 4 (mod 15). Therefore, 4117 = 404.482.418.484 = 46. 19? = 16 (mod 23), 19 = 3 (mod 23), 19° = 9 (mod 28), 19" = 12 (mod 23), 19°? = 6 (mod 23), 10 2 13 (mod 23), 1977 = 8, and 192% = 18 (mod 23). Therefore, 19% = 19%. 194-191. 194 19? 19 = 18- 13-12-3-16-19=7 (mod 23). ‘Thus the desired remainder is 7. 48. 1943 = 3 (mod 10) and 1 (tod 10) if @=0 (mod 4) 3 (mod 10) if a=1 (mod 4) 9 (mod 10) if a=2 (mod 4) 7 (mod 10) if a=3 (mod 4) Since 1642 = 2 (mod 4) and 2? = 0 (mod ), 16421959 = 21009 a = 1642'°%9, Thus the ones digit is 1. (mod 4), s0 3° = 1 (mod 10), where 50. 82, 54, 56. 58. 60. 62. 64, 68, 70. 2. 7, 76, 78, 82. 65 1089 = 9 (rod 10) and 9° = { ee Since 2089 is odd, 2089” is odd for m > 1. Therefore, 1089* = 9° = 9 (mod 10), where a is odd. Thus the dosired units digit is 9. 1829 = 29 (mod 100) and 29% = 21 (mod 100). Therefore: 1829129 = 29189 = (20°) 26° = 919". 49 (mod 100) = (215). 218.49 = 1.81.49 ‘Thus the last two-digit number in 1820"? is 69, 44 1,6 2 1-2-3 (mod 5) |. 1-2-3-4-5-6-7-8.9-10=10 (mod 11) Proof: Since ¢ = d (mod m), by ‘Theorem 4.4, -¢ = ~d (mod m). So, again by Theorem 44, + (+0) Sa4 (-d) = a—d (mod m). Proof: Since ¢ (mod m), the result follows by Exercise 68. proof; Since a = > (mod m), by Theorem 4.5, a-a= 6-6 (unodi m); thet is, @? = 8? (tod m). Proof; Since a* = 1 (mod p), pla? ~ 1; that is, p|(a—1)(@ +1). But p is a prime, so pl(a 1) or p\(a+1), Thus, a= 1 {mod p) or a= ~1 (mod 7}. proof; Let:n be an even integer 2k. Then n? = dk? = 0 (mod 4) proof: Since ab= 0 (mod p), plab, so either pla or plb. Thus either a= 0 (mod p) or = 0 (mod p). Proof: Let p be any prime > 3. By the division algorithm, p = 6g+r, where 0 0: 24° + 3k 4k = 0 (mod 6). ‘Then: 2(k-+1)9 + 3(k +1)? + (R41) (2k° + 3k? + k) + 6(R? + Gh +1) 0+0=0 (mod 6), by the inductive hypothesis. ‘Thus, assuming thot the statament is true when n = h, it is true when n = k +1, so, by PMI, the result is true for every n > 0. 86. 774.7777N+1. Let n be asquare. By the division algorithm, n = 0,1,4 (mod 5) ‘Then J(0) = 1 {mod 5), f(1) = 14241 = 4 (mod 8), and f(4) = s(-1) = -1 +3412 3 (mod 5). Consoquently, 5|f(n) and hence 1155] /(n), as desired. 88. proof: @ (2p)(2p = 1)(2p = 2) > pt 2(2p — 1)(2p~ 2)... (2p (P~2)) @-1 2EDED OD nod p) (mod p) Since p is a factor of k- 2°? 4 1, we have (Ay = (2S OMY? Say? = (1) (mod p) jee n> 2, this yields —1)"#" (mod p); that is," = (—1)" (mod p) 92, When 0.< r 11, k! = 0 (mod 11). Therefore: WM. F100! = 1142+...+ 10! (mod 11) 1424+6+241045+2+541+10 (mod 11) 0 (mod 11) ‘Thus the desired remainder is 0 22, When k > 5, k! =0 (mod 10). Therefore: WHDS...4100! = 14214314 4! (mod 10) 142-4644 (mod 10) = 3 (mod 11) ‘Thus the ones digit is 3, 24. 26. 28, 30, 32. 34, 36, 38, 7 sn =n. Tf n is even, say, 2h, then n? =O (mod 4). If m is odd, say, 2k+1, then n? = (2k+1)? = 4k? 44k +1=1 (mod 4). Thus the ones digit in the base-four representation of sq is 0 or 1. 132001 = (42001 — 42001 — (429800, 4 — (1600. g = 13 (inod 17) ‘The desired remainder is 13. Since 23 = 0 (mod 23), 23% = (mod 23). Thus the remainder is 0. 2, (mod 19) and 13! = 1 (mod 19), 7202 = (789967 7 = 1687.7 © 7 (mod 19) and 1310 (1318)66 1396 = 199-199-137 = 1-(-1) 10 oor _ 1024 10 = 9 (mod 19). ‘Therefore, 17 (mod 19), so the desired remainder is 17. 954 We have: 23 = —4 (mod 19) (-4)? = 16 (mod 19) 16° = 11 (mod 19) ut = 11(mod 19) 1 = 7 (mod 19) 7 = 1 (mod 19) ‘Thus, when 231°! jg divided by 19, the remainder is 1 410" = 24 (mod 100). Therefore: ast (qt0oyet, yoo 24)" 4%. 56 (mod 100) = 24.489. 56 = 249.248. (24) 56 (mod 100) (-24)(—24)(—24) 56 = 56 (mod 100) it number is 56. ‘Thus the last two. 19175 = (199)29 417%? = (419)? 41° (mod 1000) 12077 241 = (12149 - 1219-241 (mod 1000) (-119) 561 241 = 1194. 119. 201 (mod 1000) (-79) 161 +201 = 481 (mod 1000) ‘Thus the last three-digit mumber is 481. 1773 = 3 (mod 10) 1 (mod 10) if =0 (mod 4) gee] 3 fanod 19) I (mod 4) ~\ 9 (mod 10) 2 (mod 4) 7 (mod 10) 3 (mod 4) Since 1776 = 0 (mod 4), 1776" = 0 (mod 4). Therefore, a = 0 (mod 4), so the desired re: n 40. 42. 4 CHAPTER 4. When k > 5, kt =0 (inod 15). Therefore: UWHM+BE. +1001 = 42a bat = 14246424 3 (aod 15) ‘Thus the desired digit Is 3. When & > 4, kt = 0 (mod 24), Using a 24-hour clock, 15-+ > kl the time will be midnight. a Notice that: 1043 > (9)IM43 3204.5 > Therefore, wwe THe ES 1S It follows by (4.1) that | g2000 _ 200 Wy Way austen query ted 10) Sineo (10°? 4-3, 10) = 1, 10° has unique inverse b modulo 10: (10°43) = 1 (mod 10) 3b = 1 (mod 10) b = -8 (mod 10) Using equation (4.2), LN) = 3°" (mod 10) = (331.3 (mod 10) = (-1)!.3 (mod 10) 3 {mod 10) So the ones digit in [.V] is 3 CONGRUENCES 5+ 1421-43! = 0 (mod 24). So (4) (4.2) 73 46. We have 2, 5, 26, 677, 9853, 4521, 3436, and 12121 = 91-391 = 17-28-31 (3, 10566, 5947, 9853, ...; (v4 — 22,12121) = 31, 31]12121 48, proof: Since n?—n = n(n—1) is the product of pwo consecutive integers, it iseven. n®—n = 0 (mod 2); 1 (mod 2). that i,m! 50. proof (by PMI: Since 2° +30 true for an arbitrary integer k > 0: 24 + 3k = (tod 9), the statement is true when n = 0. Now, assume it is (mod 9). ‘Then: 16-2 $943 16(1 — 3k) 49k +3 (mod 9) 19 45k = 1 (mod 9) 28040) 4 3k 4 1) ‘Thus the statement is true form =k +1, Thus the result is true for every n > 0. 52. proof: Let (a,m) = d and (b,m) = aiid. ‘Thus d =<’. . Since dla and dlm, dle, Thus dib and dim, 9o dla’. Likewise, 54, proof (by L. Moser): Notice that 2[pipa-.. Pn, but 4laip2... Pa. Since every odd prime is of the form 4n+1or dn +3, it follows that pipa... Py +1 8 (mod 4). But, by the division algorithm, mn? or I (mod 4) for every integer m, Therefore, pips... Pa +1 is never a square, 56. proof (by R. B. Shafer): It suffices to show that 14 [1+ 10%? — 19980 (9000800 _ 0 (mod 99991) Notice that 10! — (20° = 1)(10° +1) = 8-1 10 (mod 99991); and 1099950 ((10°)7)!*89 = (9°)999®9 (mod 99991) = 819% (mod 99991) Lot r = 80. ‘Then (4) a)= 0 (anod 99991) as desire. 58. proof: Since p® = p (mod 3), p = 0 (mod 3) and p = 1 (mod 3). 1 (mod 3). Then PPPS kp se (y+ (1) ++ (Hl) (mod 8) = =n (mod 9) Sop"! + p34... ep tn =0 (mod 3) ” CHAPTER 4. CONCRUENCES Supplementary Exercises (p. 243) 2. 10, 12, . 1895 When n> 5, (mod 10), so the last digit of the LHS is 3 for all n > 5. Since the LHS is always ‘odd, m? and hence m must be odd. But the squere of an odd integer ends in 1, 5, oF 9, 0 the equation has no solutions when n > 5. Thus n <4. The eases n= 2 and n = 4 do not yield any solutions, but n=1and n= 3 yield two, namely, n= 1=m and n=3=m. (nys84.58 1 (mod 7). Therefore, {mod 7) and 198600 = 5206 19. (-2)8 1-1 1835179 4. 1986298 = 0 (mod 7) . 5, 6, 25, and 76 are automorphic since 5? = 25, 6% = 36, 25% = 625, and 76% = 9776. proof: Let a = ay330"! 4 ++ ha +104 ap. Thon: = a2_,10°"-9 +--+ (Zarao)10+ af = bag Et Dy OME $s by 10 by for some b,. ‘Thus a is automorphic if and only if a? = a (mod 10°). proof (by H. M. Martson): Let n be a prime, Then every # is invertible modulo n, where 1< i 2. Since & is odd, tis odd; # =1 (mod 4) Since 2" = 0 (mod 4), 3" = 1 (mod 4); so n must be even, say, m = 2k. Then 2” = #2 — 9% = (34) +34), Since m > 2, and botih factors on the RHS are odd, 2 is a factor. Suppose 4)(¢—3*) and 4l{¢-+3*). Then 4(t—3*] + (¢-+34)|; so 4[2¢ and hence 2{t, which is impossible. So 4 cannot divide both factors t— 3* and ¢ + 3# Since (¢—38)(¢+3*) = 2" and t~3* < £434, it follows that ¢—9 = 2 and ¢43* = 2"-1, Then (+34) ~ (34) ete Leah = 9m? (43) Since m is even and mm # 2, it follows that 1 + 3° {mod 4). Therefore, & is odd. % Suppose k > 1. ‘Then ka 341-841) Outset ‘The RHS js 4 times an odd number greater than 1. This is impossible by (4.3). Therefore, k= 1 Hence m= 4 and n = 2. Thus, there is exactly one solution: 2* + 3? = 52, a perfect powor. 76 CHAPTER 4. CONGRUENCES Chapter 5 Congruence Applications Exercises 5.1 (p. 5.1) 2F 4.F oT 8. By 2,4, and 8 10. By 2,4, and 8. 12. yes; no 14. yes; no 16. Since 2 1327723, it is not divisible by 6, 18, Since 22197684 and 82107584, 6/2197584, 20. yes 22, yes 24, probably correct, 26, probably correct 28, definzaly wrong 30, 7167-1776 0 (mod 9), so 53d1 must be congruent to 0 modulo 9, But 5341 d (mod 9), so d = 0 (mod 9). But d £0, sod =9. +34d+1= 32. 123-98 =6 wd =5. 3 (mod 9), so 12044=142404d44 +4 =3 (mod 9). Thus d= 5 (mod 9), 7 8 34, 38, 40. 42 4A, 46, 48, CHAPTER 5. CONGRUENCE APPLICATIONS Since 21358ab = 0 (mod 99), 21358ab = 0 (mod 9) and 21 8+a+b=0 (mod 8) and (24+3+8+b)~(1+5+a) +4 (mod 11). The pairs of values satisfying a +0 = \98eb = 0 (mod 11). ‘Then 2+1+3+5+ 0 (mod 11); that is, a+ b= 8 (mod 9) and {mod 9) are given by: 45678 6543210 and those satisfying the congruence b +4 (mod 11) are given by 210 65 4 4 8 ‘There is just one pair (2,6) common to the paies of values satisfying both congruences. Thus a — and b=6. proof: 10° = 2 (mod 7), 104 = 4 (mod 7), and 10 = 5 (mod 7), so abeabo = 4-105 46-10 6-109 $a: 107+ b-10+e = Satdb+2c420+36+e=7a+b+6) =7 (mod 7) Since 10= —1 (mod 11), abeabe = a- 10° +b-10'- 40-10" 40-10? +b-10+6 b-e+a—b+e=0 (mod 7) Besides, 10? = 9 {mod 13), 10% = —1 (mod 13), 10 = 3 (mod 13), and 10° = 4 (mod 13). So abeabe = a-10° 5-10. $e-10? -a- 10? +b-10-4e = da+3b—e+9a~ 34650 (mod 7) [Note: Thus abeabe {mod {7,11,13]); that is, aboabe = 0 (mod 1001),) probably correct definitely wrong 1778 = (-1)" (nod 9), so the digital root is 1 20202009 = 49909 = (49) = 18°93 = 1 (mod 9), 60 the digital root is 1 ‘The digital root of a perfect square is 1, 4, 7, or 9. Since the digital root of 54,893,534,04¢ cannot be a perfect square. 6, it Since 1? = 4° 3 = 1 (mod 9), 2° = 5° = 8 (mod 9), and 3° digital roots are 1, 8, and 9. 9% = 8 (mod 9), the possible 1 (mod 37), Since S7jabc, a 107 +B- 10 +6 = 0 (mod 87). ‘Then 9 52. proof: We have fy = J = 2fa-i +2, where fo = 3. Suppose (fat) = 5 then, by the recurrence relation, fy = 57-2-542 =8 (mod 9}; so p(Jn) ~ 8. If p(Jnat) =5, then, by the recucrence relation, fa = 8 -2-84+2=5 (mod 9); 50 (fa) = 5. Since p(fr) = 5 and p(f2) = 8, it follows that p(f,) = 5 ifn is odd, and p(fa) = 8 if n is even. 54, proof: Let n= S96, Since b= (6-1) +1= & (mod b-1),n= Exercises 5.2 (p. 257) 10. CHAPTER 5. CONGRUENCE APPLICATIONS 82 CHAPTER 5. CONGRUENCE APPLICATIONS Exercises 5.3 (p. 272) 21 40 ¢. An odd numberof errors must have oesured, 8. 17330207806 = 2 (mod 7), so the check digit is 2 10, Check digit = —1942300317768 =6 =3 (mod 9), so the check digit is 3 12, 14, Cheek digit = (7,8,d,0,3,5,4,4) (7,3,9,7,3,9,7,3) = 9d-4 367 = 94+ 7 (mod 10). But the chock digit is 2, $0 9d +7 = 2 (mod 10), Thus d= 8, 8,0,4, 9,3,3,8)- (7,3,9,7,3,9, 7,3) = 207 = 7 (mod 10). Thus the check digit is 7. 16. Check digi cheek digit is 1. ~(0,2,0,1,5,7,8,8,9) - (10, 9,8,7,6,5,4,3,2) (tod 11) = ~164 = 1 (smod 11). So the 18, The check digit corresponding to 0-07-095831 is ~(0,0,7,0,9, 5,8,3, 1} (10,9,8,7,6,5,4,3,2) 9 (mod 11), so it is 9. But the given check digit is 2, so it is an invalid ISBN. -178= 20. Check digit 6: git is 8 22. The check digit corresponding to 0-16000-42080 is —(0, 1, 6,0, 0,0,4,2,0,8,0)+(8, 13,1, 1,8, 1,3,1,3) 41 = 9 (mod 10). The given chock digit Is also 9, so it a valid UPC number, (0,8,8,0,0,0,0,1,9, 1,2)- (@,1,8,1,8,1,3,1,8,1,3) 8 {mod 10}, so the check. 24. dyo = ~(3,4,0,4,0,4,5,5,6)- (3,7,6,1,8,9,4,5,2) = ~134 =9 (mod 11), but the given tenth digit is 4, So it is an invalid registration number. 26. Check digit =X (mod 11), 60 the check digit is X. (0,5,9,3,3,0,8)- (8,7,6,5,4,3, 2B. dy = (4,0,0,5,3,7,2)- (7,3,1,7,8,1,7) 30. Chock digit 93 = 3 (mod 10). Thus the check digit is 3 3,0, 4, 3,5,1,6,7)- (9,8,7,6,5,4, 2) = 134 = 4 (mod 10), so it is 4. 32, Let = ~(2,7,3,0,3,7,8)- (2,7,6,5,4,3,2) = 11 0 (nod 11). So the check digit is 1 34, Since, by Exercise 32, a = 0, the check digit is A. 36, dy = 0, 2d = 16, and 2de = 14, Sum of their digits = 04146414 dy + dy + ds, wo get s=12+24441=19, So the check digit dr = -19 12, Adding this to the sum (mod 10). Thus dy = 1 38. VIN: 2TIBBO2E-VC194572 Code: 23122025 53194572 Weight: 876543210 98765432 Weighted sum = 8-247-346-145-24+4-243-042-2410-549-548-347-14 O-9+5-444.543-742-2 2 (mod 11) 83 ‘Therefore, check digit given check digit, So the VIN is a valid number. 40. Given serial number: @p2414993.0 Given check digit: 0 Convert the letters into digits: 21 24149934. Funetion f: (01580427)(38) ‘The check digit 3, must satisly the condition Lls1) + (62) # (53) + Fle) # F585) # FC 96) + F7 (87) + F(8) + (90) # F'%(310) * 914 That is, TeBelela2e8e8+9e647 e511 de Lelede8e8e0e6e7 eon 0614248482946474 511 16248 480946474011 B+8+8+946+7 4513 6484946474511 34926474501 Te6sTemn = 0 IsTasy = 0 Bes = 0 ‘This yields sy, = 8 # given check digit, Therefore, the given serial numiber is not valid, Exercises 5.5 (p. 252) 2. Since the number of teams is odd, add a dummy team, team 6, ‘Tear 3 gets a bye in round 1, team 1 jn round 2, team 4 in round 3, team 2 in round 4, and team 5 in round 5. ‘The following table gives, the complete schedule, roma |i 2 3 45 | 1 Saget etal el ee cea ea ey ore 84 CHAPTER 5. CONGRUENCE APPLICATIONS 4, The following table gives the schedule. team round |1 2 3 4 5 6 7 8 1 {76583214 2 |8 7654321 a l21768 435 4 [98176542 5 |43 217856 6 |54821763 7 |65 432187 s [76583214 6. No, since, in round 1, team 1 will play team 3; but team will play team 5, which makes no sens. 8, ABCDEF A-CBEI ) ADBPCE AEBD,CF APBCD-E Exercises 5.6 (p. 287) 2. Friday is day 5, so the day 365 days from Friday is day 5 +365 = 6 (mod 7) ‘Thus the desired day is Saturday. 4. The day 2076 days from Saturday (day 6) is day 6+ 2076 (mod 7), So itis Wednesday. 6, 2020 is a leap year, so (2020) is true 8, Although 3000 is a century, since 400 3000, f(3000) is false 10, There are 14 years in the range 1976 through 1989, of which four were leap years. Since January 1, 1990 was Monday (day 1), the day of January 1, 1976 is congruent to 1 ~14—4 =4 (mod 7). ‘Thus it was a ‘Thursday. 12. d= 22+ [26 x 120.2) ~ 344324447 =6 (mod 7). Thus the desired day is Saturday. 19+ [26x 9—0.2) 3646344411 = 4 (mod 7), Thus the desired day is Thursday. 17+ [2.6 x 10~ 0.2) ~38+344+0=4 (mod 7). Thus the desired day is Thursday. 18. d= 24+ [2.6 x 8— 0.2) 98-445 4.4411 =8 (mod 7), Thus the desired day is Wednesday. 20+ [2.6 x5 0.2) — 38469-44417 =0 (mod 7). Thus the desired day is Sunday. 22, x = 2020+ [2019/4] ~ |2019/100] + |2019/400) 2020 is a Wednesday. 2020 + 504-2045 (mod 7), s0 January 1, 85 3000 + 750 — 304.7 (mod 7), so January 1, 24, © = 3000 + (2999/4) — [299/100] + (2999/40, 3000 is a Wednesday. 26. By Fxercise 22, January 1, 2020 falls on a Wodnesday. Since 2020 is a leap year, there are two Friday-the-thirteenths, namely, March 13 and November 13. 28, x = 3076 + [3075/4] — [3075/100] + |3075/400] = 9076 + 768 — 90 +7 = 6 (mod 7), so January 1, 3076 is a Saturday. Since 3076 is leap year, there is one Friday-the-thirteonth, namely, October 13. 2000 (tod 19) = 5, 6 = 2000 (mod 4) = 0, €= 2000 (mod 7) = 5, d = (19-5 +24) (mod 30) = 29, (2044-546. 2945) (mod 7) = 3, and r= 22-4294 Since r > 31, Baster Sunday in year 2000 is April (54 mod 31), that is, April 23 4. 32. d= (19-17-+24) (mod 30) = 17, 3000 (mod 19) = 17, 6 = 3000 (mod 4) = 0, ¢= 3000 (mod 7) (2-044-446-1745) (mod 7) =4, and r= 22-417 + Since r > 31, Easter Sunday in year 3076 is April (43 mod 31), that is, April 12. 3 [23 x 2/9] + 22-444 1732-4432 -17 +4025 (mod 7). Thus the desired day is Friday. (23 x 11/9] + 19+ 4-+ 1868 + 465 ~18+4-2=4 (mod 7). Thus the desired day is Thursday. [23 x 12/9) +17 +44 1908 + 475 —19+4—2=4 (mod 7). Thus the desired day is Thursday. (mod 1). Thus the desired day is Wednesday. [23 x 10/9] + 24+44 1945 + 486 - 1944-2 2, = [23 x 7/9] +20+4+ 1966 + 492 ~ 19 + 4~2= 0 (mod 7). ‘Thus the desired day is Sunday. Review Exercises (p. 250) 23 4, Although 2/8042079, 8 13041079, so 6 (3041073, 6, Since (5-+4 +6 +3) —(8+1+044) =18~ 18 =5 £0 (mod 11), 11 185140643, 8. 29224 = 3 (mod 3) 294221 = 0 (mod 3) 2494d424241 = 0 (mod 3) d41 = 0 (mod 3) d = 2 (mod 3) d = 2%5,0r8 10. 2990225 = 4 (mod 11) 290d221 = 0 (mod 11) 2+9+24+1)-(4944) = 0 (mod 11) 3-7 d (mod 11) 7 86 CHAPTER 5. CONGRUENCE APPLICATIONS x probably correct, 0 16. 1 18, Sum of the digits =9+949+0+0+0454545 (mod 9), so the digital root is 6 20. 232392 = 152%? = 1 (mod 9), so the digital root is 1 22. Sum of the digits = 1+146+143414040+844=8 (mod 8), so the digital root is 8. But the digital root of a perfect square is 1, 4, 7, oF 9; so the given number cannot be « squate. 24. § ts =145404+6-+442+2+3=5 (mod 9), s0 the digital root is 5. But the digital root of a perfeet cube is 1, 8, or 9; so the given mumber cannot be a perfect cube 26. ‘The check digit d corresponding, to 0-49200-05100 is given by 4 = ~(4,9,2,0,0,0,5,1,0,0)-(3,1,3,1,3,1,3,1,8,1,3) (mod 10) (4427424543) = -1= 9 (mod 10) ‘Therefore, d = 9, which agrees with the given check digit. So the given number is a valid UPC mumber. 28. The check digit d corresponding to 0-51000-02549 is given by d= ~(0,5,1,0,0,0,2,5,4,9)- (3,1,3,1,3, 1,3, 1,3,1,3 (G4+94+241544427) = —6 = 4 (mod 10) (mod 10) ‘Therefore, d= 4, Thus the UPC number is 0-51000-02549-4, 30. Check digit FSFSESETHS HAHA 7 (mod 9), so the check digit is 7. 32. Check digit {lel 5) + pl2- 0) + (2-7) + (2-0) + p{2-4) + (2-0) + p(2-6)+ 02-8) + BH04442 £04143) (mod 10) = -[L+045+04+8+043+7) +13] = -37 = 3 (mod 10) ‘hus the check digit is 3 21+ [2.6 x 100.2) ~ 32 +20-+ [16/4] + [20/41 1 (mod 7), 80 the desired day is Monday. 38. Let n = 7429, 29 = 2, and ff the sequence x1 = 5, x2 = 26, 23 9 = 1646... . Then: 2? 41. The recurrence relation 2.41 ‘J(et) (mod n) yields 677, x4 = 9161, 25 = 2957, 275 = 7346, 27 = 6890, 25 = 791, (@2-a1,7) (@y-a2n)=1 (ag 2a,n)=19 So 7429 = 19-301 = 19-17-23 = 17-19-23, 87 38. Serial number: YASI74491A- Numeric eode : 8081744910. We have f(8) = 9, 1200) = 5, P18) = 2% FU) = 4 PM) = 959A) = 8 FU) = 9, (9) = 9, ‘f(1) = 5, and f79(0) =5. The check digit must satisfy the condition 9x5¥2adx9484949e5e54s11 = 0. Using Table 5.4, this yields: (945) (244) #(948)+(949) (545) eo = AslelsOe0ee1 = (441) *(140)s000n = Owis0re = (Ox1)s0ne = 18025) = (s0)en = les = “Phus the check digit is 4. Supplementary Exercises (p. 291) 2. proof: Let m =F m0! and n = Srnl0'. Thon m+n = Tlm, +n,)10 = Smo! + Sado! = Sim, (nod 9) + Em (mod 9); that is, afm +n) = o(m) + p(n) (anod 9). 4. proof: tmib+no a i (Ramet --onamo)y = MKB ob nb = nb tml. tmb+no (mod bt) (nina ..-mamo}s (mod 6") ‘Thus, n is divisible by if and only if (ns-1...myn0)s is divisible by 8 6. proof: Assume dj10q-+r, Then dlf(10g-+r)a.+ (10 ~1)(~g)] since d]10a~ 1. Thus alg + ar. Conversely, assume dig + ar. Then dl{(g-+ar)10 + (10a ~ 1)(—r)]; that is, d]109 +r 8, Letting a = 5,7|n if and only if 7lg — 2r. 10. Letting a = 10, 11|n if and only if 12|q~ r. 12, Letting a = 12, 17\n if and only if 17|g—5r. 88 MW, 16. 20, CHAPTER 5. CONGRUENCE APPLICATIONS 1953 = 10-195 +3. Thorefore, by Bxorcise 8, 71953 if and only if 7[(195— 2-3 = 189). But 189 = 10-18 + 9, so 71189 if and only if 7/(18~2-9 = 0). Since 710, 711953. 51814 = 10-5181 44. Therefore, by Exercise 12, 17)51814 if and only if 17|(5181 —5 4 = 5161). But 0-516 + 1. So 17/5161 if and only if 17|(516— 5-1 = S11). Since 511 = 10-51 +1, 17]511 iF if 17|(51— 5-1 = 46); but 17 /46, so 17 (51814 proof: Let N= 10a+b = 3+ =0 (mod 7), 60 6 = 4a (mod 7). Then 1b +a+a= 36+ 2a = 120+ 20 = 0 (mod 7) Clearly, no single-digit numbers work, so let us check if there is a two-digit number tw. ‘Then 10t+u= 1+) (5.1) ‘Thetefore, —t + u = 0 (mod 11); that is, = u (mod 11). Then t= u, sineo 0 < tu < 10. Therefore, by equation (5-1), 10t + = 11(2t); that is, 11t = 22, so t= w= 0, a contradiction. Therefore, there are no such two-digit numbers. Now, assume there is a three-digit number n= hiu, Then 100k +108 +u = 11h + t-+u) (52) That is, h-tus case 1 Let h—t}u=0. Then f= h tu, 80 by equation (5.2), (mod 11), 90 h-t+u=0or iL 100h+10(h+u) tu = 11(2h+2u) MOh+ Mu = 22h+ 220 88h = ln Bho =u heOorl. Ith=Qu= Soh=1, Then u=8 and t=9. Thus n = 198, =. Then n=0, a contradiction. case 2 Let h—t+u=11, Then, by equation (5.2), h+u= 1144, s0t—=h}u— 1. Then: 1008+ 10(h+-u-11)+u = 12h+u—i14u) M0h+ 10u— O44 = 29h 4 22u— 121 shel = le Shot h=Oorl. Ih =0,u=1. Then ¢=—10, a contradiction, If h=1,u=9, Then 1, again contradiction ‘Thus the only such three-digit number is 198, —_—_——— Chapter 6 Systems of Linear Congruences Exercises 6.1 (p. 302) Note: CRT = Chinese Remainder Theotem 2, No, since 43 # 2 (mod 3). 4. no, since 67 #7 (mod 11). 6. x =3 (mod 4) yields x= 34 4t, = 5 (mod 9); thet is, 2; = 1 (mod 9). Then t = 5 (mod 9}, 0 ty =549t, Therefore, 2 = 3 + 4(5 +91) = 23 +36 8. 2 = 2 (mod 3) yields x = 2+ 3t = 4 (mod 5), 90 t) = 4 (mod 5); that is, ti = 4+ 5¢,, Therefore, 243(4 + Sta) = 14+ 15ty =5 (mod 7), so ty =5-+7. Thus 2 = 14 + 15(6 +70) = 89+ 1085. 10, = 2+ dt, = 3 (mod 5), s0 ty = 4+ St, Thorofore, x = 2+ 4(4-+ 5tz) = 18 4 20t = 4 (mod 9), 80 ty = 249g, Then x = 18 + 20(2 + 9ts) = 58 + 180t3 = 5 (mod 13), 50 ty = 7-+13t. Thus = 58+ 180(7 + 13t) = 1318+ 23408, 12. We have Mi Similarly, y 9 and Mz = 4. Myy, = 1 (mod 4) yields 9yx 7 (mod 9). Thus, by the ORT, x =3.9-145-4 (mod 4); that is, yy = 1 (mod 4), = 23 (mod 36), so 2 = 23 + 36r, 14. We have M, = 35, My = 21, and My = 15. Myy = 1 (mod 3) yields 35y; = 1 (mod 3); that is, m1 = 2 (mod 3). Similarly, yp = 1 (mod 5) and ys = 1 (mod 7). Thus, by the ORT, 2 = 2-35-244-21-145- 15-1 = 89 (mod 106), s0 x = 89+ 105 16. We have My = 585, Mz = 468, Mg = 260, and My = 180. Myyn = 1 (mod 4) yields 91 = 1 (mod 4). Similarly, yo =2 (tod 5), ya = 8 {mod 9), and ye = 6 (mod 13). Thus, by the CRT, x= 2-585 .1+ 3-468-2-44.260-8+5- 180-6 = 1318 (mod 2840), so x = 1318 + 2840 44501, Then 2 = 19 + 200! Thus the gi = 3 (mod 4) implies 2 = 3 4 4t = 4 (mod 5), so is, 2¢" = 3 (mod 6}, which is not solvable since (2,6) 3 (mod 6); that, is not solvable iven linear systen 89 90 20. 2. 24, 26. 28, 30, CHAPTER 6, SYSTEMS OF LINEAR CONGRUENCES We have x =2 (mod 5), 2 = 4 (mod 6), x = 5 (mod 11), and = Ms = 390, and My = 380. My, = 1 (mod m,) yields 858, = 1 (mod 5); that is, x1 = 2 (mod 5) Similarly, 715y2 = 1 (mod 6) yields y2 = 1 (mod 6), 390ys = 1 (mod 11) yields ys = 9 (mod 11), 830y¢ = 1 (mod 23) yields ya = 8 (mod 13). Thus, by the CRT, «= 2-858-244- 715-145-390 9-+6-830-8 = 1072 (mod 4290), so x = 1072. (mod 13). My = 858, My = 715, We have x = 0 (mod 12), = 4 (mod 8), x = 6 {mod 9), and 2 = 8 (mod 14). Since the moduli are not pairwise relatively prime, we cannot invoke the CRT to solve this linear system, so we apply iteration ince 2 = 12 = 4 (mod 8), 3t, = 1 (mod 2); that is, ty = 1 (mod 2), so ty = 14%. Then £ = 121 +2%y) = 12+ Ut, = 6 (mod 9), s0 ty = 2 (mod 3); that is, t = 2+ Sty. Then x = 12+24(2+3ts) = 60472ty = 8 (mod 14); that i, ty = 2472. Therefore, x = 60+72(247t) = 204+504t, ‘Tinus the desired integer is 204. We have n = 0 (mod 3), n =1 (mod 4), n = 1 (mod 5), n = 2 {mod 7), and n =4 (mod 11). Since the moduli are pairwise relatively prime, we invoke the CRT to solve this linear system, We have Mz = 1155, My = 924, My = 660, and Ms = 420. May, = 1 (mod ma) yields 1155y2 = 1 (mod 4) that is, yo = 3 (mod 4). Similarly, 924ys = 1 (mod 6) yields us = 4 (mod 5), 660ye = 1 (mod 7) yields ye = 4 (mod 7), and 420ys = 1 (mod 11) yields ys = 6 mod 11). ‘Thus, by the ORT, x = My -yy 1+ 1155-34+1-924-4 42+ 660-444. 420-6 = 4041 (mod 4620), s0 the desired integer ‘greater than 10,000 is 4041 +2- 4620 ~ 13, 281 Let n be the number of marbles in the box. Then m = 5 (mod 7), n = 6 (mod 11), and n = 8 (mod 13) We have My = 148, My = 91, and My = 77. Myyy =1 (mod my) yields 143yy = 1 (mod 7); that is, tn =5 (mod 7). Similarly, 91yp = 1 (mod 11) yields ye = 4 (mod 11), and 77ys = 1 (mod 13) vields yy = =I (mod 13), Thus, by the CRT, 2 =5-143-5+6-91-44+8.77-(-1) = 138 (mod 1001), s0 n= 138, We have n = 1 (mod 5), n = 2 (mod 6), n = 3 (mod 7), and n = 4 (mod 11). Also My = 462, Mz = 985, My = 330, and My = 210. Miyr = 1 (mod m) yields 462y: = 1 (mod 5); that is, uv = 3 (mod 5). Similarly, 385y2 = 1 (mod 6) yields yp = 1 (mod 6), 330ys = 1 (mod 7) yields ys = 1 (mod 7}, and 210y4 = 1 (mod 11) yields yx = 6 (mod 11). Thus, by the CRT, 1402-3-+2-985-14+3-390- 144. 210-1 = 1676 (mod 2310), so n = 1676 +2310t, Therefore, the largest such integer < 4000 is 3986, corresponding to ¢ = 1 We have n= 0 (mod 27) and n= =1 (mod 125). Then n = 27t) = ~1 (mod 125), so ty = 37 + 125. ‘Thus m = 27(37 + 125) = 999 + 33754, so the smallest such positive integer is 999, Exercises 6.2 (». 308) 2. 4 since (9,12)|(5— 8) No, since (10, 15) (3-2). a 6. yes 8. no 10, 51 + [12,15,20}¢= 51 +608 12, Since (20,28) = 4 and 4|17—5, the system is solvable, From x = 17 (mod 20), we have x= 17-+20¢;, 80 17 + 204; = 5 (mod 28); that is, ty = 8-+7¢. Thus 2 = 17 + 20(5 + 7t) = 117 + 1404. nee (12, 15)/0, (12, 18)]0, and (15,18)|0, the Jinear system js solvable. From the first congruence, T (mod 18); 16. Sinee z = 2 (mod 6), ¢ = 2464, so 2+64, by S44 Ttz. Thon 2 = 2} 64472) = 26-4 42% ‘Therefore, x = 26 +42(2 + 4ts) = 110 + 168 ‘Thus © = 110+ 168(1 + 3¢) = 278 + 504e. {mod 7); that is, t) = 4 (mod 7), ‘Therefore, (mod 8), 90 t = 2 (tod 4); thet is, t2 = 2-4-4, 8 (mod 9), so ts = 1 (nod 3); that is, ts = 143 18, Let n denote the number coins in the piggy bank. Then n = 3 (mod 6), n = 5 (mod 8), and n = 9 (mod 12). Since (6,8)|(3~5), (6,12)|(3-9), and (8, 12)|(5—-9), the linear system is solvable. The first congruence implies n = 3-+6t: = 5 (mod 8); thet is, fy = 3-448, Therefore, n = 3+6(8-+4t) = 21-4240 Since 21 + 24t = 9 (mod 12), n clearly satisfies the last congruence, ‘Thus the general solution of the system ism =21 + 24, so the maxiinum mustiber of coins possible is 285, corresponding to t = 11. 20, We have n = 0 (mod 2), n = ~1 (mod 3), n= -2 (mod 4), n = ~3 (inod 5), and n = —4 (mod 6). Since n= 2t; =—1 (mod 3), ty = 14 8%2, Therefore, n = 21; =2+ 6% = ~2 (mod 4). Then to = 2, son = 2+ 12ty = ~3 (mod 5); that is, ts = St. Therefore, n= 2+ 60t = —4 (mod 6), which is always true, Thus n= 2+ 602. Since n > 3, n= 62, corresponding to t = 1 22. Since (4,16) = 4 /(0+2), the linear system is not solvable. 24, Suppose there is such an integer n. Since 7jn+2, 2 |n+2. But 2%n, so 2|((n-+2)—2]; that is, 24/2, which is « contradiction, Therefore, no such integer exists. Exercises 6.3 (p. 12) 2. A= 4(-6) —5-3 =1 (mod 8) and (1,8) =1, so the system is solvable. 4. A=7-(~9)-5-8=2 (mod 15), and (2,15) = 1, so the system is solvable, 6 A=6(-9)-(-7)-11 (mod 17) and (6,17) = 1, so the system is solvable, 8 dz+5y = 5 (mod 8) (6.1) 32—6y = 3 (mod 8) (62) 92 10. 12. 4 16. 18, 20. CHAPTER 6, SYSTEMS OF LINEAR CONGRUENCES ‘Multiply congruence (6.1) by 3 and (6.2) by 4 122+ I5y = 15 (nod 8) 12x 24y = 12 (mod 8) Subtracting, 39y = 3 (mod 8); that is, y = 5 {mod 8). Then, from congruence (6.1), 3 ~ 6-5 =3 (mod 8); that is, 2 = ¥=5 (mod 8). (mod 8). Thus x = 3 (mod 8) and 7x+8y = 11 (mod 15) (6.3) S2—9y = 10 (mod 15) (6.4) Multiply congruence (6.3) by & and (6.4) by 7: 35x+40y = 15 (mod 15) 35x ~63y = 70 (mod 15) Subtracting, 103y = —15 (mod 15), so y = 0 (mod 15). Then, from congruence (6.3), T= + 11 (mod 15), 50 = 8 (mnod 15). Thus 2 = 8 (mod 15) and y = 0 (mod 15). 6r+My = 9 (mod 16) (6.5) 72+ 8y = 9 (mod 16) (6.6) Multiply congruence (6.5) by 7 and (6.6) by 6: 4204 77y = 63 (mod 16) 420+ 48y = 54 (mod 16) Subtracting, 29y (mod 16); that is, 3 (mod 16). Substituting for y in congruence (6.6), 72-+13-8 = 9 (mod 16); s0 and y = 13 (mod 16) 7 (tnod 16). Thus x = 7 (mod 16) As 2-15 y=1-(12-15) (mod 8), 50 A~! = L (mod 8). Therefore, x = 1- [(-6)-5 ~ 15] 5 (mod 8). 3 (mod 8) and A= ~63— 40 =2 (mod 15), so AW? = 8 (mod 15). ‘Therefore, = 8. |(-9)-11 — 8-10] = 8 (mod 15) and y 2 8-(7-10~5-11) =0 (mod 15) = 48~77 = 3 (mod 16), so A~! = 11 (mod 16). Therefore, 2 = 11 -[8-9~ 11-9] = 7 (mod 16) and 11: (6-9 ~7-9) = 13 (mod 16). A= 4-11—7- (—5) 59 (mod 14), 50 A“ = 11 (mod 14), Therefore, ¢ = 11- {11-2 —(—5)-11) = 7 (mod 14} and y= 11 (4-11 —7-2) = 8 (mod 14). 22, 24, 28. ehytz = 6(mod7) (67) 24 2y +32 = 6 (mod 7) (68) 2e43y-4z = 2 (mod 7) 69) Subtracting (6.7) from (6.8) yields y +2220 (mod 7) (6.10) ‘Multiply (6.7) by 2: Qt By +22 = 5 (mod 7) e+ 8y—4z = 2 (mod 7) Subtracting, y—62=4 (mod 7) (6.11) ‘Thus we have: yt2z = 0 (mod 7) y-6z = 4 (mod 7) Subtracting, 82 = 3 (mod 7), 90 z = 3 (mod 7). Then From congruence (6.7), 7 = 6-1-3 =2 (mod 7}, ‘Thus 2 = 2 (mod 7), y= 1 (mod 7), and z= 3 (mod 7). Aeieece te (andre: 120 3}=]1 1 2]=1-f1-(-6)~1-2}=6 (mod 7), 90 (A,7) 31 23 -4| |21 -6 ‘Thus the linear system has a unique solution. 1-1 2] {10 0 2 1 -1|=]2 3 —5|=1-(-15+25)=2 (mod 8). 22 1| [35 Since (A, 8) # 1, the system has no unique solutions. aula 12 3 (mod 7), so A-! = 6 (mod 7). 23 ~4 eae Let De =] 6 2 3] = 58 = 5 (mod 7), Dy = 6 (mod 7), and Dy = 23-4 116 1 2 6 |=~10=4 (mod 7), 232 Then z= A71-D, 26-55 3(mod 7). (mod 7), y= A“ D, (mod 7), and 2 = A“! D, =6 4 CHAPTER 6, SYSTEMS OF LINEAR CONGRUENCES 30, z- y42e = 7 (mod 8) (6.12) Qe+ y— 2 = 7 (mod 8) (6.13) Bn+2y+ x = 2 (mod 8) (6.14) By Exercise 26, this system does not have a unique solution, so we apply the method of elimination, Add congruences (6.12) and (6.13): 3242 = 6 (mod 8) (6.15) ‘Multiply congruence (6.12) by 2: 2e-2y+4s = 6 (mod 8) 3e+2y+ 2 = 2 (mod 8) W Adding, 52 +52 =0 (mod 8) ‘That is, 242=0 (mod 8) 16) Subtracting (6.16) from (6.15) yields 2 (mod 8}, so x = 8 (mod 4). Thus, either 2 = 3 (mod 8) org = 7 (mod 8). When x = 3 (mod 8), we get 2 = 5 (mod 8) from congruence (6.16) and hence ys 742-2 =745—6 = 6 (mod 8). Thus « =3 (mod 8), y = 6 (mod 8), and z = 5 (mod 8). Similarly, x = 7 (mod 8), y = 2 (mod 8), and z= 1 (mod 8). Review Exercises (p. s14) 2. Since 2 = 6+ 8 = -2 (mod 12), ty =2+3t, sor = 6+ 8(2+3t) = 224 2b 4, Since © = 446t) = —2 (mod 10), t) = 4+5t2, so r= 4+6(4+ ty) = 2843042 = —2 (mod 18). Then ty = 2-431, Thus © = 28 + 30(2 + 21) = 88 +908 6. We have My = 16, and Mz =9. Miyi = 1 (mod m) yields 16y; = 1 (mod 9); that is, yy = 4 (mod 9) Similarly, yy =9 (mod 16). Thus, by the CRT, x = 968 = 104 (mod Md), so x = 104+ L4dt 8. We have My = 84, My = 60, and My = 95, Mi is, yx = 4 (mod 5). Similarly, yp = 2 (mod 7) and yo +844 45 -60-2 +895 -11 = 4688 = 68 (mnod 420), s0 2 1 (mod my) yields Sdy: = 1 (mod 5); that 1 {mod 12). Thus, by the CRT, 2 = 8 + 4201, 10, Let n be such an integer. Then n = 8 (mod 11), n = 5 (mod 12}, and n = 14 (mod 15). Since 84 1]t, = 5 (mod 12), ty = 3-4 12t9, Therefore, n= 8+11(8 + 12t,) = 41 +1322 = 14 (mod 15), 445t, Thus n= 41 + 182(4 + 5t) = 669+ 6604, s0 the least such positive integer is 569. 80 ty 2 1 16. 18, 20. 2. m4, 95, Let n be such an integer. Then n = 3 (mod 8), n = 7 (mod 12}, n= 9 (mod 14), and n + 8ty 7 (tod 12), ty =24 ta, Therefore, n= 3 +8(2 + 3t2) = 19 + 24t, = 9 (mod 14), 80 tp = 6+ 7a, Then n= 19+ 24(6 + 7a) = 163-+ 168ta = 11 (mod 17), 90 ts = 8+ 174, Thus n= 1634+168(8-+170) = 1507 + 2856, so the largest such positive integer < 15, 000 is 1507 -+2856-4 = 12,931, 11 (mod 37), Since We have n = 0 (mod 4), n = -2 (mod 9), m = ~3 (mod 25), and n = ~5 (mod 121). Also M, = 12100, My = 4956, and My = 900. Mgva = 1 (mod ma) yields 12100y, = 1 (mod 9); that fs, yz = 7 (mod 9). Similarly, ys = 21 (mod 25) and ye = 16 (mod 121). Thus, by the CRT, B= 0-My-ui + (2) 1210-7 + (—8) - 4356-214 (—5) -900- 16 = 515,828 = 28, 672 (mod 108900) ‘Therefore, the smallest such positive integer is 28,672 Let m denote the number of plums in the basket. Then n = 2 (mod 6), n=8 (mod 9), n =7 (mod 11), and m = 14 (mod 15). Since n = 2 +64 = 8 (mod 9), ty = 1+ 3ty. Then n = 2+ 6(1 + 3t2) = 84 18tz = 7 (mod 11), 90 ta = 3+ 11ts, Then n= 8+ 18(3 + 11ts) = 62 + 198ts = 14 (mod 15), s0 ty = 44-5¢. Thus n = 62+ 198(4+5t) = 854+990¢, so the maximum possible number of plums in the basket is 854.4 990-2 = 2, 834 A=5-5-6 (mod 9) and (4,9) = 1, so the eystem is solvable. ‘The two congruences yield 5x: = 8 (mod 15). Since this congruence is not solvable, the given system is not solvable. 8r+1ly = 5 (mod 13) (6.17) T+ Sy = 10 (mod 13) (6.18) Multiply congruence (6.17) by 8 and (6.18) by 7: 56r + 77y 56x +72y 35 (mod 13) 80 (mod 13) Subtracting, 5y = ~45 (mod 13); that is, y = 4 (mod 13), Substituting for y in congruence (6.18), 7z+9-4 = 10 (mod 13); so # = 0 (mod 13). Thus. = 0(mod 13) and y 4 (mod 13). rty-2 = 8 (mod il) (6.19) cmyte ‘5 (mod 11) (6.20) poy-2 = 10 (mod 11) 21) Adding (6.19) and (6.20), 22 = 15 (mod 11), so x =1 (mod 11) Adding (6.19) and (6.21), 22-22 = 18 (mod 11), s9 22 = 18-18 =6 (mod 11); thatis, ‘Then, by congruence (6.19), y=8— 143 =10 (mod 11). Thus ¢ = 1 (mod 11), = 3 (mod 11). {mod 11), 10 (mod 11), and 96 CHAPTER 6, SYSTEMS OF LINEAR CONGRUENCES 26. a+2y—32 = 3 (mod 19) (6.22) 2e— ytde = 10 (mod 19) (6.23) 3e44y452 = 9 (mod 19) (6.24) Multiply congruence (6.23) by 2: 4 2y-+82 = 1 (mod 19) xt2y-B2 = 3 (mod 19) (6.25) Adding, we get 5x +52 =4 (mod 19) (6.26) Multiply congruence (6.26) by 2: 2x +4y—6: = 6 (mod 19) Be+dy+5z = 9 (mod 19) Subtracting, 24123 (mod 19) (6.27) Thus we have: Sr+ Sz = 4 (mod 19) x+lz = 3 (mod 19) Multiply congruence (6.27) by 5: Se-22 = 16 (mod 19) Sz+52 = 4 (mod 19) Subtracting, 72 = 8 (inod 19), so = = 12 (mod 19}, Therefore, x = 3-11-12 = 4 (mod 19). Then yS84a-12-1 8 (mod 19}. Thus 2 = 4 (mod 19), y =8 (mod 19), and z = 12 (mod 19). 28, A=72-7T 8 (mod 13), so At (mod 13). Therefore, 2 = 5(9-5 — 11-10) =0 (mod 13) and 5(8-10~7-5) = (mod 13). ed 30.4=]1 -1 1/24 (mod 11), so A~® = 3 (mod 11). 2a 1 teal 1| = 26 = 4 (mod 11), D,=]1 5 7 (mod 11), and -1 110 -1 1 (mod 11). ‘Then 2 = AW! Dz =3-4=1 (mod 11), y= AM! Dy = 3-7 = 10 (mod 11), and 2 = A“! D, 3-153 (mod 11) iugas 32.As]2-1 4 7 (mod 19), so A! = 11 (tmod 19), 34 5 3238 1 3-3 Let Dz =| 10 -1 4] = -238 = 9 (mod 19), Dy = | 2 10 4) = 56 = 18 (mod 19), 9 45 9 a aerate: De=|2 -1 10 |=8=8 (mod 19) 3049 ‘Then 2 =A7". D, =11-9=4 (mod 19), y= A~-D, 11-8 = 12 (mod 19), 11-18 = 8 (mod 19), and 34. Let 2 denote the number of 29-cent stamps and y the number of 35-cent stamps, ‘Then 290+ 85y = 1 (mod 23) 392+ 45y = 6 (mod 28) 4 = 29-45 ~ 29-95 = ~60 = 9 (mod 23) and A~! = 18 (mod 23). ‘Therefore, x = 18(45 -1 ~ 35-6) = 20 (mod 28) and y = 18(29- 6 — 39-1) = 15 (mod 23). ‘Thus = 204230 and y = 15-423. Since 29(20-+ 23¢) + 35(15 + 23¢") < 1800, 29¢ + 35¢" < 30; so either ¢=0=¢,ort=1 and’ =0. Thus, either Judy bought twenty 29-cent stamps and fifteen 35-cent, stamps, or forty-three 29-cent stamps and fifteen 35-cent stamps. Supplementary Exercises (p. 210) [te] s]-[ 2] -[5 feos [olf t]-[ S]-[5 f] ome ‘Therefore, they are inverses of each other modulo 13. «EITC “(2 JE ]-[] By Exercise 2, 2 9)[5]_[s]_[a 10 sH[e]-[2]=[5] ma 98 10, 12, 4, CHAPTER 6. SYSTEMS OF LINEAR CONGRUENCES ‘Thus (mod 13) and y = 9 (mod 13). A 6 -5-4=5 (mod 7) and A? (mod 7). Therefore, re “J-[ 8 2) [62] wan a of" [oe A=8-11—10-13 =9 (mod 17) and A-? = 2 (mod 17). Therefore, atea{ BL] 2 26720 8 81 cain w 8 20 16 uM 16 [52] [f]-[f] eon meee (s}-(2 JE 1-(2]-E)] cae | fT) tte te att by Exercise 9, 3 (mod 16) and (4,16) = 1, both A~ and A~t exist modulo 16. A~! = 11 (mod 16). Then A“? = ee eae apes eLeilel-Elemtel ae 45] _ [13 10s |= 3 | cmt Chapter 7 Three Classical Milestones Exercises 7.1 (p. 326) 2.1,12 41,2 6.1,3,5,7 81,411, 10. Yes. Since 2? = 1 (mod p), and (mod g), #" (mod [p,q}); that is, x? = 1 {mod pq). 12, Lot p=3. Then (p— 1)! = =2=~1 (mod 3). 14, With p=7,(p~1)! = 6! = 720= 1 (mod 7). 16. proof: By Wilson’s theorem, (p~ 1)! = -1 (mod p); that is, (p—3)!(p—2)(p—1) = (p-3)!(—2)(~1) = 2p ~ 3)! = -1 (mod p) 18. proof: Notice that i= ~ i} (mod p), Therefore: PS ..(p— 2)? & f1-3...(p—2fN-3...(9—2)] (mod p) [1-3...(p-2)}((-(— D)L-@- 3)... [-@- (»-2))] (mod p) (1-3...(—2l(—1)(P ~3)...2)\(-aOY* (mod p) (3-19-97 (mod p) (-1)(-DO-7 (mod p), by Wilson’s theorem (21°47 (mod p) 20. proof: Let n> 2 be a prime. Then, by Wilson's theorem, (n— 1)! = —1 (mod n); that is, (n ~2)!(n 1) = (~1)(n = 2)! = ~1 (mod 2), s0 (m ~ 2)! =1 (mod n). Conversely, let (n — 2)! = 1 (mod n). Then (n ~ 1)! = (n ~2)!(n ~1) #1 (-1) = —1 (mod n), so by the converse of Wilson’s theorem, n is a prime, 99 100 2. 34, 3 With p CHAPTER 7. THREE CLASSICAL MILESTONES 1350009) net = = SBC (mod p) = (-1)0-024 (mod p) = (-1)-Y? (mod p) roof: By Wilson's theorem, (”) __teptt__ nlp = 1). np =p +1) Finp— ay = P np — M12 @ = n(-1)"* God p) =n (mod p) (an0d 5) proof (by induction on r): Clearly, the result is true when r= 0 and r= 1. Assume it is true for an arbitrary integer r > 1. Then, by Pascal’s identity, OED 2) 5 € ‘Thus, by induction, the result is true for every r = ("7") = -(-1Y (mod p), by the inductive hypothesis; that is, (,2,) = (-1)’*? (mod p} 8. Using Exercise 21 with p= 71 and r =T1, 63! = 1 (mod 71) 3, 1)/2I! 5 (mod 18). Then {{(p—1)/2!}? = 5? = —1 (mod 13), With p= 29, [=A = (2-14)(B- 10)(4-7)(5-6)(B- 11) -(9- 13)(1-12) (21)-1-(21)-1-1-1-12 (mod 29) 12 (mod 2) ‘Therefore, {((p — 1}/21}? = 12” = -1 (mod 29). No; no} no, proof (by C. A. Minh): Let - p+ 1)(p +2) (2p — 1) Wm Flt) = 24 Melo 9 co) 101 is an integer. Then w=!) = @+0...a-0 1-2..-(p—1) (mod p) (0! mod») Since ((p ~ 1)!,p) =1, it follows that N= 1 (mod p). Exercises 7.2 (p. 538) 2. We have 30 —8)"8 (mod 19). Therefore, a8), 9 19,112 11 (mod 19) 4, 43 = 12 (mod 31) and 12° = 1 (mod 31) by Fermat's little theorem, ‘Therefore, 12555 5 (129)!85 98 = 184 9 6 (mod 31) {mod 7) and 5% = 1 (mod 7) by Fermat's little theorem. Therefore, ro | ey 5 (mod 7) {mod 7) and 2° = 1 (mod 7). Therefore, | ae 1g (nod 7) 7 (mod 13) 7 (mod 13) 7-7 (mod 13) 20 (mod 13) 17 (mod 23) 17 (mod 23) 6 (mod 23) 2 2 (mod 23) 14, By Fermat's little theorem, 11"° = 1 (mod 17). ‘Therefore, 11'9 + 17! = 140 by Fermat's little theorem, 17! = 1 (mod 11). ‘Therefore, 11! + 179 11 417" = 1 (mod (17, 11]), by Theorem 4.8; that is, 11°° + 17! (mod 17). Again, +15 1 (mod 11). Thus = 1 (mod 187), 16, (12+15)* 2717 227 (mod 17), by Theorem 7.7 = 12415 (mod 17) 127 4 15!7 = (mod 17), by Theorem 7.7 102 CHAPTER 7. THREE CLASSICAL MILESTONES 18, 22351 for some positive integer n. Thon 2°! = pn®, Since the LHS is od, both p and n must be odd. Let p= 2k-+1 for some integer &. Then 2% — 1 = pn; that is, (2 — 1)(2 + 1) = pn®. Since 2h — 1 and 2* +1 are conseoutive odd integers, they are reletively prime, Therefore, either 2 — 1 or 2 +1 must be a perfect cube. Land ©, then +? for some integer r. Then 2* case 1 Suppose 2* ~ 1 is a perfect cube: 2 — 22 = (r+ 1). Therefore, (7° + 1)]2, sor? +1=1 or 2; that is, r= 0 or 1. If 1, which is impossible. Ifr = 1, then 2°-! = 4, so p -) case 2 Suppose 2 +1 is a perfect cube: 2 +1 = s® for some integer s. Then 2 Tand 29-1 = 9% = (s?—1)?, Therefore, #° 1/2, so s*—1 = 1 or 2; that is, s° = 2 or 3, Both are impossible Thus p= 3, 20, proof: By Theorem 7.7, a = (a)? = af (mod p). Likewise, 0°? = (a?)? = a? (mod g). Then oP — a? — a? +a = a? —a? —a +0 = ~: r? =r (mod p). Then: oP) 0 Fp). - EGE Gs ee write sina sem L+r? (mod p), by Exercise 30 wey = rl, by the inductive hypothesis ‘Thus the result follows by PMI 34, proof: By Fermat’s little theorem, (a+ 8)? = a+b = a? +5? (mod p) 36. proof (by PMI): Wh a=1, g(a +1) = (2 +1)? ~ (2 +1) = (241)? ~ (241) = 2? — 2 = (2) (mod p) So the statement is true when a = 1 Now, assume it is true for an arbitrary positive integer r: g(x +r) = (2) (mod p); that is, (2-1)? ~ (+r) (e) {mod p). Then Wetrel) = (ctrtiyP-(e4rth) = (ctr)? +1]—(e+r+1) (mod p), by Exercise 35 (a? — 2) + (r? —r) (mod p) 2? —2 (mod p), by Theorem 7.7 9(z) (mod p) ‘Thus the statement is true for every positive intager a. 38, We have: = 2 (mod 2323) (1.2323) = 1 4 (mod 2323) (3.2823) = 1 64 (mod 2323) (63,2323) = 1 64 = 510 (mod 2323) (509.2323) = 1 510° 196 (mod 2323) (195,393) = 1 196° = 708 (mod 2323) (707,2323) = 101 So 31|7967. Exercises 7.3 (p. 240) 2-7, both 27-1 = 3 and 2? — 27 are factors of 2" ~ 1. Therefore, a 5461 =3-127-43= 3-43. 127 104 CHAPTER 7. THREE CLASSICAL MILESTONES 4, 213.7, so both 2° —1=7 and 2” ~1= 127 are factors of 2°" — 1. Therefore, P| = 7299503 = 7-127 -2959 = 7-197- 7-337 = 7. 127-337 6, Notice that 645 = 3-5. 43. So we compute 2% modulo 3, modulo 5, and modulo 43. 5 = (1) = 122 (mod 3) eye 181.9 = 2 (mod 5) = 1-252 (mod 43) Therefore, by Theorem 4.8, 28 2 (mod 645), 8, First, notice that 161038 — 2.73 1108 2161098 sg =2 (mod 2) 1) 2363098 = (9)17899 9 = 1192 = 2 (mod 73) 2) (28802) 48, 9148 = 8, pie gut (2°)!4. 28 = (—79)"4 64 (mod 1103) 79. 64 = (798)*. 792-64 = (2)*. 726-64 (mod 1103) 16-726 -64 (mod 1103) 586-64 = 2 (mod 1103) (73) ‘Thus, by congruences (7.1), (7.2), and (7.3), and Theorem 4.8, 2861038 == 2 (mod [2,73,1103] = 2 (mod 161038) 10, We have 91 =7: 13. Also, 3” u (mod 7) 7.121 (mod 13) ‘Therefore, by Theorem 4.8, 3° = (anod [7,13)) (anod 91) 12, We have 124 = 4-31. 5 1 1 (mod 4) (6 )t-5 a4 (mod 31) ‘Therefore, by Thoorem 4.8, 512° = 1 (mod [4,31]) = 1 (mod 124), 1, We have 65 = 5-13, Then wt = ane (mod 5) 12 = (1) =1 (mod 13) . ‘Therefore, by Theorem 4.8, 12% = 1 (mod [5,13]) = 1 (mad 65) 16, We have 341 ~ 11-81, So we compute 3° modulo 11 and then modulo 31: 3°40 = (339)54 1 (amod 11), whereas 38 = (3)!" 319 = 141.25 = 25 (mod 11). Thoeforo, 3!® 1 (mod [11 31) that is, 3° #1 (mod 341). +1819. Let a be any positive integer with (a,1729) = 1. So, by Fermat's little theorem, (mod 7), a!? = 1 (mod 13), and a!® = 1 (mod 19). Then: (0)? = 17 = 1 (mod 7), a!7® = (a!2)!9 = 19 = 1 (mod 13), and a!7 1 (inod 19). ‘Therefore, a¥78 = 1 (mod (7,13, 19] (mod 1729) 20. We have 2821 = 7. 13-31. Let a be any positive integer with (a, 2821) = 1. So, by Fermat's little theoram, a® = 1 (mod 7), a!? = 1 (mod 13), and a®° = 1 (mod 31). Thon: 820s (Q8)O 5M 1 (mod 7) 1 (mod 13) a8 = (a2) = 151 (mod 31) a2 = (ql2ypse = 288 Therefore, 02% = 1 (mod [7,18,31}) = 1 (mod 2821). 22, 329 = (35)? = 1? =1 (mod 11) 24, 198? = (199)? = (-1)? =1 (mod 13°) 26, 386 = (38°)* = (-1)® = 1 (mod 172) Exercise 7.4 (p. 317) 2, o(18) = o(3-5) = o(3)y(5) =2-4=8 4, 9(28) = (2-7) = g(24}9(7) = 2-6 = 12 6. 28-1,28-2, 28-7,28-8,28-11,28-13, and 28.14; the corresponding least residues modulo 15 aze 13, 11, 7, 1, 14, 8, 4, and 2, respectively. 8. 15-1,15-3,15 3, 15-9, 15-11, 15-18, 15-15, 18-17, 15-19, 15-23, 15-25, and 15-27; the corresponding, least residues modulo 28 are 15, 17, 19, 23, 25, 97, 1, 3, 5, 9, 11, and 13, respectively. 10. 9 = L = (2), (3) = 2 = (4), (5) = 4, 96) = 2, (7) = 6, o(8) = 4, (9) = 6, (10) = 4, (11) = 10, 9(12) = 6, (13) = 12, (14) = 6, and o(15) = 8. We conjecture chat yo(m) is even if m> 12. Since (10) = 4 and (a, 10) = 1, a= 1,3,7,or9. Then 14 = 1 (mod 10), 34 = 9 = (1)? = 1 (mod 10), (3) = 1 (mod 10), 9 = (-1)* = 1 (mod 10), 306 a 16. 18, 20, 2. 26, 28. 32, |. We have Ie CHAPTER 7. THREE CLASSICAL MILESTONES We have ¢(28) = 12 and a= 1, 3, 5, 9, 11, 13, 15, 17, 19, 28, 25, or 27, Then: V2 = 1e(-1)? 227"? (mod 28); 32 = (yt (-3)'? = 25"? (mod 28); 23)! = 23 (mod 28); of u® = ()?=s1? 19? = (agai by Buler’s theorem, 7° = 1 (mod 18). Therefore, Since 25 = 7 (mod 18) and (18) 125850 = 72680 = (78)425 = 145 = 1 (mod 18) We have (28) = 12, s0 by Euler's theorem, 19920 32020 + (g!2)108, 94 = 1168. 34 = 81 = 95 (mod 28) 34) .5 = 119g = Since p(10) = 4 and 23 = 3 (mod 10), by Euler’s theorem, 237777 = 377 3 (mod 10), 60 the ones digit is 3. We have (16) = 8, so by Buler’s theorem, 138 = (138). 19 the ones digit is 1 195.1 =1 (mod 10). Therefore, (mod 12). Sinoe (12) = 4, multiply both sides of the congruence by 113 = 11 (wd 12} H(z) = 11-5 (nod 12) = 7 (mod 12) Notice that (24) = 8, so multiply both sides of the congruence 17 = 20 (mod 24by 177 = 17 (mod 24): 17Q72) = 17-20 (mod 24) & = 4 (mod 24) We have 4 = 17 (mod 25), o(25) = 20, and 429 = by 19 (mod 12): 9 (mod 25). Multiply both sides of the congruence 19(4z) = 19-17 (mod 25) = 28 (mod 25) (38) (462) = 92-37-11) = g(2)o(8)eC7)e(11) = 1-2-6. 10 = 120 @6-7) = e(8)p(7) =4-6=24 107 34. F old) = vl) + (2) + (5) + v(10} =1+1+44+4=10 a 36. D vd) = v(l) + e(17) =1 +16 = 17 98. MMe) = (1) 01) + 40. Syd) = (YPM (A) + (eC) + (1) (8) + (1) —C0)+ ore (9/446) + (-1)99(12) TH1$2-242-4=0 AT) = =n ifn is odd i 0 otherwise 2. DD" 49(@) = { M4 Let $= 141+... p11 = WBS = (10,51) = 1, 90 5 =0 (mod 51); that is, 1. Therefore, 108 = 119? — 0 (mod 51). But iei+.¢" (mod 51) 40. Let a=3 and b= . Then ¢([8,5]) = e(18) =8 42 = [2,4] (e(3),9(5)). 48. proof: By Exercise 47, %™)~" js an inverse of a modulo m. So, multiply both sides of the congruence by art = ae"-15 (mod m) = at" (mod m) 50. proof: By Exercise 49, pe 4 g20 1 (imod pq); that is, pt! +g?! = (9, 10), (9n,10) = 1. Then, by Euler’s theorem, 10°") = 1(mod 9m). ‘Thus rH. Since the RHS is an intoger consisting of all, (imod py), 52. proof: Since (n, 10) = 10%") — 1 = Gnk for some integer k, so nk = # 1's, the result follows. 54, There are eight positive integers < 2 and relatively prime to it. They are 1, 3, 5, 7, 9, 11, 19, and 15. ‘Therefore, (2!) 4 — 98 56, There are 20 positive integers < 5? and relatively prime to it. They are 1, 2, 3, 4, 6,7, 8,9, 11, 12, 13, 14, 16, 17, 18, 19, 21, 22, 23, and 24. Therefore, (52) = 20 = 5? — 5, 58. proof: The positive integers 1; thats, aM = 2 (mod [rns, may... ma]). Sinco Mas = flo), elm)... 4(me) eCMe42)] = (Me, p(mi42)] and My|Mys1, it follows that aMer = 1 (mod [maymea,....me]) (ra) 108 CHAPTER 7. THREE CLASSICAL MILESTONES Since a¥im41) (mod mess), by Buler’s theorem, we have gilees (mod mess) 75) From congruences (7.4) and (7.5), it follows by the above result that gies {amod {fry may..., m4], at); that is, Muy 1 (mod [ry ma,.--, ma, meg) ‘Thus the result follows by induction. 62, My =7, Me =5, 965 = 4, and (7) =6. By the CRT, 2 = 2.74 4.3.58 =17 (mod 35). 3 115'42.10743-64 = 64, My = 15, My = 10, My = 6, y(2) = 1, (3) 23 (mod 30). , and (5) = 4. By the CRT, 66. My = 308, Mz = 231, Mg = 132, My = 84, (8) =2, (4) = 2, (7) =6, and y(11) = 10. By the CRT, x= 1-308? + 3-231? + 4-192°+7- 849 = 403 (mod 924) 68. proof: Since (2,4) = 1, by Bulo’s theorem, 2% (mod a4). We have: Om = ntelon) +1 = peony a = 2-141 (mod an) 0 (od a) ‘Therefore, aqme Review Exercises (». 3:0) 2, (3-1)! = 221 (1+ 22)(2-12)(3 -8)(4-6)(5-14)(7 -10)(9 -18)(11 -21)(18 -16)(15. 20)(17 -19) (A DeDeDDe ded Dette 11 (mod 23) (mod 5), s0, by Theorem 4.8, 14! = 0 (mod 15). Thus 1d! # ~1 (mod 15). 4,14! (nod 3) and 14! 6. 208 = 110 = 11 = (113)! = (-2)!" = 2 (mod 31) 8, 312705 = gr7os — 3%)77 gt 77 (88) 8 {mod 23) 10, 7151969 = 158809 = (182) 15 = 191.15 =1-15 = 5 (mod 28) 12, By Exercise 50 in Section 7.4, 23! = 43°? = 1 (mod 43 - 23) (mod 989). 14, By Exercise 24 in Section 7.2, 23% + 298 = 28 + 29 (mod 23-29) = 52 (mod 667) 16. 35% = (358)F 352 Bm SGI = 51 357 451% 18, 241010 = 21010 = (geya0e 20, We have: 2 2 (mod 9353) 2 4 (mod 9353) ° 64 (mod 9353) 644 = 7287 (mod 9353) 72875 = 924d = —109 (mod 9353) (+109) = 6755 = -2598 (mod 9353) (-2598)7 = 3486 (mod 935) 3486" = 2775 (mod 9353) 27759 = 324 (mod 9363) 3240 = 4101 (mod 9353) 4101 = 5971 (mod 9353) ‘So 199]9353 and 9353 = 47 199. 22, (17) = 16 24. (8675) = (3 -5?- 79) 26. (20) =8 28, (28) = 12 109 98 35? = 95-352 = 1295 (mod 1785) si51?= 1225 + 561 = I (mod 1785) 51-51? = 561 (mod 1785) (1) = 1 (mod 11), so the desired ones digit is 1 (1,9353) (3,9353) (63,0353) (7286,9353) (9243,9353} (6754,9353) (34859353) = (2774,9353) = (323,9353) = (4100,9353) = (5970,0353) = 199 (3) p(54)9(74) = 2(5? ~ 5) (7 — 7) = 2-20-42 = 1680 30, There are ¢(20) = 8 positive integors < 20 and relatively prime to it. They are 1, 8, 7, 9, 11, 13, 17, and 19, Then 1 (ise 32, 13091782 = gi (gIO)179, g? 34. Since 94x = 82 (mod 19), we have —2 36, The congruence 2552 = 63 (mod 28) yields 31 = 7 (mod 28). Then 9(82) 21 (mod 28). 57 (mod 28). Therefore, x = —7 38, Notice that 18705 = 3-5 -29-43, We have: 2287S (80295 5 (1055 = gre (g8yt070 y= 14076 238708 (Qty 858, 9 ‘Therefore, by Theorem 4.8, 2!85 — 2 (mod (3,5, 29, 43) 1 = (+1) = 19* (mod 20); 38 = (34? = 1? = (-1)8 = 138 (mod 20); and 9° = (32)8 783192 (77). 7191-2 2197 (9h) = (4872, (-3)8 = 17° (mod 20); 7° = (-9)8 = 11° (mod 20) atta 179. 81 = 81 (mod 100), so the last ¢wo-digit number is 81 3 (mod 19); that is, x = 6 (mod 19). 7 (mod 28); that is, (amod 3); 1-2=2 (mod 5); (mod 29); and 2 (mod 43) = 2 (mod 18705), so 18705 is a pseudoprime. 110 40. 42, 44, 48. 82. 54, 56. 58, 197 = (11898. 128 = 498. 217 CHAPTER 7. THREE CLASSICAL MILESTONES Let Sa 14d 4 LOT MM, Then 185 = 14 (13,27) = 1, so $= 0 (mod 27); that is, 1+14+...+14"7 = 0 (mod 27), by Euler's theorem. But 0 (mod 27). Notice that 341 = 11-31. We have: 1s (841m 2007 5 (95)190. 9? xs (-1)!89. 4 1-4 = = 15 (mod 11) and 1594) = (154) -15 = @8)7-15 = 17-15 5 (mod 31), By Theorem 4.8, 15%" = 15 (mod [11, 31}) = 15 (mod 341), Since 51 = 3-17, we compute 35° modulo 3 and modulo 17, and then apply Theorem 4.8: 35° = (-1)*' = -1 35 (mod 3) and 36 = 1" = = 35 {mod [8,17] (4382)! 207 = 35 (mod 17) ‘Therefore, by Theorem 4.8, 3554 1036. 2170 = 1 (mod 71) ¥ old) =¢(1) +91) 1 +0211 am ze = 9h) + (2) + (4) + 017) + yC14) + (28) 141424646412=28 EYE p(a) = (1) (1) + (1)! g(11) = (-1) 1+ (-1)-10= 11 am Eoomeos = (=1)7* (1) + (-1)8/9(2) + (= 18/494) + (-1)/7 94) ime (-1?*4p(14) + (—1)9/8(28) 141-2+6+6-12=0 Let a be any positive integer relatively prime to 6601 = 7-23-41, By Fermat’s little theorem, a =1 (mod 7), 4? = 1 (mod 23), and a! = 1 (mod 41). "Therefore: (08)! = 119 = 1 (mod 7) 22)800 = 180° = 1 (mod 23); and {imod 41) = @ = (any re ‘Then, by Theorem 4.8, 0 = 1 (mod (7,23, 41]) = 3,--4(P= 1/2, (P+ 1)/2,....p— 1. But: (+D/2=Pp-~-V/2 = ~(p—1/2 (mod p); (p + 3)/2=p- (p— 3)/2 —(p— 3)/2 (mod p); (mod 6601). ‘Thus 6601 is a Carinichse! number. proof: The least nonresidues modulo p are 1, 2 p-2 —2 (mod p); and p-1 =1 (mod 9) a ABQ. (P= ‘Therefore, the least nonzero residues modulo p are congruent to —(p —1)/2, 1)/2 in some order. Supplementary Exercises (p. 351) 2. proof: Let p be » Wilson prime, Then W(p) = =U = 0 (mod p). Thus p | S=#, 50 P{l(p— 1)! + 1], That is, [(p— Ut + 1] = 0 (anod p*). Conversely, [(p— 1)!-4 1] =0 (mod p?). Then p?|[(p— 1)! + 1}, 90 xl! {(p). Thus W(p) = 0 (mod p), so pis a Wilson prime. 4. 4, 22,27, 58, 85, and 94 6. (6) =4424 141 = 8, /@) = 42414128 8. proof: Let r, be the remainder when 10 is divided by n; that is, 10 = 7; (mod n), where 0-< ri 1 Tl. Then Let n= tle ‘Then y(n) = oN (§ ) Since 8p(n) = n, this implies 8[](ps ~ 1) = T] (Again, we 1 i Sfp: that is, pa = 8. (We have chosen i = 2 for convenionee.) Then 2[RHS, so py hhave chosen i = 1 for convenience.) Hr > 2 this implies [fn ~ 1 where k= * Ps, where #41 or 2. But this is impossible. Therefore, n = 2/38, | pF) = pp 1) is a square only if p—1= 1 and e~1 is even, Therefore, p= 2 and ¢ is odd. . . Proof: Suppose ain. Let n=p* I] af. Then mp =x" [] af. selon) = p*(0 = 1/p) T1948(1 = 1/9) = pon, since on) = p*p—?...wf8(L = 1/p) [UU ~ 1/p.). This yields (p — I)p(n)} = p(n); that is, p— 1 = p, which is a contradiction. proof: Let n= [] pf, Since min, m = []pf', where 0 < f, < es. We have v(m) = m]](1 — 1/p:) and ln) = n[](d ~1/p.). Since mfr, it follows that ip(m))p(n). Proof: Let m =n =p, Then (m,n) =p. Therefore, y(n?) = g(p-p) = sFre(p)elp) = sEx(p— (P~ 1)= pp), proof: Let m and n be any positive integers such thet: (m,n) = 1. ‘Then, by Exercise 41, y(mn) = payelme(n) = folm)e(n) = plmo(n). Therefore, ¢ is multiplicative proof: Using Exercise 41 with m =n, we have (n,n) (n?,n) =n, Therefore, pln) = pln? -n) = Soy he de™) = ny(n) = nlngln)] = n(n) (250) = p28) =25/2= (4096) = y(2!2) = 20% Since (6,15) = 3, (90) = y(68- 15) = sfye(6)o(15) = §-2- e(S)o(5) = 3-2-4 = 24 Notico that (10,169) = 1. Therefore: (1690) = (10 16) = yO) p(18") = 4:13-g(13) = 4-13-12 = 624 15 82. (81) (34) = 3°13) 54 54. (1728) = (2-38) = o(2")e(3% F o(2) - 3%(3) = 2-1-3? 2 = 576 56. $(8)=14+34547=16 58, $(12)=14547411=24 60. proof: Let n = 4m, where m = 2*s and s is odd. Then: e(n)/2 = eldmn)/2= e(2*s)/2 = pet -2kI9(0)/2 Dols) = pl2**s) = e(n/2) (2m) 62. proof: Suppose y(m/n) = y(m)/ie(n). Since g is defined on the set of positive integers, njm for ‘e(m/n) to be defined, Let m = nk; so y(m/n) = y(k). But plm)ieln) = p(nk)/p(n). ‘Therefore, lnk) /o(n) = (); that is, (nk) = p(n)p(k). Since ¢ is multiplicative, this implies that (nk) = 1 Conversely, let m = nk and (n,k) = 1. ‘Then (nk) = (n}o(A)s that is, g(m/n) = (A) Plnk)/e(n) = plrn)/p(n), 08 desired Exercises 8.2 (». 372) 2. 1560 = 3.5 13, 50 7(1560) = (8+ 1)(1-+A)(L + 1) +1) = 32. 4, Since 44982-=2.9".7.17, r(44982) = (14+ 1)(3-41)(2+ 1)(1 +1) $48. 6, Since 1560 = 2°-3.5-13, (44982) = 3-80. 342.288 RE = 128,120. 10. 1, p, a, Pay a, and pq”, 12. 1, p, a pa p®, 9, 9°, Pa, pg”, pa, pg, and pig 14, o(pq?) = (14 pl +9q4+4") 6 16. 18, 20. 22, 24, CHAPTER §, MULTIPLICATIVE FUNCTIONS og) = (4p +p tatae +a) oe) = tpt. t+ (at pat. + pig) +. + tpa 4... 490) = (tpt. tp) tal tpt. t P+. F ated. tp!) = (tpt... tpl te+... +0) 1 gta , af Positive integers of the form p?, where p is prime a(n) = 72") = 2° 41 and o{n) = 28" Product = [p= pe = prev? 6. a(p*) — pt = 34, | 44, 46. 48. Since n = p(p +2) is the product of two primes, +(n) o(n) = ol +2)) = o(p)o(p +2) = (@ +1)(p-+3) ‘po (666)) = (1482) = 432 = 2-216 = 29(666) 4 o(p(667)) = (616) = 1440 = 2-720 = 26(667) proof: Notice that as d runs over the positive divisors of m, so does n/d. Therefore, et n *(E2) -E@ “Bees so 4 = oe x proof: We have y(p*) + o(p") = 2p* (p* -p') + 7 apt — ap ep 1 = Bey 1) Peerertes tely proof: Let n be a perfect square. Then n = J]. p2. Therefore, r(n) = [](2ei + 1), which is clearly . 4 od, proof: Let n= 2. Then o(n) = 24 —1 is odd. 50. 52. 54, 56. 58. 60, 02 64. 66. ut proof: Let n be a perfect square. Then n = [[pi*, so 2 is odd. Thus o(n) is odd, since itis the product of odd numbers. ‘ proof: Let n = [[p* be the canonical decomposition of n. Since n is odd, each prime factor p is od. Since o(n) = [Lo(p*) = [](1+p-+...+p*) is also odd, each sum s =1-+p-+---+p* must be odd, But sis the sum of of e+ 1 odd summands, so ¢ +1 must be odd. Hence ¢ must be even, Consequently, n imuust be a square. Sr. proof: Since o(p*) on(12) = Sd? = P42? 43? dP 46 $1 = 144494 16+ 96-4144 = 210 a 03(23) = 5 d* = 19 +239 = 12,168 at culo) = Did* = 18 + pt spk 4d aw ened’) = 0 a aes Since og is inultiplicative, ox(pta’) = oe(p")ou(a*) pietDe 7 giteDe oy FAT aT on(16) = 02(24) = 2 93(36) an(2?- 39) hs CHAPTER 8. MULTIPLICATIVE FUNCTIONS 70. proof (by PMI on the number of prime factors of n): Let n = []pf. When i = 1, n= pit. The product of the positive factors of nis [[pin® = py1t)/? = (ppyor*8? = nrl/2_ So the formula works when # = 1 5 kat Now, assume it is true for an arbitrary positive integer i= k. Let m = [] pf and n = [] pf’. Notice that n= mpf'!} and 7(n) = r(0n)(ex41 +1). The product of the positive factors of n is beens (ones fous gealenss/2 TL pit? pitt II # vol a sslee (a) /2 (exes t)falenea (ert) Censa HD HOUR yCenyr40 lens 9). (e440) = = wong yr = omeggrone Teme ‘Thus the result follows by induction, Exercises 8.3 (p. 379) 2. Weave n= 2°-¥(2" — 1), where 2° 1 is a prime, Therefore 9(n) = vl? e(2? — 1) = P-2(9P — 9) = 2F-1 (2-1 1) 4, Since n = 23°(2"! — 1) = 2!° . 047 = 2°. 23. 89, on) = T = 2047-24-90 = # 4,192,256 = an 421,520 Therefore, m is not a perfect squace. Pt tye 6, Sum = "So's = GSH = ak-1(Qk 1), which i a perfoot mumber if both & and 2 — 1 are primes 8. o(p*) = EG 4 2p*, Therefore, p* is not a perfect: number. 19 10. proof Sle" 27 461-1) Ant]? _ yy mint Dl2n+1) 4 minty) = s[eee4] a 12 MEA DEN D pg MED = Wn%(n $1)? In(m +1)(2n +1) +3n(n+1)—n n(n + Ann +1) 220+ 1)+3]—n = n(n 1)(n? 4 2n—dn-243)—n n(n +1)@n? —2n 4 1)—n = nQn?—n) = n(n? 1) Yei-1? 12, proof: Since the even perfect number N = 2?-"(2" — 1} > 6, p is an odd prime, We have 2 = =I (mod 3), 2°-? = 1 (mod 3). So 2-1 = 3k +1 for some integer k. Then 2° = 6k +2, s0 N= (8k-4-1)(Gk-+1) = 18k? 49k +1 = 1 (mod 9). 14, Since nis a perfect number, Yo d=2ns0 Yo d=n, Then S (lfm) = 1 16, proof: Since 3o(n) = fn, it follows 3jn. Suppose n is even. ‘Then 6|n; so by Exercise 54 in Section 8.2, o(n)/n 2 o(6)/6; that is, o(n) > 2n. This contradicts the hypothesis, som must be odd. Then 52 and hence a(n) must be odd. Since n and a(n) are odd, by Exercise 52 in Section 8.2, n is a squre. ‘Pherefore, 33. Suppose 5|n. Then 3? 5|n. So, by Exercise 54 in Section 8.2, ofn)/n > of? -5)/9?-5 26/15 > 5/8 This also contradicts the given hypothesis. Consequently, 5|n and hence (5,7) ‘Therefore, (Sn) / o(5)o(n)/sn = 6-5/5-3 ‘Thus 5n is an odd perfect: number. 18, proof: Since m is odd, by the division algorithm, m = 4:1 or = £3 (mod 8), so m? = 1 (mod 8). Likewise, p = 41 or = +8 (mod 8), so p? = 1 (mod 8). Since e is odd, let e = 2k +1. Therefore, n= pm? = (g)-p-m® IF. p-1 = p (mod 8), as desired. 20, o(23) = 1+ 23 = 24 < 2-23, 60 23 is deficient. 120 22, 24. 28. 34 CHAPTER 8. MULTIPLICATIVE FUNCTIONS (24) =1424+3-4446484 12424 = 60 > 2-24, so 24 is abundant. 2p, = 210(2" abundant. = 1). By Exercise 4, o(2°M@1) = 4,421,520 > 4,192,256 = 24 Mjy, so 2"°Mia is Let q= 2 Land n= 2%. Then o(n) = ert! 1). St a (grt yar = 2r(ar = 1) = 21 oe Since Qn = Pg = PHP ~ 1) PH _ gett c 9PH _ OF = ain), ris abundant. o(672) = o(2° 3-7) = Ba} = 63-48 = 2016 = 3 - 672, s0 672 is perfect, 1184 = 9°37 and 1210 = 71 o(aiss) = FE. SEE = 63.98 = 2304 = 11844 1210 2-1 s%-1 18 (1210) = APSF ap = 8-6-198 = 2304 = 1184 + 1210 ‘Therefore, 1184 and 1210 are amicable numbers. 19 41 and 6368 = 2° - 199. M1 197-1 412-1 a 6232 = (6282) 15-20-42 = 12600 = 6232 + 6368 199? 2-1 199-1 ‘Therefore, 6232 and 6368 are amicable numbers. (6368) 63-200 = 12600 = 6368 + 6232 Since a,b, and ¢ are primes, o(2"ab) = (2 1)fa+1)(b-+ 1) = 24 ~1(3-29(3-2"-4) = 9-2-1099 9) eh) = 1 (e4 1) = QF = 199-2971) = 9. 2e-HQ"H — 1) Notiee that: Mad+M%e = Madre) = 28-2 — 1-2"? 1) 4-2-1) = 29-21 3-2" gat +1 9-21 1) = M921 9.21 49.921 = M(18-2-1 9.24) = 9-2rigntl 4) = a(2"ab) = o(2%e) ‘Therefore, 2"ab and 2"c are amicable numbers. 36, o(0(16)) = o(31) = 32 =2- 16, s0 16 is super-perfect. 38. ¥(45) 1.3-5-9-15 = 45? 40, v{48) = 1.2-3-4.6-8-12- 16-24 = 48" 42, " T]per ier. gene peg? -u (pq?) = pfbithatesny2 glemma@eny2 yer?) = (peg yornGHn a1 44, proof: Since (pq) = 1+ p+ q+ pq < 2pq, pq is deficient. (Assume that pq > 6.) 46. proof: Since 2p is deficient, «(2p) = 3(p-+ 1) < 4p, s0 p > 3. But p is a prime, so p > 5. 48, proof: Since n is perfect, a(n) = pn. Since (p,n} = 1, o(pn) = o{n}atp) = (p-+ 1pm, so pm is (p+ 1)-perfect. 50, o(n) = (2 1924, s0 o(0(n) ott aah 52. proof: Since mis 3+ (Soe Exercise 48.) erfect, o(n) = 3n. Since (3,n) = 1, o(3n) }a(n) = 4(8n), so 3n is 4-perfect. 5A, proof: By Exercise 42, v(ptq!) = (ptgh) HM OHDPA, go u(phy?) is @ power of pq? if 2(@-+ 1b +1). ‘To avoid th (+1641) 24 id only if jal case (p*q*)®, (a + 1){6-+1) must be greater than 2. Thus 56. proof: Product of the positive divisors = v(n) +n = n"(ov/2-1 Since n is perfect number, by Exercise 51, the harmonic mean h(n) of the positive factors of n is given by _nr(n) _ nr(n) io - r(n)/2 (0) = ee = ree Exercise 8.4 (p. 997) 2 -1= lee Mz? = lise ewe Mj? = 0.010101. ..t9e owe MG! = 0.001001001. se ewe Mz! = 0.000100010001. .. sxe 11x Mg? = 0.000010000100001... sno 4, Number of digits in Myo9ay = [19937 log 2] = 6, 002 6, Number of digits in Mzssa99 = [756839 og 2] = 227, 832 10. 12, 14 16. 18. 2, 24, 26. 28, 20. 36. CHAPTER 8. MULTIPLICATIVE FUNCTIONS 22281 = (Py. 9 = 4* 26 (mod 10) when k is even, Since =2 (mod 10), Moasi = 1 (mod 10), so Mypsy ends in 1 If k is even, 4* = 6 (mod 10). Therefore, 212049 — (92980242 = Misaoa9 = 1 (mod 10). Thus Miszose ends in 1. = 6-2 =2 (mod 10), so 127 28 = 24127. 19 = 24.12 = 88 (mod 100), noe 24* == 24 (mod 100) when k is odd, 2127 ‘Dherefore, Mrzro = 87 (mod 100), so it ends in 87. rc When & is even, 24 = 76 (mod 100). Therefore, 2129903 = (219)11050 92 = p4it0s0_g = 7g. = 8 (mod 100). ‘Thus Miiosa = 7 (mod 100), so it ends in 07. Since 2! = 8 {mod 1000), 29 (°)8 2 = 244. 2= 776-2 = 552 (mod 1000). Thus Mossi = 552 (mod 1000), so it ends in 551. (910886 989 = gH. 988 — y8Hl — (91008 957 = gt. 9H = tt 700838 (glonyTadr 90s = gr347, 998 — 922189 _ (g108)214 997 = g24. 097 (mod 1000) 2729 5 (Q108)7 918 = 7. 918 = 229 = (919)8.9 (mod 1000) = 2M. 512 = 824.512 = 888 (mod 1000) So Mzscaao ends in 887. Fromm Bxercisa 19, if > 2, 2°" = 6 (mod 10) and fy = 7 (mod 10). Consequently, 2°" and fj, have the same number of digits. Since log 22" = 2" log 2, the number of digits in the number is given by [2"log 2]. In fact, the formmula holds for all n > 0 By Bxercise 20, fig contains [2'log 2] = 157,827 digits By Exercise 20, f5) contains [2 log 2] = 646, 456, 994 digits. Mp = 11. Tyo with p ones. ‘The positive integers a that are <7 and relatively prime to it are 1, 2, 8,4, 5, and 6. Since (7) = 6, 4/6; 50 k = 1,2,3, or 6, Clearly, & ¢ 1, Since 28 £1 (mod 7), k # 2; since 3° #1 (mod 7), k #3. ‘Therefore, k = 6, ‘There axe (15) = 8 positive integers < 15 and relatively prime to it, namely, 1, 2, 4, 7, 8 IL, 13, and 14. Since k]8, & = 1,2,4, or & Again, & 4 1, Since 2 # 1 (mod 15), k # 2. But wen 144 = 1 (mod 15), so k= 4. Ms = 25—1=31, which is a prime, Tf Mis 13 _ | = 8191 is composite, it must have a prime factor of the form 26k +1, which is < | VATU, that is, < 90. Such primes are 53 and 79. But 53 8191 and 79 J8191, so 8191 isa prime, Every prime factor of Mos is of the form 46% +1. One such candidate is 47 and 47|Maa, 50 Mas is @ ‘composite ‘The prime factors of Msr are of the form 74K +1, When k = 3, 74K-+1 ‘Ms7 is a composite. 223 and 223|Mar. ‘Therefore, 123 40. 33,850,936 = 19 439 459479 4+ + 1258 41979 42, Let n =8. Then ¥-(2i—1)° = 18 439459 f+ +31" = [BIL + 1)/2)° = 130, 816 is not 9 perfect square, 44. log N= log(2?-1M,) = log 2°! +-1og Mp flog.¥] = [(p~1)log2+plog 2], since 2” andM, differ by 1 = [@p—1)loe 2] 46, When p= 2, n =6; 60 pln) = 6. (mod 3), s0 2°? = 34-41 for some integer g. Consequently, 1 (mod 9). Therefore, p(n) = 1 Now, let p be an od prime. Then 2°- n= (q+ 1)(6q-+ 1) = 189? +9q-+1 ‘Thus p(n) = 6 if n =6, and 1 otherwise Exercises 8.5 (p. 40) 2. Since 22/496, (496) = 0. 4. Since 11319 = 3-79-11, 72|11319, Therefore, (11319) = 0. 6. pp, 0 nip") =0. ((23 89)) = (22-88) = (24-11%) = (24 24011? — 11) = 8-110 ), alie(o(83))) = 0. 8. ete(Mu)) = vlo(2087) 24.5.1, Since Flo(o(My 10. Femlade(O/d) ~ ult)r(6) + wl2}r(8) + wl8)r(2) + m(6)e(1) SLAF (C1) 24 (-1)-24(-1)?-1 = 4-2-2421 12, 5 wldpr(13/d) = w(2)r(8) + w(13)r = 1-24 (-1)-1=2-1 it 1. Padot6/d) (Lo (6) + wl2)o(3) + n(3)o(2) + w(6)o(1) = L124 (1-4 (1) 34 (12-1 = 12-4-341=6 36. © wld)o(13/d) = p(1)o(18) + w(1)o(4) = 1-144 (1) 1 14-1 = 13 ait 18. 4028) = 8 iia = 20 a ew a = 28(1-1/240/4~ 1/7 + 1/14—0/28) = 12 124 CHAPTER 8, MULTIPLICATIVE FUNCTIONS 20. Notice that 1352 = 2°. 13%, (i352) = 152 Sp Ae a ssn a HQ) , #2), (a) | u(8) (52), (104) a vain [AO vos} ga 7 108 (169) , (338) (676) _ (1352) 169 ws + ere + 1352 = 1352(1 — 1/2 + 0/4 + 0/8 — 1/13 + 1/26 + 0/52 +.0/104 + 0/1694 0/338 + 0/676 +0/1352) = 624 22, (par) = (—1)8 = (-1)(-1)(-1) = HP) - HQ) - hr) 24. lpn. Pk) = (1) = wln)u(p2) ---lre) 26. Y wld)r(a) air EHO, © wldjo(d) oe = w(Q)r(2) + w(e)e@) + wladr(a) + aCede) + wpa) ea) waryr(ar) + wlrp)r (rp) + u(par)r (par) VeLe (1) 24 (H1) +24 (41) 24 (-1)?-4 + (<1)? 44 (-1)?-4 4 (1)? 8 = 1-2-2-244 ede 4-8=-1 = W)C) + (Deedee) + (Batons) (Paes) + (S)aCpapspa)roipspe) +--+ (Dulpr..-ps)r(pr x) 4 ({)2+ G)2? — ($2 + EG) (1-2), by the binomial theorem (-1)* = A(l)o(1) + n(P)o() + mladola) + wtpao(oa) V1 +(~1)- (+1) + (-1) (941) +(-1?- (+p t+a+m) = L-pot=q-1414p+a4pq=p9 = H(1)o(2) + [a(po(p) + w(g)o(a) + ulr}o(r)} + [A(Pa)o(pa)+ H(gr)a(ar) + e(rp)o(rp)] + u(par)o(par) 1-1-@+atr)+@+ E+ FG+Det) + + DRtY—PtDG+ Dr +1) La pratr) + (ptillg+I+(r+1)- G++ N+ + D+) 1-(ptq+r) +4 gtr +2—agr—g-r-1) + (g4I)(r +2) 1-(@pta4tr) ++I ~ar) tart gerd] gr ptp— par +1 —ar Pr 34, aan) = (a =-2 36, Since 990 = 2-9-5 11, A(990) = (—1)4#41 = = 38, Aa) = AL) + (3) + (0) = 1-4 (-1)) + (A211 41a ® 40. > Ald) = A) +.AQ) + AG) + AG) + AME) = 1-11-14 1=7 aie 42, proof: Let (m7) Phen Moma) = aloud — wld, wn, go 40) jy smultpticaive 44. proof. Ewe ag a2 4 proof (by induction on the number of prime factors k of n): When & = 1, n = pit and 3) #4 mR by Exercise 44. So the result is true when k = 1 Now, assume it is true for an arbitrary positive integer k =m: Ee -T1(-2) a mR ie pata) 2) yates Pret [U0 = 170) -(1—1/pmaah by the inductive hypothesis and Exercise 44 = T[a-1 Thus, by PMI, the statement is true for all positive integers n. 48, proof: Let (m,n) =1. Let d= cry, 2|m, yin, where (2, y) = 1. Then: erm) = SO wla)(onn/a) = > wley)(ommjry) din 2m = Lee) Duan i a = vlmye(n) ‘Therefore, ¢ is multiplicative. 126 CHAPTER 8 MULTIPLICATIVE FUNCTIONS Ee 50. proof: Let n= []p{'. Aasume it is a perfect square. Thon every e, is even. Since A(n) = (—1)*" and Ye; is even, Mn) = 1. 52, proof: By Theorem 8.18, = yO -TTa-1m x a]]a-1) en) Review Exercises (p. 408) 2, sum = (2020) = (25-101) = (2?)p(5)o(101) = 2-4 100 = 800 4 17296 = 24.99.47 (17296) = o(2*)o(23)o(24) = 31-24-48 = 35,712, is4i6 = 24-1151 o(i84l6) = o(2)o(1151) = 31-1162 = 35,712 ‘Thus 2(17296) = o(18416) ~ 35712 = 17206 + 18416, s0 17296 and 18416 are amicable numbers. 6. Every prime factor of Mar is of the form 94%.41. When k 5, 94k +1 = 2351 and 2351|May. 8. o(0(64)) = o(127) = 128 = 2-64, so 64 is superperfect. 10. So) =1+ Bote a =14@- S94 =14 0-1) 12, Let N = 2°-!q, where both p and of the proper factors of N = (WV Product of the positive factors of N= N72! N= N/2 2? — 1 are primes. By Exercise 50 in Section 8.3, the product NTNV2-1, Therefore, 14, proof: Let (m,n) = 1, Thex (ffa\{rmn) F(mn)/g{mn) = fim) f(n}/a{m}a(n) [l)/a¢m)] - LF()/a(n)] = (F/9)(m) - (F/9)(n) ‘Thus f/g is multiplicative, 16. proof: Let p and p+2 be twin primes. Then o(p) = p+1 4 p-+(p+2) and o(p+2) = p43 # p+ (p+2). Therefore, no twin primes are an amicable pair. 18. proof: fy = 2" +1, so o(fn) = 2" +2. Therefore, 2|fn. 20. proof: Notice that if f > 3, then 2°|k!. So, if k > 3, n(k!) = 0. Thus Yet) =n) + n(2) + n(9) 40= Tew) 1 (imod pf). Therefore, a?" 22, proof: Let m = []pf'. By Exercise 21, a0" 1 (mnod pf"), s0 by Corollary 4.4, a°%) = 1 (mod [[pf); that is, aF") = 1 (mod m), 24, proof: When p 3,5, and 7, n= 2!-1M, = 6, 28, 496, and 8128 respectively. ‘They end in 6 or 28, By the division algorithm let p = 10g +7, where r = 1, 3, 7, or 9. ‘Then 2! = (2!0)¢.9r-1 241. 27-1 (mod 100), case 1 Lot g be odd, Then 24° 4 (mod 100). Ifr = 1, then M, = 47 (mod 100), so N = 2?-1M, = 24.29.47 = 28 (mod 100); Ifr=3, then M, 16 (mod 100); Ifr—7, then My 71 = 66 (mod 100); Ifr=9, then M, +87 = 28 (mod 109). case 2 Let q be even, Then 24° = 76 (mod 100). If r= 1, then My = 51 (mod 100), so NV = 2°-?M,, 51 6 (mod 100); Ifr =3, then M, = 07 (mod 100), so N 07 = 28 (mod 100); Ifr =7, then M, = 27 (mod 100), so N 27 = 28 (mod 100); Ir =9, then M, = 11 (mod 100), so N +11 = 16 (mod 100). So, when p > 10, the last two digits of an even perfect mumber is 16, 28, 36, 56, or 76. Thus, if an even perfoct number does not end in 6, it ends in 28. 26, Let n = 2°-(2? — 1) be an even perfect number. Then, by Exercise 60 in Section 83, o(o(n)) = 27(29*1 — 1), If n is superperfect, then o(a(n)) = 2n; that is, 2°(2"* — 1) = 2-2°-1(2" — 1), Then 2°+! —1 = 9" — 1, which is impossible, ‘Thus there are no even perfect superperfect. ibers that are also Supplementary Exercises (p. «09) 2. The three smallest consecutive abundant: numbers are 171078830 = 2-5-13-23-29-1093, 171078831 = 39.7. 11-19-6171, and 171078892 = 2-31 - 344917. 4. proof: o(d)(a+1)(+1) = dlab+e), by equation (8.15) d(ab+a+b+ ab), by equation (8.14) d(2ab+a+6) 128, CHAPTER 8. MULTIPLICATIVE FUNCTIONS 6 a-(@-1) = am a = m4 oF SIMO 41) 15 b-(—1) = am b= 2m p28 aman e 1; ‘Therefore, By equation (8.14), © = atb+ab=(a4i)(b+1)-1 re" + yea" +) 1 = men ya 8, By Exercise 4, we have: od) _ _2eb+a+b eer 1p (+++) o @the+) Wat +1) —(@+b+2) (@rhe+h) 2ob+atb G@re+a o(d) d 10, Since (20 ~ 7)(25—7) = 81, 2a > 7; that is, a > 4; likewise, b> 4. If a,6> 8, then (2a—7)(26—7) > 9-9 = 81, 0 both a and 6 cannot be > 8. Ifa = 4, then 26-7 = 81; that is, 2b = 85, which is impossible. So a > 5. Similarly, b > 6. Notice that if'a = 5, then (Qa bj? = 81, so 2a—7 = 49, Then either @ = 4 or a = 8; both are impossible, Thus a,b > 5; and either a <8 or b <8, where af b. When a = 5, 3(20-7) = 81, 90 6 = 17. Thon = e+b+-ab = 5417 +85 = 107, Ifa = 6,5(25—7) = 81, which is impossible; if @ = 7, 7(25~7) = 81, which is also impossible, Similarly, a #8 ‘Thus @=5, b= 17, and ¢ = 107. 12 62) = 3fa(t)/? 30(3) = do(1)o(2) 2o(4) = -o(1)o(3) + 2fo(2)]? 50(5) = —6a(l)o(4) + Go(2)o(3) 14, proof (by B. Kothowski): Let NV be an even perfect number > 6. Then N = 2°-1(2” ~ 1), where p is prime > 3. Since p~3 is even, 32°® — 1, Since NV can be rewritten as 1 fg 2 eet o95-(8 at 42) (6 +1) and ty = J (8: 23t4-2) (6 Zt 4a) is tingle numer with dosnt flows N 8 +2, the 129 16, 12496 = (12496) (12496) 19.47 (12488) (12488) 967 (15472) = (25 —1)- 968 = 30008; (15472) 23-79 (14536) = 15-24. 80 = 28800; (14536) 1783 ‘o(14264) = 15-1784 = 26700; (14264) ‘Thus 5*(12496) = 12496, so 12496 is a sociable number. 18. proof: Let J(n) =D w(d)o(d). ‘Then: fa f0') = Dudeota) wo H()o(1) + alpho(p) +0 since u(p") = 0 for i> 2 1-(1+p)=-p f(x) = [[#@*), since f is multiplicative 20, proof: Since f and are multiplicative, so is F(n) =D w(d)s(@). Then: a Foe) = Sula) fla) = w(t) f(A) + alp)f(p) +0, since p(p') = 0 for i > 2 an = 1 fe) ke P(x) = [[F(%), since F is multiplicative t = [tse That is Eoeoo = Th - seo. 22, Using f = 9, & La@e(a) = T]a-e@o el ‘an . ‘ T[b-a+e) = [Ie P = oT] 130 24, Using f = 1 in Exercise 20, Yaa ae 26. With f = A in Exercise 20, Yaa) am 28. proof: Let n= 2!. Then o(n) = 241 — CHAPTER 8. MULTIPLICATIVE FUNCTIONS i T[c-») . Tt - 00) i TIb-co re 1 — 1, 60 n Is near-perfect. Chapter 9 Cryptology Exercises 9.1 (». 424) 2, 0011 11 19 07 6019.06 11 0819 19 04.17 18 08 18 18 14 19 0614 11 03 09 14 14 22 10 0922 09 14.12 22 22.07 20:21 11.21 16 17 29.09 17 14 06 DOOWK DWJOL WWHUV LVQRW JROG 4, 18.08 22 10 07 15 03 22 11 05 21 11 21 27 1007 19 23 O7 G7 16 17 08 22 10.07 21 05 11 07 16 05 07 21 12:00 19 07 04 12 00 19 08 02 18 08 18 19 07 4 16 20 04 O4 13 14 05 19 7 O4 18 02 08 04 13 02 04 18 MATHEMATICS IS THE QUEEN OF THE SCIENCES 6. 19 07 04 17 04 08 18 13 14 17 14 24.00 11 17 14 00 03 19 14 06 04 14 12 04 19 17 24 (04 18 15 02 19 19 03 24 25 02 25 09 11 22 02 25 11 14 04 25 17 15 25 23 15 04 02.00 ESPCP TDYZC ZILWG ZLDEZ RPZXP ECI 8, 19 18 14 25 23 24 13.07 09 05 18 03 01 12 09 22.09 13 (09 09 00 09 22.08 01 12 09 2209 3 05 24 12 22 09.05 24 24 19 14 26 23.24 13.07 (08 13 09 20 18 19 08 02 04 00 13 24 22 07 O4 17 04 08 18 00 19 07 17 4 00 19 19 14 09 20 18 19 08 o2 04 04 21 04 17 24 22 07 04 17 04 INJUSTICE ANYWHERE IS A THREAT TO JUSTICE EVERYWHERE, 10. 00 09 14 20 17 13 04 24 14 05 00 19 O7 14 20 18 00 13 03 12 08 11 04 18 12 20 18 19 O1 04 06 08 13 22 08 19 07 00 18 08 13 06 11 04 18 19 04 15 c 3P-+7 (mod 26) 07 08 28 15 06 20 19 01 23 22 OF 1202 23 15 09 OF 20 16 17 05 14 19 09 17 15 09 12 10 19 25 05 2021 05 12 02 07 09 05 20 25 14 19 09 12 19 00 HIXPG UTBXW HMCXP JHUQR FOTJR PJMKT ZFUVE MCHIF UZOTI MTA 131 M4 16. 18. 22, CHAPTER 9. CRYPTOLOGY 00-09 14 20 17 18.04 24 14 05 00 19 07 14 20 18 00 13 03 12.08 11 O4 18 12 20 18 19 O1 4 06 08 13 22 08 19 07 00 18 08 13.06 11 04 18 19 04 15 C= TP +10 (mod 26) 10 21 04 20 25 23 12 22 04 19 10 18 07 04 20 06 10 23 05 16 14 09 12 06 16 20 06 13 17 12.00 14 23.08, 14 13 07 10 06 14 23 00 09 12.06 13 1211 KVEUZ XMWET KNHEU GKXFQ OJMGQ UGNRM AOXIO NHKGO XAJMG NML. 28 04 23 10 19 08 21 18 19 15 08 25 15 17 16 23 15 15 17 16 16 21 08 21 18 19 15 08.95 15 17 16 29 15 15 (04 21 04 17 24 OL 14 03 24 18 O1 20 18 08 13 04 18 18 08 18 13 14 01 14 03 24 18 01 20 18 08 13 04 18 18 EVERYBODY'S BUSINESS 18 NOBODY'S BUSINESS C= 7P +13 (mod 26). Letting © = P (mod 26), this yields 6P not solvable, so no plaintext letter is lef fixed by the alfine cipher. 13 (mod 26). This congruence is C= 9P + 18 (mod 26). Letting C = P (mod 26), this yields: 8P = -18 (mod 26) 4P 4 (mod 13) P= 1 (mod 13) So P = 1,14. Correspondingly, the plaintext lotters left fixed are B and O. letter: AB CDEF GHIJKLMNOPQRSTUVWXYZ, Frequency: 300431060052020011140120120 So we try R= Fand K =T. Then: 17 = da+k (mod 26) 10 = 190+k (mod 26) Solving this linear system, we get a = 3 (mod 26) and & = 5 (mod 26). Thus C = 3P +5 (mod 26) 1000 17 17 07 O7 17 18 11 17 21 20 2 04 17 05 10 18 17 O7 07 03 OT 10.00 17 2417 04 11.17 24 1003 21 18 10 00 05 10 16 03 04 10 19.17 03 07 17 18 21 13 23.00 19 07 04 04 18 18 04 13 02 04 14 05 06 17 04 00 19 13 04 18 18 08 18 19 07 04 15 04 17 02 04 15 19 08 14 13 19 07 00 19 21 08 17 19 20 04 08 18 04 13 14 2006 07 ‘THE ESSENCE OF GREATNESS IS THE PERCEPTION THAT VIRTUE IS ENOUGH SENDMOREMONEY 18 04 13 03 12 14 17 04 12 14 13.04 24 26. 28, 133 Combining the congruences C = 3P+7 (mod 26) and C = 5P+8 (mod 26), we get C= 5(3P-+7)+8 = 15P +43 = 15P-+17 (mod 26). 01 25 04 10 15 19 12 25 15 19 04 25 13 BZEKP TMZPT EZN letter: GIPJUQDHXKLORACV Frequency: T174421241413011 So we try P= EB and G=T. Then: 4a +k (mod 26) 190+ & (mod 26) i, We get. a = 15 (mod 26) and k = 7 (mod 26) ‘06 08 15 09 20 26 03 07 16 D6 15 02 20 07 06 23 10 15 06 09 11 09 15 14 23 17 06 15 2011 15 23.1711 (09 00 15 17 06 02 21 11 06 23 09 20 19.07 04 14 13 12 24.00 11 19 04 17 13 00 19 08 21 4 19 14 02 14 O4 23 08 18 19 04 13 02 04 08 18 02 14 03 04 18 19 17 20 02 19 08 14 13, ‘THE ONLY ALTERNATIVE TO CO-EXISTENCE IS CO-DESTRUCTION CIPHER 02 08 15 07 04 17, SEN DMOREMONBEY 18 04 13 03 12 14 17 07 1214 13.04 24 20 12 02 10 16 08 19 12 01 21 17 21.00 UMCKQF TMBVRV A MATH 1200 19 07 TETSFUBZIETSFH 19.04 19 18 05 07 01 25 08 04 19 05 05 oF 07 04.00 11 19 07 08 18 22 04 00 11 19 07 HEALTH [8 WEALTH 134 CHAPTER 9. CRYPTOLOGY Exercises 9.2 (p. 430) 2 10. BENJOYTHEWEEKEND 04 13.09 14 24 19 07 07 22 04 D4 10 04 13 03 23 07 12 19 19 08 24 09 15 06 08 20 10 07 12 02.07 HM TT DY JP Gr UK HM CH NFXTBYZCSUAONZ 13.05 23 19 01 24 25 02 18 2000 14 18.25 13 14 15 00 08 13 18 13 14 06 00 08 13.18 NO PAINS NO GAINS THEPENISMIGHTIERTHANTHES WORDXX 19 07 04 15 04 13 08 18 12 08 06 07 19 08 04 17 19 07 00 13 19 07 04 18 22 14 17 03 23 28 08 06 17 24 15 01 04 12 04 21 10 OL 07 O7 00 17 14 06 20.01 04 11 13 10 17 10 21 09 00.16 IGR YPB EME VKB HHA ROG UBE LNK RKV JAQ IGRLDXLRRCIUDIHYVMDYFNBT 08 06 17 11 03 23 11 17 17 02 08 20 03 08 07 24 21 12 03 24 05 13.01 19 19 07 04 29 O7 04 04 11 08 18 02 14 12 04 05 21 11 11 02.08 17 02 11 04 ‘THE WHEEL IS COME FULL CIRCLE ‘Phe matrix congruence 32 6)[2 2 s7ully 1» | (od 26) waaidle 2 yields the linear system 3e42y+ 62 = x (mod 26) Sr+7ytllz = y (mod 26) IBeidy-+ 2 = 2 (mod 26); that is, 2x4 2y+ 62 = 0 (mod 26) Se+6y+1lz = 0 (mod 26) 132-+4y = 0 (mod 26) Solving this, we get 2 = y= Oorz=0=2,9= 13, ‘Thus two blocks are left fixed: AAA and ANA. 135 12, The eneiphering key for the produet eipher is 7 15)[2 1 3 a|\5 8 Now, pair the lotters in the give message: PRIDEANDPREJUDICEX 1817834019315 174920382423 since | 12 || 18 5 | (@nod 26), the block PR is enciphered as FP. The other blocks are o 7}{av]™ [as cnciphered similarly. The restlting enciphered message is FP UV SA XV FP WL WV IO TF. 7s}f2u now 9 1 uM. BA = = ‘mod 26). Its inverse is [2 '2][t i ]*[ so] en teimmie['S RAXUPVGMECISSNXF 17 00 23 20 15 21.02 12 04 02 08 18 18 13 23 05 11.00 01 14 17 03 00 24 22 04 04 10 04 13.03 28 LABOR DAY WEEKEND X [° 2] ms Exercises 9.3 (p. 433) 2, With m = 2, me have the sequence 2526, 2527, 2528, 2529, 2590, 2581, 2592, .... So the smallest possible prime modulus is 2531. 4. ALLISW LIX 0012 1308 1822 02 1123 ‘Using the congruence C = P?! (mod 3037}, these blocks yield: 0476 1634 0288 0447 1859 6. NO PA IN SN OG AI NS 1314 1500 0819 1813 1406 0008 2318 Using the congruence C = P'! (mod 2549), these blocks become: 0338 1859 2080 1512 2155 0865 1503 8, Notice that 31 - 1567 (mod 3037), s0 the deciphering formula is P = C!7 (mod 3037), Using this congruence, the given blocks 0790 0778 1509 0499 become 1120 1004 2200 1712; they yield the message LUKEWARM, 10, We have: 1194 1698 2202 1188 0008, Notice that 13. 897 = 1 (mod 2333), 60 the deciphoring formula is P = C*7 (mod 2333), Using this congruence, these blocks yield 1415 0417 0019 0814 1323; so the plaintext is OPERATION X. 136 CHAPTER 9. CRYPTOLOGY 12. e= 2! = 87 (mod 131) LA, Since 87-128 1 (mod 181), the common deciphering key Exercises 9.4 (p. 142) 2. OP EN DOOR ais 0119 0814 1417 Using the congruence C = P! (nod 2867), these blocks become 1235 1294 2815 1634. 4, OP EN DO OR 141s 0419 0314 1417 Using the congruence C= P'” (mod 2867), these blocks become 1730 2392 1240 2732, 6. 1959 1384 1174 2050 Here d = 251. Using the congruence P = C54 (mod 2867), these blocks become 1800 1303 2208 0207. ‘The corresponding plaintext is SANDWICH. 8, Here d = 2273, Using the congruence P = C*" (mod 2867), the given blocks becone 1800 1303 2208 0207; 90 the plaintext is SANDWICH. 10. (p~ 9)? = (p +9)? — Apa = (p+ 9)? —4n. Therefore, p—¢ = Vip Fay — An, since p > 9. 12. By Exercises 9 and 10, 3869 ~ 374441 = 126 V1268 = 43869 = 20 [+9 +@-/2=73 [p+9)-@-9)/2=53 = n 14. gn) = y(2747) = (41-67) = p(41)-¥(67) = 40-66 = 2640. Since 13-243 17-1553 (mod 2640), the multiplicative inverses of ey = 13 and 2 = 17 modulo 2640 are dy = 2437 and d = 1553 modulo 2640 respectively. plaintat MA RK ET 1200 1710 o419 = Di(P) = P% (mod n): 2596 1797 1898. Now, apply the enciphering algorithm E to it: E,(A) = A% (mod n}. The resulting signed message is 0972 0954 2715. Applying the deciphering algorithm D, to P, 16. We have e S= Bx(A) P 13, dy = 2437, ep = 17, and dy = 1553, Let A = Dy(P) = P® (mod 2747) and A® (mod 2747), Anne's signed message, Then Da(S) As (mod 2747) and then Ae4 (mod 2747). Using this scheme, the plaintext sent by Anne is SECRET. 137 Exercises 9.5 (». 448) 2. Since 8 < 6 < 12 < 24-< 48, the sequence is superincressing 4, Bay} Org + 122g + 24g + 4825 = 57 Since 48 < 87, x5 = 1. Then 32 +6ry + 1219 + 24r4 = 9. Cleacly, 2 0 2 = 1 and hence 272 = 1. Thus the solution is (1,1,0,0,1) tq. Then 32 +622 =9, 6, xy + Sy + Ory + 124 + Bag + 4829 + 6x7 = 65 Since 96 > 65, 27 = 0. Then 2x + Sry + Gz +124 +2525 + 48x5 = 65. Since 48 < 65, 25 = 1. This implies 221 + 3p +6r3 + 12x +2575 = 17, Continuing like this, we get the solution (1,1,0,1,0,1.0). 8, Since 2-25 = 50 (mod 63), 3-25 = 12 (mod 63), 7-25 = 49 (mod 63), 19-25 20-25 = 52 (mod 63), the eneiphring sequence is 50, 12, 9, 10, 32 10 (mod 63), and 10. The eneiphering sequence is 3-23 (mod 58), 6-28 (mod 63), 12-28 (mod 53), 24-28 (mod 53), that is, 16, 32, 1, 22. This yields the ciphertext message 11 54 11 11 32 54 00 33 12, The enciphering sequence is 2+ 25 (mod 63), 3-25 (mod 63), 7-25 (mod 63), 13-25 (mod 63), 29-25 (mod 63), that is, 50, 12, 49, 10, 32, This yields the ciphertext message 49 99 82 49 22 00, 14. We have m = 65 and w= 12, Then w~ 47x, = 104, Then: 38 (mod 65), Consider the equation 7 + 312 + 50z3 + 38(72) +31xq +5023 447e4) = 38-104 62, + 8x2 + 182543124 = 52 (mod 65) Solving the LDE, we get 1011 Similarly, the LDEs 72; + 31x + S03 +47z4 = N, where N = 47, 47, 81, 104, 47, 104, 54, 57, and 31 yield the solutions 0001, 0001, 0110, 1011, 0002, 1011, 1001, 1010, and 0100, respectively. The corresponding plaintext message is WELL DONE. 16. We have w = 23 and w-1 = 30 (mod 53). The LDEs 1621 +32x2 + ley + 2204 =, where N =33, 33, 38, 48, 33, 32, 49, 16, and 33, yield the solutions 0011, 0011, 1001, 1100, 0011, 0100, 1011, 1000, ‘and 0011, respectively. Correspondingly, the plaintext message is GOOD JOB. Review Exercises (p. 450) 2, 19 07 04 07 08 06 07 04 18 19 17 04 18 20 11 19 14 05 04 03 20.02.00 19.08 20 13.08 18 19 14 11 04 17 00 13 02 04 23 23 Using the congruence C' = 5P + 11 (mod 26), these blocks become 02 20 05 20 25 15 20 05 23 02 18 05 23 O7 14 02 08 10 05 00 O7 21 11 02 25 07 24 25 23.02 03 14 05 18 11 24 21 05 22 22 CUFUZ PUFXG SFXHO CDKFA HVLCZ DYZXC DOFSL YVFWW 138 10 12. 1, CHAPTER 9. CRYPTOLOGY JPNWHHIJNMNISSS 09 15 13 22 07 07 08 09 13 12 13 08 18 18 18 C= TP +13 (mod 26), so P = 15C +13 (mod 26). This yields the blocks 18 04 00 05 14 14 03 18 00 11 00 03 28 23 23; so the plaintext: message is SEAFOOD SALAD XXX. JAMWMKIJWJWTBBBB 09 00 12 22 12 10 09 22 09 22 19 01 01 01 O Using a frequency count, we let W = E and M = S. So 22 = 4a +k and 12 = 180+ modulo 26. Solving this linear system modulo 26, we get «= 3 and k = 16 modulo 26. So C = 3P +16 (mod 26) and P= 9C 414 (mod 26), Using this decrypting formuls, the blocks 09 00 12 22 12 10 03 22 09 22 19 01 01 O1 OL become 17 14 18 04 18 00 17 04 17 04 03 23 23 23 23; so the plaintext message is ROSES ARE RED XXXX. SECRET 18 04 02 170419 EXITONLYXXXX 04 23.08 19 14 18 11 24 23 23 23 23 ‘This yields the blocks 22 01 10 10 18 06 03 02 25 14 01 16; that is, WBKKSG DCZOBQ. VIOLETSAREBLUEX 21 08 14 11 04 19 18:00 17 04 01 11 20 04 23, Using the enciphering matrix, these blocks become 18 21 13 05 23 03 17 12 12 22 20 28 17 24 12, respectively; so the encrypted message is SVN FXD RMM WUX RYM. ‘The inverse of the enciphering matrix A matrix is, 10 11 24 8 9 28 15 7 28 modulo 26. We have: DATSKODOBUQR 03.00 19 18 10 14 03 14 01 20 16 17 Using the inverse matrix, these blocks yield 18 19 14 02 10 12 00 17 10 04 19 23; the corresponding plaintext message is STOCK MARKET. [23] [5]=[5] woes ‘The congruence 16, 18 20. 24 139 yields the linear system e+ Sy = 0 (mod 26) (91) Br+12y = 0 (mod 26) (9.2) ‘Then 8y = 0 (inod 26) 4y = 0 (mod 13) v= 0,13 (mod 26) When y = 0 (mod 26), congruence (9.1) yields: 2x = 0 (mod 26) 0 (mod 13) = = 0,13 (mod 26) 2 When y = 13 (mod 26), congruence (9.1) yields 2r = —65 = 13 (mod 26). Since (2,26) 413, this congruence is not solvable. ‘Thus there are two blocks left fixed, corresponding to 2 ; and 2 = 13, y = 0; they are AA and NA, We have p = 2729, ¢= 37 MARATHON 12.00 17 00 19 07 14.13 Using the congruence C = P¥ (mod 2729), these blocks yield 0048 0549 2543 0053. We have p = 2729, = 29, d= 1317, and P = C1? (mod 2729). Then the given blocks become 1200 1907 0818 0520 1328; the corresponding message is MATH IS PUN X. TOPSECRETX 19 14 15 18 04 02.17 04 19 28 75 (mod 3599), these blocks yield 2224 3277 0920 2340 1119. Using tha scheme @ We have p = 3599, ¢ = 23, and hence d = 1967. The decryption formula is P = C'*" (mod 3599). So the given blocks yield 2204 1111 0314 1304; correspondingly, the plaintext message is WELL DONE. Ann: (17,2537), Bob: (13,2587), and dy = 937. FINE 05.08 13 04 0950897 = 376 (mod 2537) 130499” = 0999 (anod 2537) ‘Thus the ciphertext message is 2376 0999, 140 26, 28. 30, 32, 34 CHAPTER 9. CRYPTOLOGY Ann: (17,2537), Bob: (13,2537), and da = 1433 0386!" = 0214 (mod 2857) 16119 = 2998 (mod 2357) ‘Tious we get the blocks 0214 2223; so the plaintext message is COW X. Since 2<3,2+3<6,2+3+6< 12, and 2+3+6 +12 <2, the sequence is superinereasing. (1,0.10,1) We have m = 65, w = 17, n= 4, and (65,17) 2T= 34 (mod 65) 3-17 =51 (mod 65) 6-17 = 37 (mod 6s) 12-17 = T O P RANK (mod 65) 10011 01120 01111 10001 00000 01101 01010 ‘These blocks yield the ciphertext message 43 80 43 131 09 00 46 60 60. m = 43, w 12, n = 4, (12,43) = 1, w~! = 18, and the enciphering sequence is 36 5 22 13. The products 18-27, 18-49, 18-22, 18-76, 18-35, 18-22, 18-18, 18-54, 18-13, and 18-35 yield the blocks (0110 1001 0910 1111 0011 0010 0101 1101 0001 C011; the corresponding message is NEXT EXIT. Supplementary Exercises (p. 451) 4 8 By Exercise 1, C = acP + be +d (mod 26), Therefore, P = a~!e“'(C — be — d) (mod 26). proof: Let © = AP (mod 26) and C = BP (mod 26), where (/Al,26) = 1 = (JB|,26). Then C = (BA)P (mod 26) is the product enciphering formula. Sine BA] = |B|- |Al, it follows that ((BAl,26) = 1. Thus the product is also a Hill cipher. Notice that 0 < P 17, But 9" =1 (mod 17), so m = 17. ord, 5 < plmn) 7. Since 5° = 1 (mod 7), it follows that m = 7. Let a and m be positive integers such that (a,m) = 1 and ord,, a= m~1. Then m is a prime. Let m= 8, Then (mm) = (8) = 4. Choose d= 4, Since (2,8) = 1, a = 1, 3, or 7; but ords ods = ondig5 = onde? = 244 Since (2,8) = 1, a is odd. Since a is odd, a? = 1 (mod 8); 60 ords a < 2. 1 (mod 41), 6 = +1 (mod 41); but =1 = 40 (mod 41). ‘Thus the desired 62010 = (619)69 20 = 140. 62 = 629 (mod dl). Since 6! 6 2 1 (mod 41), so 6% = ~1 (mod 41). Therefore, 622° remainder is 40. 141 142 30, 32, 34, 36. 38. 40, 42, 44 46. 48. 52, 54, 56. CHAPTER 10, PRIMITIVE ROOTS AND INDICES Since 3° = 1 (mod 13) and 5¢ = 1 (mod 13), (8-5)! = (38)*. (54) = 1 (mod 13). Thus ords 15 = 1, 2, 3,4, 6, or 12. But none of the integers 15, 15%, 15%, 154, 158 and 15! is congruent to 1 modulo 13. ‘Therefore, ordys 15 = 12. (16) = o(2t) =8 (100) = p(2? 52) = 2-20 = 40 2,6,7,8 3,5, 6,7, 10, 11, 12, 14 ‘There are (8) = 4 positive integers < 8 and relatively prime to 8: 1, 3, 5, and 7, Since 1? = 3? = 5? = 7? = 1 (mod 8), ordg 1 = ords3 = ordg5 = ords7 =2 4 4. Therefore, there are no primitive roots module 8. Every prime factor of 241 — 1 is of the form 22k +1, where k > 1. When k = 2gf2! 1 , 22k +1 = 28 and proof: If p has a primitive root, then by Corollary 10.4, there are y(p — 1) primitive roots modulo p. Since p > 5, y(p—1) is even. = ord a. ‘Thus ordy, (a~ proof: By Exercise 45, ordy, (a7? ‘e(m) if and only if ordm (a) = (rn). proof (rr br P etre +7410 (mod p). =1=0 (mod p). But r £1 (mod p), 30 16! 4 982 4 proof: a¥(™) = 1 (mod p), so a*(/? = 1 (mod p). Since ordys a = lon), a7? 1 ( ‘Thus a? %—1 (mod p). od 7). proof: Let ord (ab) =e, Since (ab) = (ah\*(B* = 1 (mod m), elk On the other hand, since (ab)® = 1 (mod m), (ab)** = 1 (mod m). This implies BM = 1 (mod m), so ‘jhe. But (k, A) = 1, so kle. Similarly, hie. Since kle, hje, and (h, &) = 1, Akle, Thus elhk and Ake, so € = hk, That is, orm (ab) = (ordm a)(ord 8). proof: Let q be a prime factor of 2” — 1, (In fact, q is odd.) By Exercise 63, q|(2—1), or q = 2kp-+1 for some positive integer k, Since g J, ¢ = 2kp+1. proof: Let p be an odd prime factor of n? 41, ‘Then pln? +1, so n? = 1 (mod p) aud hence nt =1 (mod p). This implies 4[p ~ 1, so p~1 = 4k for some positive integer k. Thus p = 4k 1, a8 desired proof (by contradiction): Assume that there are only finitely many primes p1,p2,-...P+ of the form 4k-+ 1. Consider N= (2pipa...pp)? 4 1. Clearly, NV is of the form 4k-+1. If V itself is a prime, we have a contradiction So assume that N is composite, Let p be an odd prime factor of NV. By Exercise 56, p must be of the form 4k +1. If p = p, for some i, then N =1 (mod p); since p|N, N = 0 (mod p). ‘Thus we have a contradiction. Therefore, p # pi for any i. This is again a contradiction. M43 ‘Thus there are infinitely many primes of the form 4& +1. Exercises 10.2 (p. 460) 2 10, 120 «18 + 215 = 1 (mod 257). ‘The only prime factor ¢ of 100. (310)? 98 = 18. 196? 136 = 157 = 1 (mod 257) 3256 = (3100)? 330. 35 = G77. 18.215 256 = 28 is 2, When q = 2, 9057-172 91% = ‘Therefore, by Lucas’ Theorem, 257 is a prime. poy 8%. 380, (910)2.9 = 142-375 .(~207)2.9 = 1 (mod 823). ‘The prime factors g of 822 = 2. are 2, 3, anid 137. 2, 3880/2 When #00 = 3829, 980 git When q = 3, 3129-1) When g = 137, 3(62°-D/137 — 3f 108) - 380-202 P74 «3160, 980. (310)8. gt = 375. 380. (—207)*- 81 1 (mod 823): }48 (mod 823); 729 (mod 823). Thus, im all three cases, 3(%-2/s 4 1 (mod 823}, s0 by Lucas’ Theorem, 823 is a prime, O1Y/2 a 720 — 7100, (7102 2.3.5 ore 3 and 5, 81-119? = 181-237 1 (mod 241). The odd prime factors ¢ of = 121-113" = 121-30 = 15 ¢ 1 (mod 241); 134.81 = 16-81 = 91¥ 1 (mod 241) When g=5, 788 = (79)t. 78 = ‘Thus, in both eases, 71-00" # 1 (mod 241), so by Lucas’ Theorem, 241 is a prime. 0rer (2172) «5214. 728 = (—172) 284.728 = —1 (mod 797). The only odd prime factor g of 796 = 2-199 is 199. When q = 199, 2(°97-0/199 = 94 = 16 # 1 (mod 797), ‘Therefore, by Lucas’ Theorem, 797 is a prime. 8 920, (9208 9 8) fo = 2" 41 =17. Choose x = 3. Then 386 = 31°.3 Therefore, fz = 17 is a prime. b) fs = 2% +1 = 257, Choose x = 3. Then 312% = 3199. 320. 98 ‘Therefore, fy = 257 is prime. 8-(-2) = 1 (mod 17) and 3° = -1 (mod 17). W193 196 = 1 (mod 257). Exercises 10.3 (». 473) 2 4 6. 8 3,5,6 4 48 3,6,7 144 CHAPTER 10. PRIMITIVE ROOTS AND INDICES 10. 2-1;1 2 -1=(2-(e+1)s 1,12 P-1a(e- Ye? +24151,3,9 xf 1=(e- ete? +1) 1,5, 8 2 a 1a (e~ let (ot $2? $1) = (@—1(e? ++ 1)? +1351, 3, 4,9, 10, 12 : (eA + 1)(2* + 24 4 1); 1 through 12 12. p(4) =2, namely, 5 and 8. 14, p(11) = 10, namely, 2, 8, 4, 6, 8, 9, 12, 13, 16, and 18, 16. a* is also a primitive soot modulo p. 18, al?-1/2 = ~1 (mod p), so the least residue is = p—1 (mod 7). 20, 5° 4544.04 1 = (59 — 1)/(5—1) = (69 -1)/4 (58 —1) 2-050 (mod 7). 22, 3 and 9 are primitive roots modulo 7, but 3+ = 1 (inod 7) is not. 24, ordy (3) = ordy 4 = 8; ordr (~5) = ord 26. ord, (—2} @-P2 28, Yes, since ordys (-2) = ors 11 = 12 = (13). 30. Yes, since orig (2) = orgs 27 = 28 = (20). is a primitive root modulo 7. But ~3 = 4 is not a primitive root modulo 7, since ordy 4 = 8 # (13). (See Exercise 51.) 34. (1) = 1 = 92), (3) = ¥(4) = (6) = 2, and (12) = 4 36. Yl) = (2), ¥(3) = 2 = (8), (4) = 2 = (4), YG) = 2 = ¢(6), and ¥(12) = 4 = (12). 38. D(a) = V1) + 92) + YG) + VR) + YI) =141424448= 16 = 17-1. ae =1,2,3, 4,6, or 12. The only least residue of order 1 modulo 13 is 1; the only residue of arder 2 is 12; thore are two residues of order 3: 3 and 9; there are two residues of order 4: 5 and 8; there are two residues of order 6: 4 and 10; and there are four residues of order 12; 2, 6, 7, and 11 42. There are y(12) = 4 incongruent primitive roots modulo 13, given by 2* (med 13), where (Ky 12) = 1. ‘They are 2!, 2, 2%, and 2 modulo 13, that is, 2, 6, 7, and 11 44, There are ip(22) = 10 incongruent primitive roots modulo 23, given by 5* (mod 23), where (k, 22) = 1 They are 51, 5%, 57, 5°, 549, 5°, 517, 519, and 52! modulo 23, that is, 8, 7, 10, 11, 14, 15, 17, 19, 20, and 21 145, 46. proof: Let f(z) = Saga’. Since f(a) = 0 (mod m), Sow © (mod m). Since f= « (mod m)}, this implies 35 aif = (mod m); that is, (8) = 0 (mod m), 48. proof: The statement is trivially true when p = 2. So assume that p > 2. If a' is a primitive root modulo p, then so is a~* = a?! (mod p). Since they are incongruent, the ¢p(p — 1) primitive roots can be paired into y(p — 1)/2 pairs such that the product of the residues in e: A {mod 7), Therefore, the produet of all incongruent primitive residues is congruent to ? modulo p. pair is congruent to 50, proof: Since a is a primitive root modulo p, al?-/? = 1 (mod p). Suppose al?~3)/* satisfies the congruence 2? +1 =0 (mod p). Then [a!?-3)/4 +1 = 0 (mod p); thet is, «1-8/2 +1 =0 (mod p). So al?-9/? = —1 (mod p) which is a contradiction 52. proof: Since a is a primitive root modulo p, a? where k > 1 1 (mod p). Suppose p = 1 (mod 4). Let p= 4k-+1, Suppose ord (~ ind 1 (mod y{rn)) ‘e(rm) (mod ip(m)) ind, = gm) ~ indy a (mod ¢(m)) Sinco 1 < indy a, ind, 6 < y(m), it follows that ind, b = om) —inds a. ‘The converse follows by reversing the steps. 9 38. proof: Suppose the congruence 2? = —1 (mod p) is golvable, Then 2 = 1 (mod p). Since 2-1 = 1 (mod p), by Buler’s theorem, 4[p — 1; 50 p is of the form 4k + 1 Conversely, let p= 4ke+ 1, It has a primitive root a: = of =1 (ined p) =1 (mod p) ‘Thus a is a solution of the congruence 2? = —I (mod 7). 40. proof: Suppose the congruence 2? = —1 (mod p) is solvable, (Although we could use the same argument as in Exercise 38, we shall ermploy ind here.) Let a be a primitive root of p. ‘Then: indg(2*) = ind, (—1) (mod p—1) 4indgt = (p~1)/2 (mod p—1) Sindg? = p—1=0 (mod p—1) lot = 0 (mod (p~1)/8) Since indy 2 is an integer, (p — 1)/8 is an integer fk. Thus p is of the form 8k-} 1 Conversely, let p= 8k +1. Let a be a primitive root modulo p. Then a?-! = a (a8)* = o** = 1 (mod p). ‘Thus the congruence 2¢ = —1 (mod p) is solvable, = 1 (mod p), s0 x 42, proof: Let a be a primitive root of m. Suppose the congruence * = @ (mod m) is solvable. Then: Inds (2*) = indaa (mod gm) k-indyx = indya (mod g(m)) This linear congruence in ind is solvable if and only if d = (k,p(m)}|inda a. Therefore, (ind, a)/d is an integer. Then: ‘e(m) -(inda.a)/d = 0 (mod y(mn)) [o(m) fd} -inda a ind, a%™/4 = inda 1 (mod y(m)) avtmidd 1 (mod yfm)) indy 1 (mod y(m)) ‘Conversely, suppose a4 = 1 (mod m)). Then: indy 0%" = nda 1 (mod g(mm)) glm)/d-indga = 0 (mod o(m)) ‘e(m) «(indya)/d 9 (mod ¢(m)) This implies, (ind, a)/d is an integer, so the linear congruence kinda # = inda.a (mod y(m)) is solvable since d = (4,.9(m)). ‘That is, inda (2) = indy a (mod y(m)) is solvable. In other words, the congruence 2* = a (mod p) is solvable, 150 CHAPTER 10. PRIMITIVE ROOTS AND INDICES Review Exercises (p. 401) 10. 12, 14 16 18, 26. 28, 30. 32, 34, (8°) (8,6) = 8/2=4 onda (711) = ondy97 ores 17 = s#(e(98)) = g(18) = 6 #(4(89614)) = o(e(2-75)) = (6-74) = 4116 2116 = 4-23, so 2116 has no primitive roots, 167042 = 174, so 167042 has a primitive root. «a isa primitive root modulo 81 if and only if (i, ¢(81)) = (f,54) = 1. So the remaining primitive roots are given by 28, 27, 244, 219, 217, 18, 999, 928, 299, y91, 985,297, 281, 949, 247, 949, and 269, modulo 81, that is, 5, 1, 14, 20, 23, 29, 92, 88, 41, 47, 50,56, 59, 65, 68, 74, and 7. is a primitive root modulo 2p, by Theorom 10.12. 2% (mod 297), but. 22829 = 1 (mod 20%), So 2 is a primitive root modulo 29?, 28 a primitive root modulo 5, s0 2-+5 = 7 is primitive root modulo 10 = 2-5. The plo(10)) = 2 incongruent primitive roots modulo 10 are given by 7 and 7° modulo 10, that is, 3 and 7. There are o(o(54)) = y(p(2 3°) = 6 primitive roots modulo 54, They are 5, 5°, 57, 5", 58, and 5!7 modulo 64, that is, 5, 11, 28, 29, 41, and 47. 3 is a primitive rot modulo 7, 20 3 is also a primitive root modulo 98 = 2-72, The ~(y(98)) incongruent primitive roots modulo 98 are given by 3° modulo 98, where (i, o(98)) = (i,42) = 1. ‘Thus they are 34, 3°, 34, 3°, 317, 319, 32, 975, 37°, 391, 997, and 3 modulo 98, that is, 3, 5, 17, 33, 45, 47, 99, 61, 73, 75, 87, and 89, 2 is a primitive root modulo 125 = 5°. The (v{125)) = 40 incongruent primitive roots modulo 125 are given by 2 modulo 125, where (i, (125)) = (i, 100) = 1. Thus they are 21, 2%, 27, 29, 241, 218, 217, 919, 921, 228, 927, 920 p31, 983, y81_ 930, ptt 94d, 947, 940 961, 980,957, 959, 961, 69, 967, 960) 971 275, 277, 279, 281, 284, 267, 28%, 291, 299, 297, 2° mnodulo 125, that is, 2, 3, 8 12, 13, 17, 22, 23, 27, 28, 33, 37, 38, 42, 47, 48, 52, 53, 58, 62, 63, 67, 72, 73, 77, 78, 83, 87, 88, 92, 97, 98, 102, 103, 108, 112, 113, 127, 122, and 123, 7821 (mod 15). So 37207 a 72002 = (749800. 7 = 1.4 = 4 (mod 15). Since a* = 1 (mod p), (-a)* = ~ 6.5, namely, 7,10, and 22; so v = 3, ‘There are four positive least residues > 9.5: 11, 14, 16, and 18. Sov = 4 . Phe positive least residues of 1-4, 2-4, 3-4, 4-4, 5-4, 6-4, 7-4, and 8-4 modulo 17 are 4, 8, 12, 16, 3,7, 11, and 15, respectively. Four of them are > 8.5, 90 v= 4. Thus (4/17) = (~1)*= 1 ‘The positive least residues of 1-13, 2-13, 3-13, 4-13, 5-13, 6-13, 7-13, 8-13, 9-13, 10-13, 11-13, 12-13, 13-18, 14-13, and 15-13 modulo 31 are 13, 26, 8, 21, 3, 16, 29, 11, 24, 6, 19, 1, 14, 27, and 9, respectively. Seven of them are > 15.5, so v= 7. ‘Thus (13/31) = (~1)" = Since 28 = —1 (mod 8), (2/23) = 1, by Theorem 11.6. .. Since 43 = 3 (mod 8), (2/43) = ~1, by Theorem 11.6. (110/59) = (-8/59) = (-1/59)(8/57) = (-1)(2/59)8 = . Since 17 = 6 (mod 12), (3/12) = = Since 31 = —5 (mod 12), (3/31) = ~1. Therefore, by Corollary 11.2, (~3/31) = (-1/31)(3/31) = Cuey = 3 (mod 4) and q= 2-234 1=47 ate primes. Therefore, 47|Mzs. ‘The quadratic residues modulo 17 are given by 3, 34, 36, 38, 31°, 912, 314, 316 modulo 17, that is, 1, 24,8, 9, 18, 15, and 16, Since 2029 = 5 (mod 8), by Theorem 11.6, (2/2020) = =I (mod 2029); that is, 2029|(2!! + 1), So, by Buler’s criterion, 244 = proof: Let r= 41. Since én = implies (n/p) = (-1/p)(r/»). If p= 1 (mod 4), then (n/p) = 1-(I/p) = 1. Hp ~1 (mod 4), then (n/p) = (-1)(-1) = 1, Thus, in both cases, (n/p) = 1; so n is a quadratic residue of p. (ood p), (Sn/z) = (t/a); that is (4/p)(nfp) = (rfp). This Proof: Since p ~ a = —a (mod p), ((p—a)/p) = (~a/p} = (~1/p)(a/p) = (~1)-1 = -1, p—aisa ‘quadratic nonresidue of p. Proof: Since (—2a/p) = (—1/p)(2/p)(a/p) = (—1)(—1) 1 = 1, ~2a and hence p ~ 2a is a quadratic residue of p. 158 50. 5 56. 58. 62. CHAPTER 11. QUADRATIC CONGRUENCES proof: (=2/p) = (-1/p)(2/p). Using Corollary 11.2 and Theorem 11.6, Leta. if p= 1 (mod 8) _} Cy-12-1 itp s-t (mod 8) (Are) 2/2) = (-1)(-1)=1 ifp=3 (mod 8) re ifp = ~3 (mod 8) Thus 1 or 3 (mod 8) eeenpayeer: proof: Since p = 3 (mod 4), q = 7 (mod 8); so (2/4) = 1. Then 2-9/2 = 1 (mod 4); that is, 2 (mod 4). ‘Thus gif, proof {afa+1)/p) = (a(a+ab)/p) = (a?(1 + B)/) = (a*/p)((b + 1)/P) 1-((0+1)/p) = (6 +1)/p) proof: Let a be a primitive root modulo f,. Then a/*~ = a2” = 1 (mod fx); 90 (a? —-1)(a + 1) $0 (mod f,). But a?*”* #1 (mod fn), 80.0%"? = —1 (mod fa). Thus af“? = ~1 (mod fn), 80 @ is a quadratic nonresidue of p. Proof: Let a be a primitive root modulo p. Then a, a2, ..., a?! are a permutation of the psitive a (mod p), where 1 < k 1. Therefore, by Corollary 11.7, (fra/ fn} = (fn/ fm). proof: Since Ja is a prime, by Pepin’s test, 34°? = —1 (mod f,), where n > 1, So 3-1 = 1 (mod fu). Let ordy, 3 = ¢, Then jn 1; that is, €22", so e = 2* for some k, where k < 2". ‘Suppose k < 2". Then (3?*)#" (mod f,); that is, 9°" = 1 (mod f,), which is a contradic- tion, ‘Therefore, k = 2" and ordy, 3= 22" = fy —1. Thus 8 is a primitive root of fa, where m > 1. proof: Since (a/pq) = (a/p)(a/a), (a/pq) = 1 if (a/p) = 1 = (a/q). That is, if a is @ quadratic residue of both p and g, then a is also a quadratic residue of pq. In other words, if the congruences 2? =a (mod p) and 2? = a (mod 9) are solvable, then 2? = a (mod pg) is also solvable. proof (by contradiction): Assume that there are only finitely many such primes, p),....Ph. Consider N= 5(py..-Pn)? 1. Since N is of the form 5k ~ 1, it has a prime factor. Sinoe not all prime fectors of N can of the formn Sk + 1, it must have an odd prime factor p of the form 5k—1. If k =2j +1 is odd, then p = 5k ~ 1 = 6(2) + 1) 1 = 10) +4 will not be a prime. So k must be even; thus p is of the form 10k — 1. If p= py for some i, then p[NV and p|S(ps..-pa)®, 0 pil. Since this is impossible, p # p; for every 4. ‘This contradicts the hypothesis that py,...,?q are the only primes of the form 10k — 1 proof: Let a = V5. By Binet’s formula, Mera = (+are—(1- ayy a Eee EPS )eor ee ee von = (Seas eee esr) 140404... 4045-2 (mod p) 14+5°-10?? (mod p) = 1+ (5/p), by Buler's criterion 162 CHAPTER 11. QUADRATIC CONGRUENCES 27-1 =1 (mod p) by Buler’s theorem, this implies 2Fp41 = 1-+ (5/p) (mod p). But ‘That is, if p= £1 (mod 5) 1 tno { 4 Weaintea Exercises 11.4 (p. 535) | 2, (2/21) = (2/8)(2/7) =(-1)-1=-1 4. (12/25) = (12/5)? = (2/5)? =1 (52/129) = (62/3- 43) = (62/3)(52/48) = (1/3)(9/49) = 1. (3/43)? = 1-1 =1 (68/665) = (—68/5-7- 19) = (~68/5)(~68/7)(~68/19) = (2/5)(2/7)(8/19) = (-2)-1- efi = (ay <1 10. (2/18) = (2/3)(2/5) = (-1)(-1) =1 12, The quadratic residues of 15 are 1, 4, 6, 9, and 10. Consequently, 2 is not a quadratic residue of 15; that is, the congruence 2? = 2 (mod 15) is not solvable. | 16) <0m =) 16. (8/5 - 75-11%) = (8/5)"(9/7)9(8/11)8 = (=I)? - (1) 19 <1 18. (B/m) = (8/p)*(8/a)*(3/r)* = (—1)*(—1)8(—1)* = (—1)**%F*, Therefore, (3/m) = 1 if and only if a4+4cis even, 20. proof: Suppose the congruence 2? = a (mod 1) is solvable; then (a/m) = 1. This contradicts the given hypothesis, -1)"-9/8, If m = 1 (mod 8), then (m? = 1)/8 = (m—1)/8 =1 (mod 8), then also (m? —1)/8 = (m-+1)/8- (m—1) is even: 22, proof: By Theorem 11.12, (2/m| (m+1) is even; so (2/m) so (2/m) =1 ifm On the other hand, let m = £3 (mod 8). ‘Then m = 8k 3 for some integer k. Therefore, (m*—1)/8 = (G4K? 4 48k + 8)/8 = 8k? + G+ 1 is an odd integer. Consequently, (2/m) = —1. Thus (2/m) = { a 163 24. proof: Let m= il pit. Then (3/1) Them Since 1 ifp= #1 (mod 12) wo-{ | tras tet, we need only consider the case when m contains prime factors = +5 (mod 12). Bach such factor p contributes a~ 1 to the product, so (3/p}* contributes (—1)* to the product. ‘Thus (3/m) = 1 if and only if De is even, Exercises 11.5 (p. 542) 2. The solutions of the congruence 2? are 1 and 10, 2 (mod 7) are 3 and 4; and those of 2? = 28 = 1 {mod 11) Now, use the CRT to solve the resulting four liner systems: The solution ofthe system 2 = 3 (mod 7) and 2 = 1 (mod 11) is given by # = 3-11-2-41+7-8 122 = 45 (mod 77); when 2 = 3 (mod 7) and 210 (mod 11), 2 = 3-11-2410-7-8= 626 = 10 (mod 77); when = 4 (mod 7) and x = 1 (mod 11), 2 = 4-11-241-7-8 = 14 = 67 (mod 77); and when 2 = 4 (mod 7) and x = 10 (mod 11), pa 4-11-2410-7-8= 648 32 (mod 77) 10, 32, 45, 67 (mod 77). ‘Thus the four solutions are 4, Since 2431 = 11-13-17, the given congruonce yields 2° = 69 = 3 (mod 11), 2? = 69 = 4 (mod 13), and 2? = 69 = 1 (mod 17). Their solutions are x = 5,6 (mod 11), 2 = 2,11 (mod 13), and 2 = 1, 16 (mod 17) respectively. Now, use the CRT to solve the eight linear systems, We have M = 2481, m1 = 11, my = 13, my =17, M, = 221, Mz = 187, and My = 143. Miy = 1 (mod m:) implies 221y, = 1 (mod 11); that is, ty = 1 (mod 11); Maya = 1 (mod ima) implies 187y = 1 (mod 13); that is, yp = 8 (mod 13); and ‘May = 1 (mod ms) implios 1439s = 1 (mod 17}; that is, vs = 5 (mod 17). {mod 17). Then: case 1 2 =5 (mod 11), 7 =2 (mod 13), and z= 2 = Min +a2Maye+asMayn (mod M) = 9 -221-14-2- 187-84 1- 143-5 = 2881 (mod 2431) case 2 55 (mod 11), 2 (mod 13), and x = 16 (mod 17). Then: © = aMiy, + a2Maye + agMsys (mod M) = 5-221-142- 187-84 16-143-5 = 951 (mod 2431) case 3 x25 (mod 11), x= 11 (mod 18), and x= 1 (mod 17), Then: © = @Miys +a2Mayp +agMpys (mod M) = 5. 221-1411- 187-841-143. 5 = 1259 (mod 2481) 164 CHAPTER 11. QUADRATIC CONGRUENCES case 4 x=5 (mod 11), 11 (mod 13), and x = 16 (mod 17). Then: 2 = aMiyn +0zMaye +asMays (mod M) 5.2211 411 -187-8+ 16- 143-5 = 2260 (mod 2481) ‘The remaining four solutions yield tho additive inverses of these as new solutions: —2381 = 90 (mod 2431), —951 = 1480 (mod 2431), ~1259 = 1172 (mod 2431), and —2260 = 171 (mod 2431) ‘Thus the eight incongruent solutions are $0, 171, 951, 1172, 1259, 1480, 2260, and 2381 modulo 2431, 6, Since 211 is a solution of x? = 15 (mod 179), 211? = 15-4 17%, where {= 154 Now, look for @ solution of the form 211 4 174 ce #17? eur? 4.422.179} (mod 17°) (05 +17. 154) 4422-177} (mod 175) 15 + 17°(154 + 4223) (mod 179) Solving 154 + 422j = 0 (mod 17) yields j = 6 ‘Therefore, 211 +17? 6 = 1945 is @ solution of 2* = 15 (mod 174), 8 By Exercise 7, 430 is a solution of 2? = 28 (mod 74), so 430° = 23 + 74%, where ¢ = 77. Now, look for a solution of the form 430 + 74}: (430-4743)? = 430? + 860.74j (mod 7%) (23474. 7) + 860-749 (mod 7°) = 28474(77 + 860j) (mod 7°) Solving 77 + 860) = 0 (mod 7) yields j = 0. Therefore, 430 +7*-0 = 430 is a solution of 2? = 23 (mod 78) 10. By Exercise 9, 32 is a solution of 2 10 (mod 13), so 32? 10 + 13, where 1 = 6. Now, look for a solution of 2? = 10 (mod 13) of the form 32+ 13% (32 + 1373)? 32? + 64-137) (mod 13°) = (10419"-6) + 64-13%) (mod 13°) = 10+ 13%(6 +647) (mod 13°) {mod 13) yields j= 6. ‘Therefore, 32 +19? 6 = 1046 is a solution of 2° also a solution, Solving 6 + 647 104 10 (mod 13%). Then 1151 (mod 13°) is, 12, By Exercise 11, 48 is a solution of x? = 5 (mod 11), so 48? = 5+ 11%, where i= 19, 4 16. 18, Now, look for a solution of # = 5 (mod 118) of the form 48 +11%j (4841179)? = 48? 4-96-11) (mod 119) (5 +117. 19) + 96-1175 (mod 11°) 54 117(19 +963) (mod 11°) Solving 19 + 96j =0 (mod 11) yields j = 10. ‘Therefore, 48 + 11° - 10 = 1258 is a solution of x? = § (mod 118), ‘Then —1258 = 73 (mod 11%) is also ‘solution, Clearly, 6 is a solution of 2? = 17 (mod 19), so 6? = 17-+19i, where = 1 Now, look for a solution of 2* = 17 (mod 19%) of the form 6 + 19): (6+ 195)" = 674 12-19) (moa 19%) {17 419-1) + 12-193 (mod 19°) = 17 -+10(1 +124) (mod 19°) Solving 14129 = (mod 19) yields 7 ‘Therefore, 6419+ 11 = 215 is a solution of solution. L 17 (mod 19%), ‘Then -215 46 (mod 19°) is also a By Exercise 15, a = 9 is a solution of 2? = 17 (mod 64), so 9? = 17 + 64%, where Now, choose j such that i+ aj =149j =0 (mod 2), 60 j=1. Thon a+ j-?=941-2% <4l isa solution of 2? = 17 (mod 128), s0 412 = 17 + 128i, where i = 13, Now, choose j such that i-+41j = 13 +41) = 0 (mod 2), s0 j is a solution of 2? = 17 (mod 256). 1, Phen 41 4528! = 4141.28 = 105 ‘The other solutions are —5 51 and 27 + 105 modulo 256, that is, 28, 151, and 233 modulo 256. By Bxercise 17, «= 5 is a solution of x? = 25 (mod 82), so 5% = 25 +26, whore i Now, choose j such that i +aj~0-+5j=0 (mod 2),90 <0. Then a+ j2*! = 540-28 is a solution of 2° = 25 (mod 64), s0 5% = 25 + 29%, where # = 0. Now, choose j such that i+ aj = 0-+5j =O (mod 2). Again, 7 =0. Then o + j2*-1=5 40.9 is a solution of x? = 25 (mod 128). (This solution was obvious by inspection.) ‘The remaining solutions are —5 and 2° +5 modulo 128, that is, 59, 69, and 123 modulo 128, By Exercise 19, «= 17 is a solution of 2? = $3 (mod 28), so 17? = 33 4 29%, where i= Now, choose j such that +aj = 4417) = is also a solution of 2? = 33 (mod 2"). (mod 27) are -17 and 2° £17 modulo 128, that is, 47, 81, and 111 (mod 2), 80) = 0, Then a +j2k-! = 740-2 =17 =a ‘The remaining solutions of 2 modulo 2 166 2, 24. 26, 28, CHAPTER 11. QUADRATIC CONGRUENCE: By Exercise 21, cr = 13 is a solution of 2? = 41 (mod 2), so 19 = 41 +2", where i= 4. Now, choose j such that é--aj = 4-4 13j = 0 (mod 2),s0 j= 0. Then a4 j2!"! = 1340-2 = 13 =a 1 (mod 2°), so 19? = 41 +2%%, where 0 (mod 2), $0 7 =0. Then a+ 72-1 = 13 40.9% = 13 1 is a solution of 2? Again, choose j such that ¢ + aj = 2+ 13 1 (mod 27), so 13% = 41-4 27%, where i is a solution of 2? = Again, choose j such that i oj = 1413) =0 (mod 2), s0 j= 1. Then a+ j2) = 1841-28 = 77 is a solution of 2 = 41 (mod 2) ‘The remaining solutions aro ~77 and 2” 477 modulo 2, that is, 51, 179, and 205 modulo 2 ‘The congruence 32? — 4z +7 = 0 (mod 132) can be written as y? = 101 (mod 13%), where y = 614 (mod 13"). Then y? = 101 = 10 (mod 13). By Example 11.1, 6s a solution of y* = 101 (mod 13), = 101+ 13%, where i= ~5. Now, look for a solution of y? = 101 (mod 138) of the form 101 + 133: (6413? = 6? 412-13; (mod 132) = [101+13-(-5)] + 12-13y (mod 132) 101+ 13(-5 +124) (mod 134) Solving ~5 +12) =0 (mod 13) yields j =8. Therefore, 6+ 18 59 (mod 13%) When y = 110, 6 ~ 4 = 110 (mod 134), so x = 19 (mod 132), When y = 59, 62 — so. = 95 (mod 134) 110 is a solution of y® = 101 (mod 13%). ‘The romaining solution is ~110 = 19 (mod 13%), ‘Thus the two solutions of the given congruence are 19 and 95 modulo 132, 2a? + Since 2 0 (mod 11) = 6 (mod 11), multiply both sides by 6: 622741) = 0 (mod 11) 246 = 0 (mod 1) s? = 5 (mod 11) = = 4,7 (mod 11) 32? +1 =0 (mod 13) 9 (mod 13), multiply both sides by 9: 9(827+1) = 0 (mod 13) 274.9 = 0 (mod 13) 4 (mod 13) 2,14 (mod 13) 167 30, We have w? = 1 (mod 35), where w = 3/2, Then u? = 1 (mod 5) and u? = 1 (mod 7), When w? = 1 (mod 5), u = 1, 4 (mod 5); when u? = 1 (tod 7}, w= 1, 6 (mod 7). By the CRT, u = 1, 6, 29, 34 (mod 35); that is, x = 2, 12, 68, 68 (mod 140). Their additive inverses are also solutions: 72, 82, 128, and 138 modulo 140. 32, Since 1768 = 2* 221 and 1768 # 1 (mod 8}, the congruence 2: ‘Theorem 11.15. Therefore, the given congruence is not solvable. 1768 (mod 2°) is nat solvable by 5 (mod 4) and 2? = 5 (mod 11%). (mod 4) is solvable by Theorem 11.15. The two 34, Since 5324 = 2?- 11°, the given congruence implies 2 Since § = 4 {mod 8), the congruence 2? solutions are 1 and 3 modulo 4 By Exercise 12, the congruence 2? = 5 (mod 11%) has two solutions, 73 and 1258 modulo 11° ‘To solve the given congruence, we nov apply the CRT: We have M = 27-119 = 5324, Mi = 11°, My = 4, m= 4, and mz = 11%, The congruence Miy: = 1 (mod my) implies 11%y; = 1 (mod 4), so yr = 3 (mod 4); and Mayo = 1 (mod ma) implies Aya = 1 (mod 11°), so yp = 338 (mod 113) 73 (mod 11°), Then 2 = case 1 2=1 (mod 4) and 112-34 73-4-33 3 (mod 5324). = 1 (mod 4) and x = 1258 (mod 119). Then z = 1-11.34 1258-4.333 = 2589 (mod 5324). ‘The remaining two solutions are ~73 and 2589 modulo 5324, that is, 2735 and §251 modulo 9324. case 2 36. 4 38. 8 40.8 42, 2 a4, eH 46. proof: Let m = 2041. Then n? = da? +4a-+1 = da(a+1)-+1 = 1 (mod 8), since a{a-+1) = 0 (mod 2) 48. proof: Since (2,p) = 1, there is a least positive residue b such that 2b = 47, (2/p) = (b/P). Since 22? = -1 (mod p), 22? = -b (inod p); that is, 2? = —b (mod p). The congruence 2? —b (mod p) is solvable if and only if (—b/p) = 1. But (-b/p) = (-1/p)(b/p) = (-1/p)(2/p) = (-2/p) = 1 ifp=1 or 3 (mod 8), by Exercise 60 in Section 11.2. (mod p). So, by Bxereise ‘Thus the congruence 2? = ~b (mod p) is solvable if and only if p = 1 or 3 (mod 8). 50. proof: Since (p" — a)? = a (mod p), a)? = a (mod p"), p — ais a solution of the congruence 2? 52. proof (by contradiction): Notice that b 3, Let a be a solution, Then, by Exercise 53, 2" — a and 2"? a are also solutions ‘We will now show that these solutions are distinct. Ifa = 2"—a (mod 2"), then 2a = 0 (mod 2"). This is impossible, since a is odd and n > 3. Suppose a = 2*-! + a (mod 2"). Then 2 (mod 2"), which is also impossible. Ifa = 2"! a (mod 2%), then 2"-1 = 2a (mod 2"), 50 @ = 2-2 (mod 2° this is also impossible since a is odd, Continuing like this, it can be shown that all four solutions are incongruent: modulo 2 Next, we will show that the congruence has no new solutions, To this end, let 6 be any solution. Then # 2 (mod 2"), 80 2a? — 6; that is, 2"(a— B)(0+ 8). Suppose 4(a~ 8) and 4|(a+ 8). Then 4|2a, which is impossible since a is odd. Therefore, either 2"i(a — f), 2"\(a +8), 2"-|(a— A), or 2°-"|(a +f). Suppose 2*|(a~ f). Then a = A (mod 2). If 2%|(a-+ 6), then f = -a = 2" — a (mod 2"). Suppose 2°— [a ~ 8), then 8 2-1 +a (mod 2), Finally, if 2°-"(a-+ 6), then = 2! 0, 12, (—3/Mp) = (-1/Mp)(3/M, -1)(-1) = 14. (~3/ fa) = (A/Ja)(@/ fn) = 1 (C1) = -1, by Brereises 10 and 13. 16. When n > 5, =1 (mod 5), Therefore, (5/p) 1/5) 2/3) = 1 1, since 5 = 1 (mod 4). 18. Since mis even, = 2 (mod 3). Therefore, (9/3) 20. Since p = 16" 41 =2 (mod 5), (p/3) = (2/5) 22, 24, 26, 28, 30, 32, 36. 38, 40. 169 Since 2999 = —1 (mod 8), (2/2999) = 1. So, by Euler's criterion, 29° = 2o90)22499 1 (mod 2999); that is, Since 3947 = —1 (mod 12), (3/3347) = 1. That is, 34°" = 1 (mod 3347). In other words, 3347)/3!°7—1, Let 2/2 = y. Then the congruence 2? = 40 (mod 13) becomes y = 10 (mod 13). Since y = 6 is & solution of this congruence, 2 = 2y = 12 (mod 13). @-neR (p~1)/2~80, 90 p= 17. 13, 80 p = 47. 2 is a primitive root modulo 11, 59, 83, and 107; and —2 is a primitive root modulo 7, 28, 47, and 167. ‘The given congruence can be rowritton as (4a +3)? = 1 (mod 72). Then: 443 = £1 (mod 7) 4r = ~341 (mod 7") 4a —4, -2 (mod 7?) 48 (mod 72). If 4x = —2 (mod 72), then 2 = -25 = 24 (mod 7”) Tear = 4 (mod 7°), then x = -1 ‘Thus the solutions are 24 and 48 modulo 7°. (mod 253) implies 2? = 27 (mod 11) and 2? = 27 (mod 23). Then 2, 21 (mod 28). By the ORT, « = 48, 117, 196, 205 (mod 253). 7 (enod 11) and Since 968 = 8.11%, the given congruence implies 2* = § (mod 8) and 2® = 5 (mod 11°). By Theorem 11.15, the congruence 2? = 9 (mod 8) is not solvable, since § = 1 (mod 8). Therefore, the given congruence is not solvable. ‘The congruence 2? = 47 = 13 (mod 17) has 8 as a solution, so 8* = 47 + 17%, where i= 1 Now, we look for a solution of 2? = 4 (mod 174) of the form 8-+ 17 (+179)? = 8416-17; (mod 17) = (87417-1) 416-17) (tod 17°) 47 + 17(1 + 163) (mod 174) Solving 1 +16) = (mod 17) yields j = 1. Thus 8 + 17j = 8+ 17-1 = 25 is a solution of 2? AT (mod 172), so 25? = 47 4 17%, where i Now, we search for a solution of 2? = 47 (mod 174) of the form 25+ 1724 (25-4179) = 25% 450-177 (mod 179) (47-17? 2) +50-178y (mod 179) 47 4.177(2 4 505) (mod 17°) Solving 2-450) (mod 17) yields j Therefore, 25.4 17%) = 4810 (mod 17%) 5 +17" 2 m 608 is a solution of 2? = 47 (mod 17%). Its remaining solution is 170 2. 46. 46. 48, 50. 52. 54, 58, CHAPTER 11. QUADRATIC CONGRUENCES Since o = a (mod p), (2a)? = da? = 4a (mod p). Therefore, 2a is a solution of 2” = 4a (imod p). proof: (2%b/p) = (2/p)*(b/p) = (b/p), since a is even. proof: Since pin, (mod p). Therefore, (p/q) = (a/p) =1 proof: Suppose p ¥ 3 (mod 4) or q #8 (mod 4). Then either p = 1 {mod 4) or g = 1 (mod 4), 50, by Corollary 11.7, (p/a) = (a/p). ‘Thus (p/q) = 1 if and only if (¢/p) = 1; that is, the congruence x? = p (mod q) is solvable if and only the congruence 2? = q (mod p) is solvable proof: Since pj(a?" + 62"), a?" = —b?" (mod p). Then: (op) = (PY) (a"/py = (-A/p)0"/P) 1 = (-1/p)-1 ‘Thus (—1/p) = 1, 60 by Corollary 11.2, p= 1 (mod 4). proof: Let a be a primitive root modulo fy, Then af Thus is a quadzatic nonresidue modulo f,, (mod f,), 30 a'/e“D/? = 1 (mod fu) proof (by contradiction): Let N = (p1 ...pk)®—2. Sinoe each ps = 1 (anod 8), NV = —1 (mod 8). Let be an odd prime factor of N. ‘Then (pr ...ps)® = 2 (mod p}, s0 (2/p) = 1. Therefore, by Theorem 11.6, p = 41 (inod 8). Suppose every prime factor of N is = 1 (mod 8). Then N = 1 (mod 8), @ contradiction. Therefore, N' must have a prime factor q = —1 (mod 8). If q = py for some 3, then q/2, which is @ contradiction. Thus ¢ % py for every i, which is also a contradiction. proof (by contradiction): Suppose there are only a finite mumber of such primes pr,...,pk. Let N = (pr-..pu)? +3. Let p be an odd prime factor of N. Then (pi...pe)? = -3 (mod p), 90 (-8/p) = 1. Thus, by Bxereise 88 in Section 11.3, p = 1 (mod 6). Ifp = p, for some i, then p|3, which is impossible, Thus p # p; for every é, which is also a contradiction. proof: 1. If p= 1 (mod 4), (p~1)/2 is even; eo p* =p. Therefore, (p*/a) = (P/a) = (a/) by Corollary On the other hand, let p = 3 (mod 4). Then (p—1)/2 is odd. Then (p* /g) = (~p/a) = (-1/a)(p/4). If q= 1 (mod 4), then (—1/q) = 1 and (p/a) = (a/p). Thus (p*/¢) = 1 (a/p) = (g/p). If q = 3 (mod 4), then (—1/q) = —1 and (p/a) = —(a/p). Then (p*/a) = (—1) - (~(@/p)] = (a/P). Supplementary Exercises (p. 548) 2 fA — Bis a surjection if, given any b in B, there (p— 1)/2 quadratic residues and {p— 1)/2 quadratic ana in A such that 6 = f(a). Zp contains nresidues. Thus, given 1 in {31}, there is a 10, 12 re .. Since 2° = 4 (mod 5), 4 is a quadratic residue of 5, But 1 mm quadratic residue a in Zy such that f(a) = 1; and given —1 in {41}, there is a quadratic nonresidue Bin Z; such that f(8) ~ ~1. Thus f is surjecion, K = {1,3,4,9,10, 12} = set of quadratic residues of 13. 1,2, 45 1,3, 4, 5,9 34 24421 (mod 4), so 4is nota biquadratic residue of 5. (108/239) = (4/239)(27/239) = (27/239) = (3/239)? = (3/239) = —(239/3) = -(2/3) =1 (28/3)?(28/17) = (28/17) = (11/17) (6/11) = @/NCB/A1) = (-1)(-2) (28/158) proof: Since 2 fa, a=1 (mod 4); so a = 4k +1 for some integer k. Then (2/a) = (—1)(**=2/8 case 1 Let k be even, say, k = 2. Then a = 1 (mod 8) and a? = 1 (mod 16). Therefore, eee cept (a/2). caso 2 Let k be odd, say, k = 2/41. Then. Soa? ~ 1 = 8 {mod 2). Therefore, (2/a) 3:45 = 5 (mod 8) and a? ~ 64%°+80i-+25 = 9 (mod 16). ayer ese 1 = (a/2), 172 CHAPTER 11. QUADRATIC CONGRUENCES Chapter 12 Continued Fractions | Exercises 12.1 (p. 50) 2 = (6;39,1,4] = [11 1)1,1,1,1,2) = aaa.) fataaa) = 14 Qe 14 = ledpete py shee 8 [643,2q) = 54 = 54 qe no+ = ms 10, By the division algorithm, we have: So 8 = [051,1,1,1,2) 174 CHAPTER 12, CONTINUED FRACTIONS 12. [0:2,7,7,6]. First, we construct the following table using Theorem 12.3: ou afo2 7 7 6 me [OQ 1 7 90 307 gm [1 2 15 107 657 K So [0;2,7,7,6 aw 14, [-2;5,4,7,1}, First, we construct the following table using Theorem 12.3: ie | eOs een Eta EEA: mp2 5 4 7 0 me |-2 -9 38 -275 313 wll 6 Mise ams So {-2:5,4,7, = Bt = — BS 16. We have ¢3 = 2 = $3, and by Exercise 15, oj = 2 = 288. So, os = Ht = samt = 225445 _ 1am and os = = Sasa = Soe 18, We have es = #8 = JB, and by Exercise 15, ¢5 = 8 = 20 by Theorem 12.4, Prat ~ InPa=d (2.1) By Exercise 19, cy = Es = FRtt. Sineo (Fu42, Fast) = 1, Pn = Fuge and gu = Fuga for every n > 1 Substituting in equation (12.1), we get: Fagan — Fatt Fngt = (-1)"" That is, Fagan ~ Ftga = (1) 22, B= Be By the division algorithm, we have: 1393 = 6-225 +43 25 = 5. 43+10 B= 41049 10 = 3 841 B= 3140 ‘Therefore, $94 = [6;5,4,3,3] = (6;5,4,3,2,1] B a By the division algorishm, we have: 972 157 Thus 2 = #2 = (6:5, 4,3,2] Using Exercises 21 and 22, we conjecture that 24 . By Exercise 2, 449? = [6;39, 1,4]. Therefore, 199 1 ‘199 ~ 7199/199 ~ [639,14] proof: Let r= [ag;a1,.+.4q)+ Then 1 L 7 feoithy--60] ~ Got Ee the LDE 4x + 13y = 17. We have 4/13 = [0;3,4), pa = 1, a1 general solution is 2 176 157430 - 3047 - 742 abt 140 fouiaenyaayai 1 = 1:6,39,1,4] 1 (05.00,01,-- An) . 282 + Vy = 119. Since (28,91) = 7 and 7|119, the LDE is solvable. Dividing the LDE by 7, we got 3, pa = 4, and gz = 13. So pag ~ gap = —1; that is, 4.3-19-1=—1, Then 4{—51) +13(17) = 17. $0 20 51+ 13%, y= 17-48, 51, yo = 17 is a particular solution and the 107624.2076y = 3076. Since (1076, 2076) = 4 and 4|3076, the LDBissolvable. Then 269x-+519y = 769. We have: 519 269 250 ct So £3 = (0; 1, 1,13,6, 3) Using the table 1-269 +250 1250+ 19 13-194 3 6 341 a 140 w 6 8 14 85 269 2 164 519 CHAPTER 12, CONTINUED FRACTIONS ota ~ gape = (1); that is, 269-164 ~ 519-85 = 1, Then 269(164: 769) + 539(—85 - 769) = 769 So ap = 164-769 = 126116, 1) = ~85- 769 = ~65365 is a particular solution. The general solution is a= 70 + bt= 126116 + 519t, y = yo — at = ~65365 — 2691, Exercises 12.2 (p. 575) a = 1547006888... a quemmbsmr = 6.4641016151 | 5 = pawarbrarsne = 21547005983... (7-8) 1.7724538509, srendusmr = 1.2945757197.. wamstrier— = 3.3947129141. 3 = pypartmnar = 25994869066, . a = gered: = 33047129141 Continuing like this, we get y/F = [151,3,2,1,.. 8, Using the continued fraction V/3 = [151,2,1,2,1,2,-., we build the following table: nli23 4 55 ofl 2a 2 0 pr [2 5 7 19 2% m{1 3 4 1 18 It follows from the table that ey = 2/1, ¢2 = 5/3, ¢4 = 7/4, ea = 19/11, and o5 = 26/16. 10, Using the continued fraction = [1;1,3,21,1,61,28,13,1,1,2,..4J, We build the following table: 23 4 5 a@ji3s 2 1 1 pal2 7 16 2 99 gm {l 4 9 18 2% 17 It follows from the table that e1 = 2/1, ¢» = 7/4, ¢3 = 16/9, ¢¢ = 23/19, and cs = 39/22, 12, First we construct the following table njias 45 6 7 5 8 0 neo -e ateeaee ee 3 8 11 19 87 106 193 1264 1457 2721 29995 mil 3 4 7 32 39 71 465 536 1001 8544 It follows from the table that cg = 1457/5386 = 2.7182835820. ... 1g = 2721/1001 = 2.7182817182. .. and cy; = 28225 /8544 = 2.7182818352.... Thus ¢ = 2.718281, 14. proof: Let x denote the given limit, We have Fant That is, Since 2 > 0, 2 = Hf = a, the golden rato 16, Let 2 = [Lin bay Em, --J- Then Ly + 1/x. This yields: e_Ine-1 = 0 (a" + ")e + (06)" (-a"ye-p") = 0 z= a6" 6, sincen is odd Since ) <0 and mis odd, 6" <0. But x > 0. Therefore, = a" Review Exercises (p. 576) 2. By the division algorithm, we have: 1023 = (24) 4349 178 10. 12, CHAPTER 12. CONTINUED FRACTIONS B= 4-947 9 = 1742 T= 324d 2= 2140 Thus ~1999 = [-24;4,1,3,2] Using the continued fraction [3; 1,2, 1,2, 1], we construct the following table: nit 2 3 45 at diate testa Cee pojd IL 15 41 56 13 4n 15 tn It follows from the table that cs = ps/qs = 56/15. From Exercise 5, ¢s = ps/as = 1051/1380. So Po _ opty W-105L-+115 _ 11676 Ge Gegs bay 1113804151 15331 By the division algorithi, we have: 404 = 0-675 +464 675 = 1-4644211 44 = 2-214 42 M1 = 5.4241 2 = 2 140 ‘Thus 464/675 = [0;1, 2,5, 42]. So om 464 ~ 676/464 332 4 55y = 93. Since (33,55) = 11 and 11 /93, the LDE is not solvable, 365z + 185y = 135 (865, 185) = 5 and 5|135; so the LDE is solvable. Dividing both sides by 5, the LDE becomes 732-+37y = 27, By the division algorithm, we have: 73 = 1.37436 a7 = 186+ 1 36 = 36-140 ‘Thus B= (151,36). 379 We now build the following table: 1 1 36 2 73 1 37 =1. Then 73(—1-27)+37(2-27) = 27. So 19 = —27, id is @ particular solution of the LDE. ‘Thus the general solution is x = zp + bt = —27 +374, Since poqi —gop1 = (1)?-}, we get 78:1 —37- » Y= w at = 54—73t. 14, 233% — Lddy = 19 We have 233/144 = (1;1,1,1,1,1,1,1,1,1,1,1). Phen cu Fis/Fig = 283/144 and cro Pwo/na = Fia/Fr, = 144/89. Since purge — qx1P10 FigFii — Fi, = (-1)'?; that is, 233-89 — 144? = 1, Then 233(19-89) ~ 193(19- 144 19-89 = 1691, yo = 19-144 = 2736 is a particular solution. Thus the general solution is. = x9+bt = 1691—144t, y = yo—at = 2736-233, 16. VIO 29 = VIO ag =3 ena nim gig =Vi+3 a =6 6 m= aigoV+3 a Continuing like this, we get VI0 = [3:6] 18. ap = log 2 = 0.3010209956... 1 = qapreaoupen, = 3-3219280948. . 252 = pyoroimmee = 31062897295. 25 = srosalnors 9408778725, 4 = qparisragr, = 24463112029, ‘avant raeas~ = 2-2405890627.. Thus log 2 = [0;3,3,9,2,2,-. J. By 20. Using the continued fraction, we first construct the following table: 1 oi ava ee Eee Epa aTOHEEEEH I 13 pa |1 3 16 115 1051 11676 152839 qu [1 4 21 151 1380 15331 200683 ‘Then eg = po/ge = 11676/15331 ~ 0.76159415563....and er = pr/ qr ~ 152839/200688 ~ 0.76150415506. ‘Thus {rz} = 0.76150415 correct to 8 decimal places, 22. By Exercise 13 in Section 12.2, en = Fay2/Fusi. ‘Therefore: Fae _ Fant Fan Fa Fap2Fa— Foy FaFrtt ea ena 180 CHAPTER 12. CONTINUED FRACTIONS (eye FoPon by Cassini's formula lim, RHS = 0. ‘Therefore, lim (ey ~ Gear Supplementary Exercises (». 578) 2. proof: Since qo and qi are positive, every gy is positive. So, by the recursive definition of ges gk > aka for every k: Using the recurrence relation gx = axge~1 + Gx-2, We have: tae eee T eai/tea dete oat wai : ic, innate On-1+ Safes Conti Jing like this we get: i 1 gee 8 att ante = + wate [ani kts +442, 01) 4. proof (by strong induction): We have (40301, 02,.-] = [bos b1,b2,-- J+ That is, 1 {Bn ae So ap = bp. Thus the result is true when & = 0. It follows from (12.2) thet [ax;a2,a3,..] = (br: boy bay. Ji 80 a1 = by Now, assume that ay = by for all nonnegative integers < k. Then (ao; 445 42,-- 04 k415---] = feo, ar,25-- bit} $0 [aiersOu42s--1] = [Beesibe+ay-- Ij a8 before, 80 a4.s1 = Des. So the result i true for k+1. ‘Thus, by the strong version of induction, ay = be for every k > 0, a Chapter 13 Miscellaneous Nonlinear Diophantine Equations Exercises 13.1 (p. 580) 2. proof; By Lemma 13.2, 2 and y have different parity. Therefore, since x is even, y must be odd. 2 Suppose = is even, Then y? = 2? —2? is even, so y is even. Since this is a contradiction, 2 also must be odd. 4. proof: LHS = (Fasa— Futt)*(Fu4a+ Feta)? + (2PayiFata)? = (Flas Fite)? + (Fast Faga)? = (Fiat Fi)? = RES 6. 4000017 + 80000400000? == 800004000017 4000001? + 8000004000000? = 8000004000001? 8, 24-143-145,120-119-169,168-95-193,264-23-265 10. (2n-+1)8 + [2n(n+ 1)? = (2n(n+1) +1P,n 21 12, 2424 149% =~ 145? 282 4 195% = 1972 14, Conjecture: (An)? + (4n® — 1)? = (dn? +1)2,n > 2 proof LHS 16n? + (16n4 ~ 87? +1) 16m + 8n? 41 = (an* 41)? = RHS 181 182 16. 18, 20, 22, 24, 26. 28. CHAPTER 13. MISCELLANEOUS NONLINEAR DIOPHANTINE EQUATIONS proof: By Lemma 13.1, 5 cannot ‘x or y, by the division algorithm, 2? = 41 2 42 (mod 5), 50 2? =0 (mod 5). Thus 5|z. livide any two of the numbers x, y, and z. If 5 does not divide ? (mod 5). Then 2? + y? = 0, #2 (mod 5); that is, proof: Let a, b, and c denote the lengths of a Pythagorean triangle. Then a= dz, 6 = dy, and e= de for some positive integer d, where 2-1-2 is a primitive Pythagorean triple. By Exercise 15, 3|x or Sly sa Slzy. By Exercise 17, 4{¢; s0 4|zy. Thus 12[ry, so 12jab. proof z—2 =(m?+n%)—2mn, But 2~2= 1, Therefore, (m?-+n®)—2mm = I; that is, (m—n}* = 1, som—n=l. Then m= n+, Thus 2 =2n(n+1), y= (n+1)@—n? = 241, and z= 2n{n+1) +1. Perimeter = 2mn + (m? — n?)-+ (m?-+ n? 2m(m +n). Since the hypotenuse is longer than the even leg by one unit, m?-+n? = 1+2mn. ‘Then (m—n)* =1, som—n=1. Area = (2mn)(m? —n2)/2 = mn(m +n) = n(n-+ 1)(2n-+1) Perimeter = k{m? 2) +k(2mn) + k(n? +02) = jkm(m-+n), where k is an arbitrary positive integer. ‘The corresponding Pythagorean triples are 4435~5852-7373, 19019-1380-19069, and 3509-8580-9108. ‘Common area = 4485 - 5852/2 = 19019. 1980/2 = 3059. 8580/2 = 13,123,110, proof: Let m= az and n = ax-1, It follows from the recursive definition that m and n have different parity and m > n, Let = 2m, y= mn? —n?, and 2 =m? +n? and 2+ y! = 2%. So zy-2 is a Pythagorean triple ‘To see that ay and o4-1 are relatively prime, let d = (a4,a41). Then dlax and diay, s0 days. ‘Thus day; and dlax_o, s0 dlay—y. Continuing like this, it follows that dlay. So d= 1 and henoe ax and oj; are relatively prime, Thus 2-y-+ is a primitive Pythagorean triple. It remains to show that x and y are consecutive integers; that is, |x —yl = 1, where jt] denotes the absolute value of t. To this end, first notice tha: zy = 2onae1—ef tah, = e-1(au-1 +204) ~ 2 = 4041 — of We shall now prove by induction that [ax —yaxy1~ 03{ = 1 forall & > 2. Since ayas — 03 [au-rae41 ~ a3] = 1 when & = 2. Now, assume that Jax-sae4i ~ | = 1 for an arbiteary integer k22. Then: losansa—a2sa] = fanangs +24) ~ aaa] [Panaees +02 ~ abs] leet ae —en41) + 02] foxsa(—ay—1) +03] fexssa.—1 — af] 1 183 by the inductive hypothesis. Hence, by induction, [z—yj = fax-raesr—af| = 1 for all > 2. ‘Thus 2-y-2 is a primitive Pythagorean triangle with consecutive legs. 32, a? + py? = (lon? — pn?) pl? + pm)? = (mm + pnt — 2pm?n?) /p? + plamn?/p?) (a8 + pat + Qpmtn?y fp? = 2 ‘Therefore, -y-z is a solution. 3, 2 mt — nt, y= 2mn{m? +n2), = Int Exercises 13.2 (p. 601) su? and 2? ~ y? = ke? for some integers wand v. Thon 2 ~ yf = (2? + 2, Suppose that 27 +17 = ¥)(z? — y?) = (Kuv)?, This is impossible by Theorem 13.3. 4, Assume that the equation has positive integral solutions. Then 2(x* + y*) = x*y$; that is, (en)! + (=u) = (2u}*, This contradicts Corollary 18.2. Hence the result 6. proof: By Fermat's litle theorem, 2+ y=? +y° = 2? =z (mod 7), 90 pl(e+y -2). 8, proof (by contradiction): Assume the given equation has positive integral solutions. Then 22” = (7 +)? = 9?) = (w— w(x + y)(2? +42). Both x and y must have the same parity. Therefore, by Lemma 13.3, 2+ y = 2r?, 2~y = 232, and a? + y? = 20? for some integers r, s, and t. Since (ety)? + (z—y)? = (2? + y*), dr* + 454 = 407; that is, v4 + 94 = t?, which is a contradiction. 10. 5,3 12, B44 458 = 216 =68 14, Let 21, x, 2-41, and 2-42 be a solution consisting of consecutive integers. Then (z—1)°+25+(24+1)9 = (c+2)*. Expanding each and simplifying the resulting sum, we get 2° - $2? — 32 ~ 4 = 0; that is, (2~4)(2? +241) =0, Therefore, 2 =4, since 2 is an integer. Thus 3-4-5-6 is the only solution, 16, When a= 2 and b = 1, the formula yields 8-108 = 8.79478 437% That is, 20% = 14% + 784172 ‘Thus 14-7-17-20is a solution When a = 3 and 5 = 1, the formula yields 27-29% = ‘Thus 26-55-78-87 is a solution. 7-267 4-268+55°, That is, 87° = 2694-559 +789, Exercises 13.3 (p. o12) 2. 29 = 57 + 2? 4 97 = ae 10. 12 4, 16 18. 20. 22, 24. CHAPTER 13. MISCELLANEOUS NONLINEAR DIOPHANTINE EQUATIONS . proof Let w = a+ bi and z= e+di. Then ful = a? +0? and |z| =P 4d%. Then we {ac~ bd) + (ad-+bc)i; 50 jwz| = (ac— bd)? + (ad + be)®. Since w2- WE = (win)(22), |w2'? That is, (ac — ba)? + (ad + be)® = (a? + b4)(c? + 42), 415s 437 +18? (58 2 42Q(77 +29) (T+a-2 $524.7)? ‘Since 137 is a prime congruent to 1 modulo 4, it can be written as the sum of two squares: 137 = 44117. 585 = 8.5.13, Since 5 = 1 = 13 (mod 4), by Lemma 13.10, both 5 and 13, and hence 5-13 can be veritten as the sum of two squares. Therefore, 3? (5 18) = 585 can be expressed as the sum of two squares: 585 = 3? + 242, 193 = 12? 4.7 833 = 28? 4.72 Since p = 1 (mod 4), and the exponents of ¢ and r are even, by Theorem 13.10, 2p%gr® isis expressible as the sum of two squares, Suppose n= a? +4? +e2, The square of every integer is congruent to D, 1, or 4 modulo 8. Therefore, n=a? +? 4c =0, 1,2, 3, 4,5, or 6 (mod 8), a contradiction. Suppose N = 4*(8n+7) = 22 +4? + 2? for some integers 2, y, and z, If e= 0, then, by Exercise NN is not representable as the sum of three squares. So, assume ¢ > 1. By Bxercis 2 = 2w, Then: 21, each of the integers x, y, and 2 is even. Let x = 2u, y = 2u, and 4(8n¢7) = ate tw’ sgnt7) = wavtaut Obviously, this procedure can be continued until e = 0, which leads to a contradiction. 49 = PRP EHEC TP) = 24d DEL 14 de 4@-2-1-241-1- 1-1) + (2-1=1-1-1-241-12 + Q-141-1-1-1-1-2)* = PO +O LO B43=7 HPP 41) Pai PEEP 43=8 484041 197 = 14? 412 4.07 408 81349? = 97 407 407 4.0% = 6? 46? 4-32 4 OF Beato We have 3-17 = (1 +1 +1? 4-0%)(42 + 1? +0? +02) = 7? +1? +1? 402. Therefore, 1975 = 9-52.17 = 543-17) = 57? +17 41? +0) = 35? 45 45? +0? (Note: 1276 = 25% +208 + 15% + 5? also) 185 160, By Theorem 13.6, m can be written as the sum of the four squares. Lot m = wetter Iw y=0, then n = m+ 169 = 2? + 107 +8? 4-28 4 1%, a sum of five squares. If 2 = y = 0, then n = m+ 169 = 2? +? + 12? 4-4? +32, a sum of five squares. If y = 0, then n =m +169 = w+ 2? + 2?+ 160 = w? +2? + 2? +12? +5%, a sum of five squares. Finally, if none of them are zero, then n =m +169=w? +274 y?-+2? 4-132, again a sum of five squares. 36. Let m Exercises 13.4 (p. 620) 2. 8,3 127, 48 4, 10, 3; 199, 60 6. += 4+ VIB yields @ solution of 2 — 159? = 1. So, by Lemma 12.4, r? = 31 + BIB yields a solution; likewise, 2? = 244 + 68VTR also yields a solution. Thus 3, 8; and 24, 68 ate alo solutions 8. + = 15 + 4VTH yields @ solution of 2? — dy? = 1. So, by Lemma 13.4, r* = 449 + 120VTH and 19 = 13455 4. 3596/4 yield two solutions. So 449, 120; and 13455, 3596 are also solutions. 10. u solution, 120? = 1; that is, u? — 9(2v)* = 1, Sou = 97, 2u = 56 is a solution; that is, u= 97, v= 28 isa 12, By Theorem 13.7, the solutions are given by z= [2+ v8" +Q-VvEry/2 y = [(2+ v8)" (2 v8" y/av3 When n= 2, these equations yield z = [(2+v3)+(2-Vva)/2=7 y = (2+ v3) — 2 - v3)"1/2v3 When n= 2, they yield 2 = [(2+V5)+Q- Va/2=26 v= [2+¥3)*- @- v3)9//2v3 = 25. ‘Thus two solutions are 7, 4; and 26, 15. schff = WE 9. M4, arhg — N(—)? = 1, it follows that 1/r yields ‘a solution. 16. proof: +" yields a solution by Exercise 15. So, by exercise 14, 7" = 1/r" also yields solution, 18. N=2,a ay, and = 2= ys. Therefore: Beqaa + Ayn Ya = nat 3yy1yn 22 186 CHAPTER 13. MISCELLANEOUS NONLINEAR DIOPHANTINE EQUATIONS 20. a= 24, 8=5, and N= 23 21 = 049 + AN yp = 0? +2367 = 24? 428-5 = 1151 and 1 = B20 + O¥e = Ba + a8 = 2as = 2.24 240; ry Sar, + GNyy = 24-1151 +5. 23-240 = 55224 ya = Bay + ay, = 5-115] + 24-240 = 11516. 22. proof (by contradiction): Assume there is a solution x, y. Since r 1, it follows that 2? 4 1=1 or 2 (mod 4) and Ny? = solutions exist. © oF 1 (mod 4) for every integer or 3 (mod 4). Since this is a contradiction, no 24, By Exercise 23, 2+ yVN = (a + 6VN)*""!. This implies: tatonvN = (a+ BVN)(tn—1 + yniVN) = (a? + NS + 2a8VN)(tq—1 + nV) wating like terms, (0? + NB" )ry1 + 208N Ya Ya = Penta + (0? + NB) w= 8, and n> 2 26, ay = (0? +26 xy +4ahy, Ye = LeaxBery + (a7 + 267), 25 = (02 +268)22 + dain ty = 2obiny + (a? + 26% )un 142-144-111 +355; 7445 743-5 = 28. 28, Since m—r rand n=y,m=2-+y andn=y. Therefore, one leg = X = m?—n? = (2-49)? 2? 4 2ay and the other leg Y = 2mn = ey +2y?. Substituting for x and y from Exercise 27, we got: vay co vay + 4 x (i+ vayeet — (1 yet ¥ Review Exercises (p. 023) 2. [B2n +3)? + n(n +3))? = (n(n +3) +97? mis 630 216 666 28/21 1176 343 1225 10. 12, us, 16, 187 ‘The corresponding Pythagorean triples are 7080-119-7081, 6032-3255-6933, and 168-7055-7057. ‘Common perimeter 7080 + 119 + 7081 = 5032 + 3255 + 5933 = 168 + 7055 +7057 = 14, 280 (Note: The common perimeter can also be found as x+y += 2m(m +n), Let m= t(t + 1)/2 and n= t(t ~ 1)/2. Then: yo = mn = [eft + 1)/2)? — [ot 1) (e+ a)? - (@- 11/4 (eya=e ‘Aroa of the Pythagorean triangle with generators cand a = (2aa)(c? — a2)/2= (a+ B)ate Area of the Pythagorean triangle with generators ¢ and b = (2cb)(c? ~ 82)/2 = (a +8)abe ‘Area of the Pythagorean triangle with generators a+ and ¢ = 2c(a+ b)[(a +8)? ~2]/2= (a +b)abe ‘Thus all areas are equal Area of the Pythagorean triangle generated by A,B (2aBya? — B?)/2| |(a? + 388)(a8? + 20b— 02) i(a? + 362) — (88? 4 2ab ~ a?) |4ab(a? + 38°)(38? + 2ab — a?}(2ab — 38° + 0°)| |sab(a? + 36°)(2ab — (a? - 36°)|206-+ (a? — 304)] |dab(a? + 36°)[402%? — (a? — 36%)?]] |sab(a? + 362)(a + 96* — 100%6?)] Azea of the Pythagorean triangle generated by C,D l@cpyc? — D*)/2| [4ab(a? + 362)(a* + 96¢ — 1008?)] by changing b to —b in the above result. ‘Area of the Pythagorean triangle generated by B, F |QEP)(E? ~ F?)/2| |4ab(a? + 384)[(a? + 36%)? — (4ab)?)] = |dab(a? + 382)(a* + 964 — 10074%)] ‘Thus all threo areas are equal A(vn,n) =m? +n? = hypotenuse of the Pythagorean triangle with yenerators m and n. By Exercise 15, perimeter = 2m(m +) When m = 8 and n= 1, perimeter = 2-8-9 = 144 = 12%; 188 18. CHAPTER 13. MISCELLANEOUS NONLINEAR DIOPHANTINE EQUATIONS ‘When m = 18 and n= 7, perimeter = 2-18-25 — 900 = 30°; ‘When m = 98 and = 71, perimeter = 2.98 - 169 = 33124 — 182, ‘Thus all perimeters are squares. 8) By Exercise 16, the perimeter of the primitive Pythagorean triangle generated by m, n is given by P = 2m(m-+n). Therefore, the perimeter of the Pythagorean triangle generated by M, N is given by 2M(M +N) =4m2(mn +n)? = P2, b) To show that (M,N) = 1: Let p be a prime factor of (M,N). Then p|M implies pl2m®; so p = 2 or plm. case 1 Let p =2. Since 21, 2[n?—m®, But 2[m by Exercise 17, Therefore, 2[n. Thus (m,n) > 2 which is a contradiction case 2 Let pim. Then pl(M +N); that is, p|(m-+n)?, so pi(m +n). Then pin, 90 (m,n) > p, again a contradiction, ‘Thus (M,N) = 1 ©) To show that M #.N (mod 2) Clearly, M is even. Since m is even and n oda, it follows that Nis odd. Thus M # N (mod 2). 4) To show that M > N: Sinco m > n, 2m? > 2mn > mn — (m2 — n®); that is, M > N “Thus M, NV generate a primitive Pythagorean triangle with perimeter P2. Yes, since 157 is a primo = 1 (mod 4): 157 = 11 +62 Yes, by Lemma 13.8, since 97 is a prime = 1 (mod 4) and 873 = 32-97: 873-= 12? +278 349 = 18? + 5? 697 = 24? 4 117 1? +16? TA TS = (77 +578? $9?) = (7-B45-3)2 + (7-3—5.8)? = 712 4192 . 293 = 167 + 62 417 40% 12? 4 oF 4 8 y 2? 73 S241 40? = 2084 ITE 4 23-43 = (8? 49 4-24 4 12)(67 44? + 12419) = 30? 48? 4.57 402 2394 = 2-37. 7-19 = 2.3%. (7-19) 2-2-2241 HIF IEP) 2-32. (107 452428 4.22) 3? (12 +1? +0? + 02)(107 4.5? 4.2 + 28) = 9 (16 £97 417 +07) ast 49% 437 408 (Note; 2394 = 40? 4252 +13? +0? also.) 189 38, 59% + 158! = 635318657 = 193 + 134%, Thorofore, 9-158-133-1384 is a solution, 40.174 3 + BVTT. Then r? = 2177 + 52877; so 2177, 528 is a solution. Ad, a =a) = 25,6 = yy = 4, and N = 39, Then, by Exercise 17 in Section 13.4, 2 ay + NBy = 257 439-4? = 1249 t= Bry poy = 4-25 425-4 = 200 ‘Therefore, 1249, 200 is also a solution. Ayah 48, By Exercise 46,0 = 2 =2and B=y, =1, N= . Then, by Exercise 24 in Section 13.4, ay = (a ENG ny +20BNy, = 9-2+10-2 = 38 we = 2afiry + (0? + NP =2-449-1 = 17; 25 = (a? +54)25 + 10e,Pyp = 9-38-+10.2-17 = 682 ys = 2opre + (a? +56? )y=2-2-38-49.17 ‘Thus, 38, 7; and 682, 305 are two new solutions. Supplementary Exercises (». 628) 2. 870 = 39478 40% aT a4 4 4, 333667000 = 333% +. 6679 + 000° 333667001 = 333° + 667° +0017 S14 2-181) 3742-12, ond 17 = 9742.22 501 = 9-11.17 = 239 42-47 = 198 4 2-12 = 742.16 = 19? 42. 107 8. 367 4377 + 38? +39? +40" = 41? 4 40 4 492 4 4a? 20. proof: Let a= n(2n +1). Then we need to show that PH (GF YE HIP He OH m= (etn dP bot (2420)? LHS 4 pee emtezese nen aSe arian ial fa ney (+ 1)n%(2n +1)? +n(2n-41)-m(n 41) + debbie sy) (n+ to? +20. 190 12, 14, 16 18. 2. 24. 26. Rus CHAPTER 13. MISCELLANEOUS NONLINEAR DIOPHANTINE EQUATIONS Met NED + Denton +1)46n41] 20+) 199? 4120 +1) na +2al(n +1) + +04 + (nt nj) (oF)? + (2 b2)? +--+ (nt my] ne Ptah +E] x -S] ne yaa fat AOA , [Bae Dee no ae 9) 6 (2n + (a(4n-+1)—(n+1)] na! 2 420 +n oh sremi(an 4 2n(an4 [ot BEEN] 4 REED 4 1) 1(0n+1)? + 2n2(2n + 1)(3n-+1) , n(2n 4 1)(7n +1) 2 6 7(2n + 1) +6n(3n + 1) + (70 +1) n(n n+) 6 n(n +3) ree on (120? + 120-41) Ls 38° 430? 4 40? ++. 48? = 149? B(L+3-4.6-+10)? = 13 4 39 4 6? 4 109 + 2(14 434 4.64 + 104) 3Q+3-46 410415)? = 194-39 4 6? 4 108 4. 159 42014 4384 64 + 108 4 154) Bat 4 5h = 68 ‘When n= 4: LHS = 4-5\4 (£2)'=2n00 = 1300 + 18700 = 20,000 = LHS Fost wt +1003 2? 4300 +205 my 100 yf + Ev s end Sue + tai)? = a 437 4. 527 + 68? = 867 + 25? 4 342 867 4+ 54 4 31? + 274 + 15? + 45? + 68? Since (n+ 8 +1)? = n(n + 1)(n +2) 41, it follows that w = deHDsMI—48), ap = gnir4anins), RAMON), MKF), ay og grt td is a solution. Appendix A.1 10. 12, M4 16, 18, 20. 2, 24, yes Since n? —n = (n— 1)n(n + 1) Is the product of three consecutive integers, the theorem is trivially: true. Let 2 = 2m+1 and y = 2n+1 be any two odd integers. ‘Then 2-+y = (2m+1)+(2n+1) = 2(m-n-+1), which is an even integer. Let 2 =2m andy integer. 2n be any two even integers. Then zy = (2m)(2n) = 2(2mn), which is an even Let z= 2m-+1 and y= 2n-+1 be any two odd integers. Then 2y = (2m+1)(2n +1) =2k+1, where k= 2mn+ m+n. Therefore, xy is an odd integer. Let 2 = 3k+1. Th +1)? 9K? 4 6k +1 = 3m+4, where m= 3k? 42k. ‘Thus 2? is also of the same form, (a- vb 2 0 a+b-2vab > 0 atb > 2ab ah > ab Let x be any integer. Assume x is not odd; that is, assume is even. Then 2 = 2k for some integer &, Therefore, 2? = 4k? = 2(2K2), which is an even integer Let @ and y be any two integers. Assume none of them is odd. Then both x and y are even. So zy is even, by Exercises 14, Assume V5 is a rational number. Let VS = a/b, whore a and b have no common factors, except 1. ‘Then 5 = a/0? or a? = 5b*. Therefore, ja” and hence 5|a, So a = Se for some integer c, Then 25c? = 5b? or 6? = 5c2. As before, 5/6. Therefore, 5 is a common factor of a and b, a contradiction. Assuine logyg 2is rational number. Lat logyg 2= a/b. Then 2 = 10*/* or 2 = 10°. Since 5|10%, 5}2%, which is a contradiction. ease 1 Let n be an even integer, 2k, ‘Then 2n® 4-3n? +n ~ 2(2k)* + 3(2k)? + 2k = 2(8K° + 6h?+ &), which is an even integer. 191 192 26. 28, 30. 32, 34, 38, APPENDIX A.1 case 2 Let m =2k-+ 1, an odd integer. Then Qn? + 3n? +n 2(2k +1)? +:3(2k +1)? + (2k +1) 2(8K* 4 12K? + Ge + 1) + 34K? 4 4b + 1) + (K-41) 2(8K* + 18k? + 13k +3), which is an even intoger. proof: Choose x = 1. Clearly, 2 proof: Let a be any nonzero integer. Then 17290" = a? 1729 has infinitely many choices, (12a)? = (00}8-+(10a)*, Since ais arbitrary, 6, since [0| = 0 is not positive. 2s a prime, but is not odd. Since a < bh, there is a positive real number 2 such that a+ = b, Similarly, b+ y = ¢, for some positive real number. ‘Then a+2+y = b-+y; that is, a+ («+y) soisz+y. Therefore, a < Since both x and y are positive, Suppose ate 0, this implies a < b 11 = 80, since #(80) ~ 1681 = 41, so 41] (80). Thus f(80) is not a prime.

You might also like