MATH 304: MIDTERM EXAM SOLUTIONS [The problems are each worth five poits, except for problem 8, which is worth 8 poits. Thus there are 43 possible poits.] 1. Use the Euclidea algorithm to fid the greatest commo divisor of 746 ad 464. 746 3 464 + 70 464 35 70 + 14 70 5 14 + 0 The last ozero remaider is the greatest commo divisor of the iitial pair, so GCD746, 46) 14.. How may of the itegers betwee 0 ad 600 are relatively prime to 600? By defiitio, the Euler φ-fuctio of is the umber of umbers betwee 0 ad that are relatively prime to. Usig the fact that φm ) φm)φ) wheever GCDm, ) 1, ad that for prime powers φp e ) p e p e 1, we compute that: φ600) φ 3 3 5 ) φ 3 )φ3)φ5 ) 3 )3 3 0 )5 5) 4 0 160. Therefore there are 160 umbers betwee 0 ad 600 that are relatively prime to 600. 3. Fid the remaider whe 3 39 is divided by 1. By Fermat s little theorem with p 7, we have the cogruece: 3 39 3 6 6+3 3 6 ) 6 3 3 1 6 3 3 6 mod 7). O the other had, 3 clearly divides the differece 3 39 6 as well. product 1 3 7 also divides the differece, so we have: Therefore the 3 39 6 mod 1). It follows that whe you divide 3 39 by 1 the remaider is 6. 4. Suppose that a 4 1 mod 19). What are the possible orders of a modulo 19? By the order divisibility property, if a k 1 mod 19), the the order of a modulo 19 must divide k. I our situatio where k 4, this meas that the order of a must be oe of the followig umbers: e p a) 1,, 3, 4, 6, 1, 4.
O the other had, by Fermat s little theorem a 18 1 mod 19). Thus by the order divisibility property agai, the order of a modulo 19 must divide 18, ad thus must be oe of the followig umbers: e p a) 1,, 3, 6, 9, 18. The umbers that occur i both lists are the possible values for the order of a modulo 19: e p a) 1,, 3, 6. 5. Do there exist iteger solutios x, y to the equatio 36x + 56y 1? Explai your reasoig. Recall that the smallest positive iteger that ca be writte as a liear combiatio ax + by of a ad b is the greatest commo divisor GCDa, b). I our situatio, we have GCD36, 56) 4, so there exist itegers x 0 ad y 0 such that 36x 0 + 56y 0 4. Multiplyig by 3, we see that x, y) 3x 0, 3y 0 ) is a iteger solutio to the give equatio: 363x 0 ) + 563y 0 ) 3 4 1. I fact, x 0, y 0 ) 11, 7) are solutios to the first equatio, so x, y) 33, 1) are solutios to the desired equatio. But you DON T eed to fid a solutio to aswer the give questio!) 6. Let p be a prime umber ad let x ad y be itegers. Prove that x + y) p x p + y p Let z be a iteger. If p divides z, the z p z mod p) is true because p divides both sides. O the other had, if p does ot divide z, the z p z mod p) holds by Fermat s little theorem. This shows that z p z mod p) is is always true. Applyig this fact i the cases z x + y, z x ad z y, we see that: x + y) p x + y x p + y p Remark: we proved this fact affectioately called the freshma s dream because the equatio x + y) x + y is a commo bit of wishful thikig amog the youg) usig Fermat s little theorem. But i fact, we could have doe thigs i the opposite order! That is, there is a proof that does ot rely o Fermat s little theorem, ad the we ca prove Fermat s little theorem usig this fact. Here s how this goes.
The biomial coefficiet proouced choose k ) is the umber of ways of choosig k uordered) objects from a collectio of objects. Oe ca show that: )! k k!!. So i particular this fractio is a iteger!) Cosider the expressio x + y). I the fial product, the coefficiet of y k is exactly the umber of ways to choose k of the differet terms x + y) to take a factor of y from. It follows that: ) ) ) ) x + y) x + x 1 y + x y + x y + xy 1 + y 1 1 i0 i ) x i y i. Notice that by the symmetry of this expressio i x ad y, this argumet shows that, a fact which is also apparet from the formula ) k!.) k!! Now, we wish to use this formula i the case where p is a prime umber. The key fact is that p divides p whe 1 k p 1. To prove this, otice that p does ot divide either k! or p!, sice each term i these products is less tha p ad hece relatively prime to p. It follows that i the fractio ) p p! k k!p!, there is o factor of p i the deomiator. Sice there is a factor of p i the umerator, it follows that p divides the whole expressio. This proves that p divides p whe 1 k p 1. It follows that i the biomial expasio x + y) p p i0 ) p x p i y i, i all terms are divisible by p except for the summads correspodig to i 0 ad i p. Therefore, x + y) p x p + y p mod p) as claimed. Here is the proof of Fermat s little theorem startig from the freshma s dream. We will prove that a p a mod p) for all positive itegers a by iductio o a. It is clearly true for a 1. Assume iductively that the statemet holds for the iteger a 1. By the freshma s dream, a p a 1) + 1) p a 1) p + 1 p a 1) p + 1 O the other had, a 1) p a 1 by the iductive hypothesis. It follows that a p a 1) + 1 a
Havig proved the geeral statemet, we ca derive Fermat s little theorem by takig a relatively prime to p. I this case, we may divide p from both sides of the cogruece, yieldig a p 1 1 Thus cocludes our alterative proof of Fermat s little theorem. 7. Let p be a odd prime umber ad suppose that g ad g are both primitive roots modulo p. Prove that their product gg is ot a primitive root modulo p. Sice p is odd, the fractio p 1 is a iteger. I claim that for a primitive root g, g p 1)/ 1 To see this, write x g p 1)/, ad otice that x g p 1)/ ) g p 1) 1 Therefore, x ±1 Sice g is a primitive root, it caot be the case that x g p 1)/ 1 It follows that g p 1)/ 1 Applyig this argumet for both of the primitive roots g ad g, we see that: gg ) p 1)/ g p 1)/ g p 1)/ 1) 1) 1 This is a istace of a cogruece g k 1 mod p) with k < p 1, which shows that gg is ot a primitive root. 8. a) Let p be a prime umber ad let g be a primitive root mod p. Show that p 1)! g pp 1)/ Sice g is a primitive root, the residue classes g, g, g 3,..., g p 1 mod p) are all distict. Hece the above list of residue classes is the same as the list 1,,..., p 1 mod p), but i a differet order. Takig the product of all residue classes i the list, we see that: p 1)! g g g p 1 g 1++3+ +p 1) Usig the idetity 1 + + 3 + + k k i i1 k + 1)k
with k p 1, we coclude that: as desired. b) Use part a) to deduce that p 1)! g 1++3+ +p 1) g pp 1) mod p), p 1)! 1 [Note: to receive credit o this problem, you must prove the result usig part a). It is ot fair to just quote the HW where you proved this i a differet way!] If p, the so the cogruece holds. p 1)! 1! 1 1 mod ), Now assume that p is odd. By the proof give i problem 7, we kow that g p 1)/ 1 Applyig part a), we have: p 1)! g pp 1) g p 1)/) p 1) p We kow that 1) p 1 because p is odd. Therefore, p 1)! 1