Solutions to Exam 1 Problem 1. a) State Fermat s Little Theorem and Euler s Theorem. b) Let m, n be relatively rime ositive integers. Prove that m φ(n) + n φ(m) 1 (mod mn). c) Find the remainder of 1 008 uon division by 6. Solution: a) Fermat s Little Theorem: Let be a rime. Then for any integer a not divisible by. a 1 1 (mod ) Euler s Theorem: Let n be a ositive integer. Then for any integer a relatively rime to n. a φ(n) 1 (mod n) b) By Euler s Theorem, m φ(n) 1 (mod n). Clearly n φ(n) 0 (mod n). Thus m φ(n) + n φ(n) 1 (mod n). Similarly, n φ(m) 1 (mod m) and m φ(m) 0 (mod m) so m φ(n) + n φ(n) 1 (mod m). In other words, m φ(n) + n φ(n) 1 is divisible by both m and n. Since m and n are relatively rime, we conclude that m φ(n) +n φ(n) 1 is divisible by mn, i.e. m φ(n) +n φ(n) 1 (mod mn). c) Note that (1, 6) 1. Thus 1 φ(6) 1 (mod 6) by Euler s Theorem. Now 6, so φ(6) 1. Therefore 1 1 1 (mod 6). Observe that 008 1 167+4, so 1 008 (1 1 ) 167 4 1 4 (mod 6). Thus it suffices to find the remainder of 1 4 uon division by 6. Since 1 (mod 6), we have 1 ( ) 11 (mod 6), and 1 4 ( 11) 11 (mod 6). The reminder in question is therefore equal to. Problem. a) State Chinese Remainder Theorem. b) Find all ositive integers smaller than 00 which leave remainder 1,, 4 uon division by,, 7 resectively. Show your work. 1
Solution: a) Chinese Remainder Theorem: Let n 1,..., n k be airwise relatively rime ositive integers and let N n 1 n... n k. Given any integers a 1,..., a k, the system of congruences x a i (mod n i ), i 1,,..., k, has unique solution x such that 0 x < N. Moreover, an integer y satisfies these congruences iff N (x y) (so all integers satisfying the congruences are given by x + mn, m Z). b) The roblem asks us to find all integers x such that 0 < x < 00 and x 1 (mod ), x (mod ), x 4 (mod 7). In order to find a solution to these congruences, we follow the algorithm. We have N 7 10, N 1, N 1, N 1. We solve N 1 x 1 1 (mod ), i.e. x 1 1 (mod ), which has a solution x 1. Next we solve N x (mod ), i.e. x (mod ), which has a solution x. Finally, we solve N x 4 (mod 7), i.e. x 4 (mod 7), which has a solution x 4. A solution is given by x N 1 x 1 +N x +N x 70+6+60 19. The smallest ositive solution is then 19 10 88 and all solutions are given by the formula x 88 + 10m, m Z. We get a ositive solution smaller than 00 only for m 0, 1, so 88 and 19 are the only solutions to our roblem. Problem. a) Define (a, b). Using Euclid s algorithm comute (889, 168) and find x, y Z such that (889, 168) x 889 + y 168 (check your answer!). b) Let a be an integer. Prove that (a +, 7a + 1) 1. Hint: If d u and d w then d su + tw for any integers s, t. Solution: a) gcd(a, b) is the largest ositive integer which divides both a and b. It is called the greatest common divisor of a and b. Euclid s algorithm yields: 889 168 + 49, 168 49 + 1, 49 1 + 7, 1 7 + 0. It follows that gcd(889, 168) 7. Working backwards, 7 49 1 49 (168 49) 7 49 168 7 (889 168) 168 7 889 7 168. Thus x 7, y 7 work. b) Note that (7a + 1) + ( 7)(a + ) 1. Thus any common divisor of a + and 7a + 1 must divide 1. It follows that gcd(a +, 7a + 1) 1. Problem 4. Solve the following congruences a) 18x 1 (mod 8) b) x + x 4 0 (mod 17)
Solution: a) Using Euclid s algorithm we find that (18, 8). Thus the congruence 18x 1 (mod 8) has two solutions modulo 8, given by x x 0 (mod 8) or x x 0 + 14 (mod 8), where x 0 is any articular solution. To find a articular solution, we work the Euclid s algorithm backwards to get 8 + ( ) 18. Multilying by 6, we see that 1 1 8 18 18 18 ( 18) (mod 8). Thus x 0 18 is a articular solution so the solutions are x 18 (mod 8) or x 4 (mod 8), which can be written as x 10 (mod 8) or x 4 (mod 8). b) Note that 6 18 1 (mod 17), i.e. 6 is the inverse of modulo 17. We multily our congruence by 6 and get 18x + 1x 4 0 (mod 17), i.e. x + 1x 7 0 (mod 17). Now we comlete to squares: x + 1x 7 (x + 6) 6 7 (x + 6) 9 (mod 17). Thus (x + 6) 9 (mod 17) and therefore x + 6 (mod 17) or x + 6 (mod 17). Equivalently, x 14 (mod 17) or x 9 8 (mod 17). Problem. a) Define the Legendre symbol a (state clearly all assumtions) and state its roerties. b) Is 91 a quadratic residue modulo 17? Justify your answer. Solution: a) An integer a is called a quadratic residue modulo a rime if a and a x (mod ) for some integer x. An integer a is called a quadratic non-residue modulo a rime if there is no integer x such that a( x (mod ). When is an odd rime and a then we define the Legendre symbol a ) as follows { a 1 if a is a quadratic residue modulo ; 1 if a is a quadratic non-residue modulo. Legendre symbol has the following roerties. ( 1. If a b (mod ) then a ) b.. a 1 for any integer a relatively rime to. (. ab a b ) for any integers a, b relatively rime to. ) (mod ). ( 4. Euler s Criterion: a ( 1)/ a { 1 if 1, 7 (mod 8) ;. ( ) 1 if, (mod 8). and 1 { 1 if 1 (mod 4) ; 1 if (mod 4). 6. Qadratic Recirocity: If and q are distinct odd rime numbers then ( q q if q (mod 4) ; ) ( q) if at least one of, q is 1 (mod 4).
b) Note that 91 6 (mod 17). Thus, by roerties 1,, we have 91 6 1 6 1 1. 17 17 17 17 17 Thus 91 is not a quadratic residue modulo 17. Second method. Note that 91 7. We use the quadratic recirocity: 91 7 17 17 1 10 17 17 17 7 7 Thus 91 is not a quadratic residue modulo 17. 1. ( ) Problem 6. a) Define a rimitive root modulo m. Prove that is a rimitive root modulo. b) Show that if (a,77) 1 then 77 divides a 0 1. c) Is there a rimitive root modulo 77? Exlain your answer. Solution: a) A rimitive root modulo m is any integer a such that ord m a φ(m). In other words, a is a rimitive root modulo m if a φ(m) 1 (mod m) and a k 1 (mod m) for 1 k < φ(m). We have φ() φ( ) 4 0. Thus, the order of modulo is a divisor of 0, so it can be 1,, 4,, 10 or 0. By insection, we check that 0 is the smallest among these exonents which works. Thus the order of modulo is equal to 0 and therefore is a rimitive root modulo. b) Note that 77 7 11. If (a,77) 1 then (a,7) 1 (a,11). Thus, by Fermat s Little Theorem, we have a 6 1 (mod 7) and a 10 1 (mod 11). Raising both sides of the first congruence to the ower and both sides of the second to the ower we get a 0 1 (mod 7) and a 0 1 (mod 11). Since (7, 11) 1, we conclude that a 0 1 (mod 77). c) Note that φ(77) φ(7 11) 6 10 60. If a were a rimitive root modulo 77 then ord 77 a 60. However, we know by art b) that a 0 1 (mod 77), so ord 77 a 0 and therefore the order cannot be 60. This roves that there does not exist a rimitive root modulo 77. Problem 7. Prove that n 1 n (mod 0) for every integer n. Solution: Let us note that if is a rime then n k( 1)+1 n (mod ) for any integer n and any k > 0. In fact, if n then both sides are 0 (mod ) and if n then Femrat s Little Theorem tells us that n 1 1 (mod ) so n k( 1)+1 (n 1 ) k n n (mod ). 4
We aly this observation to,,. Since 1 0 ( 1) + 1 10 ( 1) + 1 ( 1) + 1, we have n 1 n (mod ), n 1 n (mod ), n 1 n (mod ). In other words, n 1 n is divisible by, and and since these numbers are airwise relatively rime, n 1 n is divisible by their roduct 0, i.e. n 1 n (mod 0) Problem 8. Let be a rime such that (mod ). Prove that the equation x a (mod ) is solvable for every integer a. Solution: Let g be a rimitive root modulo. If a then x 0 is a solution. If (a, ) 1 then a g k (mod ) for some k. We would like to find m > 0 such that g k g m (mod ). Then x g m is a solution. Since the order of g modulo is 1, we have g k g m (mod ) iff ( 1) (k m), i.e. k m (mod 1). Since (mod ), we have ( 1, ) 1 and therefore for any k there is an m such that k m (mod 1). Clerly we can choose such m ositive, and then x g m is a solution. Problem 9. Let be an odd rime such that a + b for some integers a, b relatively rime to. Prove that 1 (mod 4) Solution: We have a b (mod ). Raising both sides to the ower ( 1)/ we get a 1 ( 1) ( 1)/ b 1 (mod ). Since a 1 1 b 1 (mod ) by Fermat s Little Theorem, we see that 1 ( 1) ( 1)/ (mod ). This imlies that 1 ( 1) ( 1)/, which holds if and only if 1 (mod 4). Second solution: We have a b (mod ). Since a, b are not divisible by, we can use Legendre symbol: By roerty, a b 1 ( 1 ) b 1 1 if and only if 1 (mod 4). 1.