MT 40 Intro to Number Theory MIDTERM 2 PRACTICE Material covered Midterm 2 is comrehensive but will focus on the material of all the lectures from February 9 u to Aril 4 Please review the following toics covered before Midterm : () Euler s φ-function (2) Algebraic congruences Hensel s lemma () Euler s criterion New toics for Midterm 2 are: () Primitive roots of rime numbers (2) Solving algebraic congruences x a b (mod ) () Legendre s symbol (4) Gauss lemma () Quadratic recirocity laws (6) Continued fractions (7) Reresentation of rational numbers by simle continued fraction using Euclidean algorithm (8) Infinite continued fractions (9) Reresentation of quadratic irrationals by eriodic infinite continued fractions (0) Solving Pell s equation using continued fractions To reare for the midterm, review your lecture notes and redo Problems Sets 4,, 6 (also read and work through the osted solutions) Here are a few extra ractice roblems: 2 Practice roblems Problem What are all ossible orders of elements in F 9? Solution: The order of any element in F 9 divides 9 8 It follows that the orders can be only, 2,, 6, 9, 8 To see that these orders are ossible, consider any rimitive root ζ Then ζ has order 8, ζ 2 has order 9, ζ has order 6, ζ 6 has order, ζ 9 has order 2, and of course ζ 0 has order Problem 2 Find all rimitive roots of 9 Solution: A rimitive root of 9 is an element ζ F 9 of order 8 By Problem, an element of F 9 is a rimitive root as long as it does not satisfy equation x 6 or x 9 We start checking non-zero residues one by one Begin with 2: clearly, 2 6 64 7 (mod 9) and 2 9 2 (mod 9) It follows that 2 is a rimitive root of 9 Every rimitive roots of 9 can now be written as 2 k, where k {, 2,, 8} is corime to 8: 2, 2, 2 7, 2, 2, 2
2 MIDTERM 2 PRACTICE Problem Find all solutions of x 2 7 (mod 9) and x 2 6 (mod 9) Solution: We use the fact that 2 is a rimitive root of 9 from the revious roblem Write x 2 k Then because 7 64 2 6 (mod 9) the first equation can be rewritten as 2 2k 2 6 (mod 9) This is equivalent to 8 2k 6 The solution to 2k 6 0 (mod 8) are k 2 (mod ) or k 2,, 8,, 4, (mod 8) It follows that the solutions of x 2 7 (mod 9) are x 2 2 4 (mod 9) x 2 2 (mod 9) x 2 8 9 (mod 9) x 2 (mod 9) x 2 4 6 (mod 9) x 2 0 (mod 9) Since we ve discovered that 6 2 4 (mod 9), the second equation can now be rewritten as 2 2k 2 4 (mod 9) or 2k 4 (mod 8) This equation clearly has no solutions because 6 4 Problem 4 Is 8 a square modulo? Does equation x 2 + 6x + 0 (mod ) have a solution? Solution: Comlete the square to re-write the given equation as (x + ) 2 8 (mod ) The question is now whether 8 is a quadratic residue modulo Clearly 8 2 2 Finally, because 7 (mod 8), we conclude that 2 is a square modulo (Indeed 2 64 (mod )) It follows that 8 is also a square modulo The answer to both questions is thus YES Problem Comute Legendre s symbols and Solution: First, By quadratic recirocity, ( ) ( )( )/4 Also, ( ) ( )( )/4 2 2 ( ) (2 )/8 It follows that ( )( )
MIDTERM 2 PRACTICE Next, By quadratic recirocity, ( ) ( )( )/4 Also, It follows that ( ) ( )( )/4 ( )() Problem 6 For which rimes is 6 a square modulo? Solution: Clearly, 6 is a square modulo 2 and modulo Suose now Then 6 2 Recall that Next, { 2 if, 7 (mod 8) if, (mod 8) ( ( ) ( )( )/4 ) ( ( ) ( )/2 ) ( Clearly, ( ) ( )/2 deends on the residue of modulo 4 and deends ) 2 on the residue of modulo Summarizing, both and deend only on 2 the residue of modulo 24 For examle, if (mod 24), then and ( ) ( 6 ( ) ( )( )/4, so that ) Checking the reduced residue system modulo 24, we conclude that if,, 9, 2 6 (mod 24), then and so 6 is a square modulo If 7,,, (mod 24), then 6 is not a square modulo Problem 7 Calculate the continued fraction exansion of 676 07 Solution: Aly the Euclidean algorithm:
4 MIDTERM 2 PRACTICE 676 6 07 + 4 07 4 + 4 6 + 4 4 + 4 4 It follows that 676 6,, 6,, 4 07 Problem 8 Find the infinite continued fraction reresentation of 20 Solution: First, we comute the infinite continued fraction exansion of the reduced quadratic irrational 4 + 20 It turns out to be 8, 2 Indeed, we start with a 0 8, m 0 4, q 0 Then and m a 0 q 0 m 0 4, q (20 m 2 )/ 4, a (4 + 20)/4 2 m 2 a q m 8 4 4, q 2 (20 m 2 2)/4, a 2 4 + 20 8 From now on the values of a i reeat themselves with eriod 8, 2 It follows that 4 + 20 8, 2 8, 2, 8, 2, and so 20 4, 2, 8, 2, 8, 4, 2, 8 Problem 9 Find the irrational number having continued fraction exansion 4, 4, 8 Solution: 8 Problem 0 Suose that h n and h n+ are two successive convergents of a k n k n+ number x Show that for any reduced rational number a in the oen interval b (h n /k n, h n+ /k n+ ) one necessarily has b k n + k n+ Conclude that h n /k n is the best ossible aroximation of x among all rational numbers a/b satisfying b k n Solution: Without loss of generality, we assume that n is even, so that h n < h n+ k n k n+ Then h n+ h ( n hn+ a ) ( a + k n+ k n k n+ b b h ) n k n Clearing the denominators and using the fact that h n+ k n h n k n+ ( ) n we obtain (h n+b ak n+ ) + (ak n bh n ) k n k n+ k n+ b bk n
MIDTERM 2 PRACTICE Let S (h n+ b ak n+ ) and T (ak n bh n ) Then because h n /k n < a/b < h n+ /k n+, we must have S, T > 0 Because S and T are actually integers, we obtain S, T We now have S k n k n+ k n+ b + T bk n Multilying by k n k n+ b, we obtain b Sk n + T k n+ k n + k n+