Practice Final Solutions 1. Find integers x and y such that 13x + 1y 1 SOLUTION: By the Euclidean algorithm: One can work backwards to obtain 1 1 13 + 2 13 6 2 + 1 1 13 6 2 13 6 (1 1 13) 7 13 6 1 Hence one can take x 7 and y 6. 2. (a) Let i 1. Show that is an integer. 10 i 1 9 SOLUTION: 10 i 1 1 i 1 0 mod 9. (b) Let 2, 3, be a rime number. Show that divides 10 1 1 9 SOLUTION: Since for 2, the number 10 is co-rime to it follows from Fermat s little theorem that 10 1 1 0 mod Since 3 it follows that actually divides 10 1 1 9. (c) Show that every rime 2, 3, divides a number of the form 11 1 1
SOLUTION: where there are 1 digits of 1 s. 10 1 1 9 11 1 3. Let be an odd rime. Find a formula for the Legendre symbol ( ) 2 SOLUTION: One has ( ) 2 ( 1 ) ( ) 2 Let us find a formula for when this is equal to 1. The two cases are 1 1 1 and ( 1) ( 1) 1. The first is the case if 1 mod 4 and ±1 mod 8. This means that one needs 1 mod 8. The second is the case if 3 mod 4 and 3 or mod 8. This means that 3 mod 8. Hence if and only if 1 or 3 mod 8. ( ) 2 1 4. Let 1 mod 4 be a rime and a a quadratic residue mod. Decide with justification if then automatically a is quadratic residue mod. SOLUTION: Since a a mod it suffices to decide if a is a quadratic residue. But ( ) ( ) ( ) a 1 a ( 1) ( 1)/2 1 1 since a is a quadratic residue and 1 mod 4.. (a) Calculate φ(7!). SOLUTION: Note that 7! 1 2 3 2 2 2 3 7 2 4 3 2 7 Hence φ(7!) φ(2 4 )φ(3 2 )φ()φ(7) 2 3 3 2 4 6 2 7 3 2 (b) Suose and q are twin rimes, i.e. q + 2. Show that φ(q) φ() + 2 2
SOLUTION: Since and q are rimes one has φ(q) q 1 + 2 1 ( 1) + 2 φ() + 2 (c) Suose n 2 2e Find ν(n) and σ(n). SOLUTION: ν(n) 2 e + 1 σ(n) 2 2e +1 1 6. Find the least non-negative residue of 3 2011 modulo 22. SOLUTION: Note that φ(22) 10. Therefore, since 3 is co-rime to 22 it follows from Euler s theorem 3 2011 (3 201 ) 10 3 3 mod 22 Hence the answer is 3. 7. Suose is rime and n 2 and a 2 1 mod n. Show that ord n a 2 if and only if a 1 mod n. SOLUTION: Since a 2 1 mod n it follows that the order of a divides 2. It is hence one of 1,, 2 since is a rime. It is then clear that the order is 2 recisely when a 1 mod n. 8. Let n 1. Find SOLUTION: Note that gcd(n, 2n 2 + 1) (2n 2 + 1) 2n n 1 It follows that the gcd is 1. 9. Find the collection of all integers that are of the form ord 11 (a) where a ranges through the integers co-rime to 11. SOLUTION: Note that 11 is a rime so there is a rimitive root b and every a co-rime to 11 is of the form b i. The order of b is 10 2 3 2. Since ord(b i ) ord(b)/gcd(i, ord(b)) it follows that the set of orders is the set of divisors of 10. This set is {1, 2, 3,, 6, 10, 1, 30, 2, 0, 7, 10} 3
10. (a) State the Mobius inversion formula. (b) Show that for all n 1 one has ν(d)µ(n/d) 1 d n SOLUTION: Let By Mobius inversion one has But one also has Hence and hence and hence f ν µ ν f 1 ν 1 1 (f 1) µ (1 1) µ f δ 1 δ f 1 and this imlies the desired result. 11. (a) Find all rimitive roots modulo 13. SOLUTION: There are φ(φ(13)) φ(12) 4 rimitive roots (mod 1)3. We check and find that 2 is a rimitive root, meaning its order is 12 mod 13. Hence, if i is relatively rime to 12, 2 i is also of order 12. Thus 2, 2 7, and 2 1 1 are also rimitive roots, and these are 6, 11, 7 (mod 1)3. Thus we have found all 4 rimitive roots, and they are 2, 6, 11, 7. (b) How many rimitive roots are there modulo 171? SOLUTION: 171 is 9 19, and by the rimitive root theorem there are no rimitive roots modulo a number of this form (since it is not a ower of a rime, or twice the ower of a rime). (c) How many rimitive roots are there modulo 173? SOLUTION: 173 is rime, so there are φ(φ(173)) φ(172) φ(4 43) 2 42 84 rimitive roots (mod 1)73. 12. How many rimitive roots are there modulo 12 100? SOLUTION: None: by the Primitive Root Theorem, only modulo numbers of the form 4
1, 2, 4, m, and 2 m where is an odd rime and m 1 is an integer can one have a rimitive root. 13. Find the order of 12 modulo 2. SOLUTION: This order must divide φ(2) 20, so it can only be 2, 4,, 10, or 20. Taking these owers of 12 modulo 2, we get that 12 is in fact a rimitive root (mod 2), and so its order is 20. 14. Write down the continued fraction exansion for 29. Find its first five convergents. SOLUTION: 29, so the first term of the exansion is. 1 29 + 2. 29 4 29 + 4 4 29 + 12 29 + 3 1/( 2) 1. 4 29 3 20 29 + 3 29 + 10 29 + 2 1/( 1) 1. 29 2 2 29 + 2 29 + 1 29 + 3 1/( 1) 2. 29 3 20 4 29 + 3 4 4 29 + 20 1/( 2) 29 + 10. 4 29 4 1 2 29 from before. Clearly, from now on the terms will reeat the eriod 2, 1, 1, 2, 10, so the continued fraction exansion is 29 [, 2, 1, 1, 2, 10].
The first five convergents are which are, 11/2, 16/3, 27/, 70/13., [, 2], [, 2, 1], [, 2, 1, 1], [, 2, 1, 1, 2], 1. Which quadratic number does the continued fraction [4, 2, 1] corresond to? SOLUTION: First we note that if β [2, 1], then β 2 + 1 1 + 1, β so, so 1 2 β + 1 β + 1 β 2 + β 2β + 2 + β 3β + 2, and so β 2 2β 2 0, meaning β 2 + 4 + 8 2 or β 2 4 + 8 2 It cannot be the latter, as it is ositive, so β 1 + 3. Now, we have [4, 2, 1] 4 + 1 β 4 + 1 3 1 3 + 7 1 + 3 4 +. 2 2 16. Find two continued fraction exansions for 13. Are there others? Why or why not? SOLUTION: Run the Euclidean algorithm on (13, ) and get 13 2 + 3 1 3 + 2 3 1 2 + 1 2 2 1. Thus one continued fraction exansion of 13/ is [2, 1, 1, 2], and another is [2, 1, 1, 1, 1], since 1/2 1/(1 + 1/1). These are the only two exansions, since rational numbers always have exactly two exansions, as roven on the homework. 17. Show that 042 2911 is a convergent of 3 1.73200807.... 6
This isn t a great ractice roblem, because its best done with a calculator. comute 3 042 2911, this is If you 0.000000034066 < 1 2(2911) 2 0.0000000900, and so this must be a convergent by a theorem shown in class. 18. Which of the following can be written as a sum of two squares? A sum of three squares? Four squares? (a) 39470 (b) (c) 3478 (d) 12! (e) A number of the form 2 + 2, where is a rime. SOLUTION: For the first three of these, one first writes down the rime factorizations: they are 2 3947, 41 271, 2 3 2 17 113. All of these contain rimes in the rime factorization which are 3 mod 4 but not taken to an even ower, so none are sums of two squares. Also, 3 is a rime divisor of 12!, but it divides 12! exactly u to the fifth ower, which is not even, and hence 12! is also not a sum of two squares. Finally, for the last examle, if is even, 2 + 2 6 which is not a sum of two squares, and 2 + 2 3 (mod 4) if is odd, so this is never a sum of two squares. Now we check for sums of three squares. The only numbers not exressible as sums of three squares are of the form 4 m (8n + 7). None of the first three examles are divisible by a ower of 4, so we just check them mod 8. The first examle is even mod 8, the second examle is 3 mod 8, so it can be written as a sum of three squares. The third examle is again even mod 8, and so it also can be written as a sum of three squares. The fourth examle is 4 3 2 7 11, where 3 2 7 11 is 7 mod 8, so it cannot be written as a sum of three squares. The last examle can always be written as 2 + 1 2 + 1 2. All of these can be written as a sum of four squares, since all integers can be. 19. Suose x Z >0 can be written as a sum of two squares. What is the necessary and sufficient condition on y Z >0 for xy to be exressible as a sum of two squares? SOLUTION: The necessary and sufficient condition is that y is a sum of two squares. It is sufficient because the roduct of two integers that are sums of two squares is also a sum of two squares. To see that it is necessary, suose y cannot be written as a sum of two squares, but x can. FIrst of all, this means that there is a rime that is 3 7
mod 4 and such that the highest ower of dividing y is an odd ower. Second of all, whenever is such a rime, the highest ower of dividing x is even (maybe 0). So the highest ower of dividing xy is odd, and so xy cannot be written as a sum of two squares. 20. Show that the area of any right triangle with all integer sides is divisible by 6. SOLUTION: Given the arametrization of rimitive Pythagorean triles (x, y, z), we have that x m 2 n 2, y 2mn, z m + n 2 for some integers m, n which are relatively rime, and such that exactly one of them is even. Since one of them is even, y is divisible by 4. Suose m is even, n is odd, and neither is divisible by 3. Then both m 2 and n 2 have to be 1 mod 3, and so x is divisible by 3, and the area, xy/2, is divisible by 12/2 6. If one of m, n is divisible by 3, then y is divisible by 12 and so the area is divisible by 6. 8