Math 40 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS WARNING: Remember, it s best to rely as little as possible on my solutions. Therefore, I urge you to try the problems on your own first, using as little outside resources as possible and perhaps even timing yourself, before consulting the solutions I ve prepared below. Problem 1. Compute φ(8800), φ(1512), and φ(1000000). SOLUTION: We apply Theorem 7. to calculate these: φ(8800) φ(2 5 5 2 11) 8800(1 1 2 )(1 1 5 )(1 1 11 ) 8800 1 2 4 5 10 11 200. φ(1512) φ(2 7) 1512(1 1 2 )(1 1 )(1 1 7 ) 1512 1 2 2 6 7 42. φ(1000000) φ(2 6 5 6 ) 1000000 (1 1 2 )(1 1 5 ) 1000000 1 2 4 5 400000. Problem 2. (a): Find all values of n such that φ(n) n/6. SOLUTION: From Theorem 7., if the prime factorization of n is n p a1 1 pa2 2 pa k k, (where each a i is a positive integer and all of the p i are distinct primes) then which we set equal to n/6. Thus, we must have φ(n) n(1 1 p 1 )(1 1 p 2 ) (1 1 p k ), 1 6 (1 1 p 1 )(1 1 p 2 ) (1 1 p k ). If we obtain common denominators on the right hand side and then cross multiply, this becomes p 1 p 2 p k 6(p 1 1)(p 2 1) (p k 1). Since the right side contains factors of both 2 and, so must the left side. Thus, assume that p 1 2 and p 2. Then the equation becomes 6p p k 6 (2 1)( 1)(p 1) (p k 1), which simplifies to p p k 2(p 1) (p k 1).
This implies that one of p, p 4,..., p k must be 2, contradicting the assumption that the p i are distinct primes. Thus, we conclude that φ(n) n/6 is impossible. There are no values of n for which this is true. (b): Find at least 5 different numbers n such that φ(n) 160. How many more can you find? SOLUTION: Note that 160 16 10 φ(17) φ(11) φ(187). Likewise, we have We also have And We have also 160 16 10 1 φ(17) φ(11) φ(2) φ(74). 160 4 40 φ(5) φ(41) φ(205). 160 4 40 1 φ(5) φ(41) φ(2) φ(410). 160 4 40 φ(8) φ(41) φ(28). We can find lots more, for example, by finding other integers k relatively prime to 41, such that φ(k) 4, for then φ(41k) 160. (c): What can you say about n if the value of φ(n) is a prime number? SOLUTION: We have seen in Theorem 7.4 that φ(n) must be even for all n. Thus, if φ(n) is prime, we must have φ(n) 2. Write n p a1 1 pa2 2 pa k, so that we deduce that 2 φ(n) n(1 1 p 1 )(1 1 p 2 ) (1 1 p k ). Finding common denominators and cross multiplying, we find that 2p 1 p 2 p k n(p 1 1)(p 2 1) (p k 1) p a1 1 pa2 2 pa k k (p 1 1)(p 2 1) (p k 1) k and so 2 p a1 1 1 p a2 1 2 p a k 1 k (p 1 1)(p 2 1) (p k 1). From this equation, note that no p i can be >. Thus k 2. If k 2, then we may assume that p 1 2 and p 2, which forces a 1 a 2 1, and so n 6. On the other hand, if k 1, then if p 1 2, we have a 1 2, so n 2 2 4. But if p 1, then we have a 1 1, so n. So our conclusion is that n, 4 or 6. Problem. Find all solutions x to the congruence (a): 5x 11 x+1 (mod 1)
SOLUTION: We compute the index on each side of this equation. This gives us 5x ind r () (x + 1) ind r (11) (mod 12). Next, we must choose a primitive root of 1. It is easily seen that 2 is such a primitive root (since its order is 12). So we must find the index (base 2) of and of 11. Since 2 4 (mod 1), ind 2 () 4. And since 2 7 11 (mod 1), ind 2 (11) 7. Plugging these values into the congruence above gives: 20x 7(x + 1) 9x + 7 (mod 12). Thus, 11x 7 (mod 12). Thus, x 7 5 (mod 12). So we have x 5, 17, 29,.... (b): 5x 2 18 (mod 7) SOLUTION: Let us start by multiplying the congruence through by the multiplicative inverse of 5. From the Euclidean Algorithm, we see that this inverse is 15. Multiplying through by 15, the congruence becomes x 2 11 (mod 7). We compute the index on each side of the equation: 2 ind r (x) ind r (11) (mod 6). Again we see that a primitive root is r 2 (this can be checked from Table 1 of the text, for instance). Using a TI-92, we find that ind 2 (11) 0. So we have 2 ind 2 (x) 0 (mod 6). Using the Euclidean Algorithm, we find that the multiplicative inverse of 2 (mod 6) is 11, so we multiply the previous equation by that: So This generates all solutions for x. ind 2 (x) 6 (mod 6). x 2 6 64 27 (mod 7). Problem 4. Decode the following message, which was sent using the modulus n 7081 and the exponent e 1789: 5192 2604 4222 SOLUTION: We factor 7081 7 97. So we must find the decryption key d from the fact that ed 1 (mod 72 96 6912)
Using the Euclidean Algorithm, we find that d 85 (mod 6912). So we must find C 85 (mod 7081) to recover the original message. We have 5192 85 1615 (mod 7081) 2604 85 282 (mod 7081) 4222 85 110 (mod 7081). So the original message (in numeric form) is 1615 282 110. Problem 5. Does the congruence x 2 + 14x 5 0 ( mod 7) have a solution? What about the congruence x 2 x 1 0 ( mod 1957) SOLUTION: In converting the quadratic congruence to the form y 2 d (mod p), we must simply determine whether d is a quadratic residue modulo p or not, where d b 2 4ac. In the first equation, a 1, b 14, c 5, so d 14 2 4(1)( 5) 6. So we must compute ( ) 6 7 so the quadratic congruence does have a solution. ( ) 1 7 In the latter case, we have d b 2 4ac ( ) 2 4(1)( 1) 1, so we must compute ( ) ( ) ( ) ( ) ( ) 1 1957 1 1 1, 1957 1 1 so this quadratic congruence also has a solution. Problem 6. Compute the following Legendre symbols (see if you can derive them in several ways!): (a): ( ) 72 29 1, SOLUTION: We have ( ) ( ) 72 2 1, 29 29 according to Theorem 9.6. (b): ( ) 60 79 SOLUTION: We have ( ) ( ) 60 15 79 79 ( ) ( ) 5 [ 79 79 ( ) 79 ] ( ) 79 [ 5 ( ) 1 ] ( ) 1 1 1 1. 5
(c): ( ) 6 11 SOLUTION: We have ( ) ( ) 6 7 11 11 (d): ( ) 55 179 SOLUTION: We have ( ) ( ) ( ) 55 5 11 179 179 179 ( 179 5 ) [ ( ) 179 ] 11 ( ) 11 7 ( ) 1 1. 7 ( ) ( ) 1 [ ] 5 11 ( ) 11 ( ) 2 1. (e): ( ) 760 SOLUTION: We have ( ) 760 ( 1 ) ( ) 121 ( ) ( ) ( ) 1 7 1 121 121 ( 1 ( 1 ) ( 121 7 ) ( ) ( ) ( ) 91 121 1 121 ) ( ) 121 1 ( ) ( ) 2 4 1. 7 1 Problem 7. Find all positive integers less than 89 having order 11, modulo 89. Repeat for order 4. SOLUTION: We begin by trying to find a primitive root of 89, which would be an integer r with order φ(89) 88. Note that 2 11 1 (mod 89), so 2 is not a primitive root of 89. However, it can be quickly checked that if we raise to the powers 1,2,4,8,11,22, and 44, none of them is 1 (mod 89), and hence is a primitive root. So any element of order 11 would have the form h, such that 88 gcd(h, 88) 11. Hence, we must have gcd(h, 88) 8, which means that we must have h 8, 16, 24, 2, 40, 48, 56, 64, 72, 80. So the integers less than 89 having order 11 modulo 89 are 8, 16, 24, 2, 40, 48, 56, 64, 72, 80, which can all be reduced modulo 89 to give us integers < 89. For order 4, we are simply asking for gcd(h, 88) 22, which requires h 22 or h 66. Thus, 22 and 66 reduce modulo 89 to integers < 89 with order 4. Problem 8. Prove that if p > 5 is prime, then the product of all primitive roots of p is congruent to 1 modulo p. [Hint: How many primitive roots does p have?]
SOLUTION: All primitive roots of p can be written in the form r k, where r is a fixed primitive root and k is an exponent that is relatively prime with p 1. So we are asked to compute the product r k r {k:gcd(k,p 1)1}, {k:gcd(k,p 1)1} and, modulo p 1, the sum in the previous exponent is 0 (since gcd(k, p 1) gcd( k, p 1) gcd(p 1 k, p 1), so these terms cancel out, modulo p 1). That is, the power of r that appears as a summation is a multiple of p 1. Since we already know that r p 1 1 (mod p), we know also that r {k:gcd(k,p 1)1} 1 (mod p), as desired. [NOTE: Try this one out for p 11 or p 1 directly to help you see what s going on!] Problem 9. Prove that if p (mod 4) and a is a quadratic residue of p, then x a (p+1)/4 is a solution to the congruence x 2 a ( mod p). SOLUTION: Write p 4k + for some integer k. Then if we let x a (p+1)/4, we have x 2 a (p+1)/2 a (4k+4)/2 a 2k+2 a a 2k+1 a a (p 1)/2 a ( mod p), where we have used the fact that a (p 1)/2 1 (mod p) by Euler s Criterion for a quadratic residue. Problem 10. Suppose that q is a prime number that is congruent to 1 modulo 4, and suppose that the number p 2q + 1 is also a prime number. Show that 2 is a primitive root modulo p. SOLUTION: Write q 4k + 1 for some integer k. Then p 2q + 1 2(4k + 1) + 1 8k +. We wish to show that 2 has order p 1 2q, modulo p. Suppose, to the contrary, that 2 has order < 2q, modulo p. Then the order of 2 is either 1, 2 or q. But 2 1 1 (mod p) and 2 2 1 (mod p), since p 11 (since q 5). Finally, suppose that 2 has order q (mod p). Then 1 2 q 2 (p 1)/2 (mod p), which implies by Euler s Criterion that 2 is a quadratic residue of p. That is, ( ) 2 1. p However, by Theorem 9.6, we know that since p has the form 8k +, ( ) 2 1. p So we have reached a contradiction in this case as well. We conclude that 2 has order 2q, and hence is a primitive root of p.
Problem 11. If a and b satisfy the relation ab 1 (mod p), how are the indices ind r (a) and ind r (b) related? SOLUTION: Taking the index ind r of both sides of the congruence yields or which means that ind r (ab) ind r (1) (mod p 1 ), ind r (a) + ind r (b) 0 (mod p 1 ), ind r (a) ind r (b) (mod p 1 ). Problem 12. In a lengthy ciphertext message, sent using a linear cipher C ap + b (mod 26), the most frequently occurring letter is Q and the second most frequent is J. Write out the plaintext for the intercepted message WCPQ JZQO MX. SOLUTION: The answer is GIVE THEM UP.