MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005 Deartment of Mathematical and Statistical Sciences University of Alberta Question 1. Find integers x and y such that 314x + 159y = 1. Solution: Using the Euclidean algorithm to find the greatest common divisor of a = 314 and b = 159, we have and the last nonzero remainder is (314, 159) = 1. Working from the bottom u, we have 1 = 4 3 314 = 1 159 + 155 159 = 1 155 + 4 155 = 38 4 + 3 4 = 1 3 + 1 3 = 3 1 + 0 = 4 (155 38 4) = 39 4 155 = 39 (159 155) 155 = 39 159 40 155 = 39 159 40(314 159) = ( 40) 314 + 79 159 and therefore, 1 = ( 40) 314 + 79 159, and one solution is x = 40, y = 79. Question 2. Let n be a comosite ositive integer and let be the smallest rime divisor of n. Show that if > n 1/3, then n/ is rime. Solution: Suose > n 1/3 and that n/ is comosite, so that n = a b, where 1 < a, b < n. Let q and r be any rime divisors of a and b, resectively, then q and r are also rime divisors of n, so that q and r. This imlies that 3 q r a b = n, that is, n 1/3, which is a contradiction. Therefore, n/ is rime.
Question 3. Find all ositive solutions in integers to the system of linear equations x + y + z = 31 2x + 2y + 3z = 41. Solution: Solving the first equation, we get the two-arameter family of solutions x = 31 t, y = t s, z = s for s, t Z. Since this must also be a solution of the second equation, we must have 2(31 t) + 2(t s) + 3s = 41, that is, s = 21. Therefore, there are no ositive solutions to the given system. Question 4. Prove or disrove that if a 2 b 2 (mod m), then a b (mod m) or a b (mod m). Solution: The statement is false, as can be seen by taking m = 24, a = 8 and b = 4, then a 2 8 2 64 16 4 2 b 2 (mod 24), but 8 4 (mod 24). Question 5. Find all ositive integers m such that 1066 1776 (mod m). Solution: We only need find all ositive divisors of 1776 1066 = 710, and these are 1, 2, 5, 10, 71, 142, 355, 710. Question 6. Show that the difference of two consecutive cubes is never divisible by 5. Solution: For any integer n, we have (n + 1) 3 n 3 = 3n(n + 1) + 1, and it is easily seen that n(n + 1) is congruent to 0, 1, or 2 modulo 5, so that (n + 1) 3 n 3 can only be congruent to 1, 2, or 4 modulo 5. Question 7. Find the smallest odd integer n, with n > 3, such that 3 n, 5 n + 2, and 7 n + 4. Solution: We have to solve the simultaneous congruences n 3 (mod 3) n 3 (mod 5) n 3 (mod 7) and since 3, 5, and 7 are airwise relatively rime, their smallest common multile is 3 5 7 = 105, and we may take n = 3 + 105 = 108.
Question 8. (a) Find a ositive integer n such that 3 2 n, 4 2 n + 1, and 5 2 n + 2. (b) Can you find a ositive integer n such that 2 2 n, 3 2 n + 1, and 4 2 n + 2. Solution: (a) We solve the following simultaneous congruences using the Chinese remainder theorem: n 0 (mod 9) n 1 15 (mod 16) n 2 23 (mod 25). Here a 1 = 0, a 2 = 15, a 3 = 23 m 1 = 9, m 2 = 16, m 3 = 25, and M 1 = 16 25 = 400, M 2 = 9 25 = 225, M 3 = 9 16 = 144. Also, solving the congrences M 1 y 1 1 (mod m 1 ) M 2 y 2 1 (mod m 2 ) M 3 y 3 1 (mod m 3 ) for the inverses y 1, y 2, and y 3, we have y 1 7 (mod 9), y 2 1 (mod 16), y 3 4 (mod 25), and the unique solution modulo 9 16 25 is given by n = a 1 M 1 y 1 + a 2 M 2 y 2 + a 3 M 3 y 3 = 15 225 1 + 23 144 4 = 3375 + 13248 = 16623. (b) There does not exist a ositive integer n such that 2 2 n, 3 2 n + 1, and 4 2 n + 2, since if such an n existed, then we would have 4 n and 16 n + 2, however, this imlies that 4 n + 2 n = 2, which is a contradiction.
Question 9. What is the last digit of 7 355? Solution: We have 7 2 9 (mod 10) 7 3 3 (mod 10) 7 4 1 (mod 10) and 355 = 88 4 + 3, so that 7 355 ( 7 4) 88 7 3 3 (mod 10), and the last digit of 7 355 is a 3. Question 10. What is the remainder when 314 162 is divided by 165? Solution: We have the following rime ower decomositions: and the following congruences: 314 = 157 2 and 165 = 3 5 11 2 2 1 (mod 3) 2 4 1 (mod 5) 2 8 1 (mod 11) so that 3 2 8 1, 5 2 8 1, and 11 2 8 1, and since the integers 3, 5, and 11 are airwise relatively rime, then 165 2 8 1 also, that is, 2 8 1 (mod 165). We also have the congruences: 157 1 (mod 3) 157 4 1 (mod 5) 157 5 1 (mod 11) and again, since 3 157 20 1, 5 157 20 1, and 11 157 20 1, and the integers 3, 5, and 11 are airwise relatively rime, then 165 157 20 1 also, that is, 157 20 1 (mod 165). Therefore, 2 40 1 (mod 165) and 157 40 1 (mod 165), so that 314 40 1 (mod 165), and since 162 = 4 40 + 2, then 314 162 ( 314 40) 4 314 2 314 2 91 (mod 165).
Question 11. Prove that a n b n is divisible by the rime n + 1 if neither a nor b is. Solution: Note that if is a rime and (a, ) = 1 and (b, ) = 1, then from Fermat s theorem we have a 1 1 (mod ) and b 1 1 (mod ), so that a 1 b 1 0 (mod ). Now, if n + 1 a rime and (a, n + 1) = (b, n + 1) = 1, then from the above we have a n b n 0 (mod n + 1), that is, n + 1 a n b n. Question 12. Suose that is an odd rime. (a) Show that 1 1 + 2 1 + + ( 1) 1 1 (mod ). (b) Show that 1 + 2 + + ( 1) 0 (mod ). Solution: (a) Since is an odd rime and (k, ) = 1 for 1 k 1, then Fermat s theorem imlies that for 1 k 1, and therefore k 1 1 (mod ) 1 1 + 2 1 + + ( 1) 1 1 + 1 + + 1 }{{} 1 times (b) Again, from Fermat s theorem we have k k (mod ) 1 1 (mod ). for 1 k 1, and therefore ( ) 1 1 + 2 + + ( 1) 1 + 2 + + 1 2 0 (mod ) since 1 2 Question 13. Z +. Show that σ(n) is odd if n is a ower of 2. Solution: If n = 2 α, then σ (2 α ) = d 2 α d = 1 + 2 + 2 2 + + 2 α = 2α+1 1 2 1 = 2 α+1 1, and σ (2 α ) = 2 α+1 1 is odd for all integers α 0.
Question 14. For which n is σ(n) odd? Solution: We have seen that if n = 2 α, then σ(n) is odd. Suose now that is an odd rime and that α is a ositive integer, then σ ( α ) = 1 + + 2 + + α = α+1 1 1, and σ ( α ) is odd if and only if the sum contains an odd number of terms, that is, if and only if α is an even integer. Therefore, σ(n) is odd if and only if in the rime ower decomosition of n, every odd rime occurs to an even ower, that is, if and only if n is erfect square or n is 2 times a erfect square. Question 15. Find a formula for σ 2 (n) = d n d 2. Solution: If is a rime and α is a ositive integer, then σ 2 ( α ) = d α d 2 = 1 + 2 + 4 + 6 + + 2α = ( 2 ) α+1 1 2 1 = 2α+2 1 2 1, and if the rime ower decomosition of n is given by where the k s are distinct rimes, then n = σ 2 (n) = r k=1 r k=1 α k k, 2α k+2 1 2 k 1. Question 16. It was long thought that even erfect numbers ended alternately in 6 and 8. Show that this is not the case by verifying that the erfect numbers corresonding to the rimes both end in 6. 2 13 1 and 2 17 1 Solution: Note that 2 4 6 (mod 10) and 6 k 6 (mod 10) for all k 1. Now, if k 1 (mod 4), then k = 1 + 4m for some integer m 1, and 2 k 2 1 2 4m 2 (2 4) m 2 6 m 2 6 2 (mod 10), so that 2 k 1 1 (mod 10) for all k 1, k 1 (mod 4). Also, if k = 1 + 4m, then k 1 = 4m and for all k 5, k 1 (mod 4), and therefore 2 k 1 ( 2 4) m 6 m 6 (mod 10) 2 k 1 ( 2 k 1 ) 6 1 6 (mod 10) for all k 5, k 1 (mod 4). The result now follows since both 13 and 17 are congruent to 1 modulo 4.
Question 17. Show that all even erfect numbers end in 6 or 8. Solution: We have seen that any even erfect number n has the form n = 2 k 1 ( 2 k 1 ) where 2 k 1 is rime (and hence k is also rime). If k 1 (mod 4), then we saw in the revious roblem that the last digit of n is a 6. Suose now that k 3 (mod 4), then k = 3 + 4m for some integer m 0, so that 2 k 2 3 (2 4) m 23 6 m 8 6 8 (mod 10) and 2 k 1 7 (mod 10). Also, so that for all k 3 (mod 4). 2 k 1 2 2 ( 2 4) m 4 6 4 (mod 10), n = 2 k 1 ( 2 k 1 ) 4 7 8 (mod 10) Question 18. If n is an even erfect number, with n > 6, show that the sum of its digits is congruent to 1 modulo 9. Solution: Since 10 k 1 (mod 9) for all k 0, then any ositive integer n is congruent modulo 9 to the sum of it digits, so we only need to show that if n = 2 k 1 ( 2 k 1 ), k 3 is an even erfect number, then n is congruent to 1 modulo 9. Let n = 2 ( k 1 2 k 1 ) be an even erfect number, n > 6, then 2 k 1 and k are both odd rimes. Note that 2 2 4 (mod 9), 2 3 8 1 (mod 9), 2 6 1 (mod 9). Also, since k is rime, then k ±1 (mod 6). If k 1 (mod 6), then k = 1 + 6m for some m 1, so that 2 k 2 (2 6) m 2 (mod 9), and Also, so that if k 1 (mod 6). 2 k 1 2 1 1 (mod 9). 2 k 1 ( 2 6) m 1 (mod 9), n = 2 k 1 ( 2 k 1 ) 1 (mod 9)
If k 1 (mod 6), then k = 5 + 6m for some m 0, so that 2 k 2 5 (2 6) m 5 (mod 9), and Also, so that if k 1 (mod 6). 2 k 1 5 1 4 (mod 9). 2 k 1 2 4 ( 2 6) m 7 (mod 9), n = 2 k 1 ( 2 k 1 ) 4 7 28 1(mod 9) Question 19. Show that if n is odd, then φ(4n) = 2φ(n). Solution: If n is odd, then (4, n) = 1, so that φ(4n) = φ(4) φ(n) = 2φ(n). Question 20. Perfect numbers satisfy σ(n) = 2n. Which n satisfy φ(n) = 2n? Solution: If n is a ositive integer and φ(n) = 2n, then since φ(n) n 1, this imlies that 2n n 1, that is, n 1, which is a contradiction. Therefore, there are no ositive integers n for which φ(n) = 2n. Question 21. Note that 1 + 2 = 3 2 φ(3) 1 + 3 = 4 2 φ(4) 1 + 2 + 3 + 4 = 5 2 φ(5) 1 + 5 = 6 2 φ(6) 1 + 2 + 3 + 4 + 5 + 6 = 7 2 φ(7) Guess a theorem! 1 + 3 + 5 + 7 = 8 2 φ(8) Solution: The theorem was one that we roved in class, namely, n k=1 (k,n)=1 k = n 2 φ(n).
Question 22. Find all solutions of φ(n) = 4, and rove that there are no more. Solution: If the rime ower decomosition of the ositive integer n is given by where the i s are distinct odd rimes, then n = 2 α α1 1 α2 2 α k k, φ(n) = 2 α 1 α1 1 1 α2 1 2 α k 1 k ( 1 1)( 2 1) ( k 1), and it is clear that if φ(n) = 4 then n can have no more than 2 odd rime factors and these must occur to the first ower. It is also clear that the exonent of the ower of 2 must be less than or equal to 3. Thus, if φ(n) = 4, then n must have one of the forms n = 2 α for α 3, n = 2 α n = 2 α q for α 2, an odd rime for α 1,, q odd rimes In the first case, if n = 2 α, then φ(n) = 2 α 1 = 4 if and only if α 1 = 2, that is, α = 3, so n = 8 is one solution to φ(n) = 4. In the second case, if n = 2 α, where is an odd rime, then φ(n) = 2 α 1 ( 1), and φ(n) = 4 if and only if either α 1 = 1 and 1 = 2, or α 1 = 0 and 1 = 4, or α = 0 and 1 = 4. Thus, n is a solution to φ(n) = 4 if and only if n = 4 3 = 12 or n = 2 5 = 10, or n = 1 5 = 5. In the third case, if n = 2 α q, where and q are distinct odd rimes, then φ(n) = 2 α 1 ( 1)(q 1), and since both 1 and q 1 are even, then we must have α = 0. Also, since and q are distinct odd rimes, then ( 1)(q 1) = 4 imlies that one of 1 or q 1 equals 1 and the other equals 4, which is a contradiction. Thus, in this case φ(n) 4, and there are no solutions. Therefore, the only solutions to φ(n) = 4 are 5, 8, 10, and 12. Question 23. Show that if (m, n) = 2, then φ(m n) = 2 φ(m) φ(n). Solution: Let m = 2 r M and n = 2 s N where M and N are odd and one of r or s is 1, then (M, N) = 1 so that φ(m n) = 2 r+s 1 φ(m) φ(n), and and therefore φ(m) φ(n) = 2 r 1 φ(m) 2 s 1 φ(n) = 2 r+s 2 φ(m) φ(n), 2 φ(m) φ(n) = 2 r+s 1 φ(m) φ(n) = φ(m n).
Question 24. Show that if n 1 and n + 1 are both rimes, with n > 4, then φ(n) n 3. Solution: Since n > 4, then n 1 > 3, and since one of the consecutive integers n 1, n, and n + 1 is divisible by 3 and n 1 and n + 1 are rimes greater than 3, then 3 n. Also, n must be even, since n 1 and n + 1 are odd rimes, so that 2 n. Since (2, 3) = 1, and n is a common multile of 2 and 3, then 6 = 2 3 = [2, 3] also divides n, and we can write n = 2 a 3 b N where a 1 and b 1, and (2, N) = (3, N) = 1. Therefore, Question 25. φ(n) = 2 a 3 b 1 φ(n) 2 a 3 b 1 N = n 3. One of the rimitive roots of 19 is 2. Find all of the others. Solution: Since φ(19) = 18, and φ(18) = 6, then there are 6 incongruent rimitive roots of 19, and they are 2 u, 1 u 18, with (u, 18) = 1, that is, the incongruent rimitive roots of 19 are 2, 2 5, 2 7, 2 11, 2 13, 2 17. Question 26. Suose that is a rime and a has order 4 modulo. What is the least ositive residue of (a + 1) 4 modulo? Solution: Since a 4 1 (mod ), then 5, and since a 4 1 = (a 2 1)(a 2 + 1), and is rime with a 2 1 (mod ), then a 2 + 1, that is, a 2 1 (mod ). Therefore, (a + 1) 4 a 4 + 4a 3 + 6a 2 + 4a + 1 1 4a 6 + 4a + 1 2 6 4 4 (mod ), and (a + 1) 4 ( 4) (mod ), so the least ositive residue of (a + 1) 4 modulo is 4. Question 27. If r is a rimitive root of the rime, show that two consecutive owers of r have consecutive least ositive residues modulo, that is, show that there exists an integer k 1 such that r k+1 r k + 1 (mod ). Solution: The set {1, r, r 2,..., r 1 } forms reduced residue system modulo. Therefore, since the φ() = 1 integers {r 2 r, r 3 r 2, r 4 r 3,..., r r 1 } are all incongruent modulo, they also form a reduced residue system modulo, and there must be an integer k, with 1 k 1, such that r k+1 r k 1 (mod ).
Question 28. Show that if is an odd rime and a is a quadratic residue modulo, and a b 1 (mod ), then b is also a quadratic residue modulo. Solution: There exists an integer x such that x 2 and b is also a quadratic residue modulo. Question 29. a (mod ), so that (x b) 2 x 2 b 2 a b 2 (a b) b 1 b b (mod ), Suose that = q + 4a where and q are odd rimes. Show that ( ) a = ( ) a. q Solution: Suose first that a = 2, then q (mod 8), so that ( ) 2 = ( 1) 2 1 8 = ( 1) q2 1 8 = ( ) 2. q Now suose that a is an odd rime, then = q + 4a imlies that q (mod a), so that and since q (mod 4), then 1 2 q 1 2 ( = a) ( q a), (mod 2), so that ( ) a ( = ( 1) a) 1 2 a 1 ( q 2 = ( 1) a) q 1 2 a 1 2 = ( ) a. q In the general case, if the rime ower decomosition of a is given by a = α0 0 α1 1 α2 2 α k k, where 0 = 2 and for 1 i k, the i s are distinct odd rimes, then ( α i ) i = ( ) i and since the Legendre symbol is multilicative, we have ( ) a = k i=0 α i odd ( ) i = α i odd 1 α i even k i=0 α i odd ( ) i = q ( ) a. q
Question 30. Show that 3 is a quadratic nonresidue of all rimes of the form 4 n + 1. Solution: If = 4 n + 1 is rime, where n 1, then 1 (mod 4), and from the law of quadratic recirocity, we have ( ) 3 ( =, 3) and since 4 n + 1 2 (mod 3), then ( ) 3 ( = = 3) ( ) 2 = ( 1) 32 1 8 = 1. 3 Therefore, 3 is a quadratic nonresidue of any rime of the form 4 n + 1. Question 31. (a) Show that if 7 (mod 8) is rime, then 2 1 2 1. (b) Find a factor of 2 83 1. Solution: (a) If = 7 + 8k is a rime, then 2 1 8 = 6 + 14k + 8k 2, and ( ) 2 = ( 1) 2 1 8 = 1, and 2 is a quadratic residue modulo. From Euler s criteria, since (, 2) = 1, we have 2 1 2 ( ) 2 (mod ), that is, 2 1 2 1 (mod ), so that 2 1 2 1. (b) If we let 1 2 = 83, then = 1 + 166 = 167 is rime, and = 7 + 8 20. From art (a), we know that so that = 167 is a factor of 2 83 1. 2 1 2 1,