Number Theory Naoki Sato

Size: px
Start display at page:

Download "Number Theory Naoki Sato <ensato@hotmail.com>"

Transcription

1 Number Theory Naoki Sato 0 Preface This set of notes on number theory was originally written in 1995 for students at the IMO level. It covers the basic background material that an IMO student should be familiar with. This text is meant to be a reference, and not a relacement but rather a sulement to a number theory textbook; several are given at the back. Proofs are given when aroriate, or when they illustrate some insight or imortant idea. The roblems are culled from various sources, many from actual contests and olymiads, and in general are very difficult. The author welcomes any corrections or suggestions. 1 Divisibility For integers a and b, we say that a divides b, or that a is a divisor (or factor) of b, or that b is a multile of a, if there exists an integer c such that b = ca, and we denote this by a b. Otherwise, a does not divide b, and we denote this by a b. A ositive integer is a rime if the only divisors of are 1 and. If k a and k+1 a where is a rime, i.e. k is the highest ower of dividing a, then we denote this by k a. Useful Facts If a, b > 0, and a b, then a b. If a b 1, a b 2,..., a b n, then for any integers c 1, c 2,..., c n, a n b i c i. i=1 Theorem 1.1. The Division Algorithm. For any ositive integer a and integer b, there exist unique integers q and r such that b = qa + r and 0 r < a, with r = 0 iff a b. 1

2 Theorem 1.2. The Fundamental Theorem of Arithmetic. Every integer greater than 1 can be written uniquely in the form e 1 1 e 2 2 e k k, where the i are distinct rimes and the e i are ositive integers. Theorem 1.3. (Euclid) There exist an infinite number of rimes. Proof. Suose that there are a finite number of rimes, say 1, 2,..., n. Let N = 1 2 n + 1. By the fundamental theorem of arithmetic, N is divisible by some rime. This rime must be among the i, since by assumtion these are all the rimes, but N is seen not to be divisible by any of the i, contradiction. Examle 1.1. Let x and y be integers. Prove that 2x + 3y is divisible by 17 iff 9x + 5y is divisible by 17. Solution. 17 (2x + 3y) 17 [13(2x + 3y)], or 17 (26x + 39y) 17 (9x + 5y), and conversely, 17 (9x + 5y) 17 [4(9x + 5y)], or 17 (36x + 20y) 17 (2x + 3y). Examle 1.2. Find all ositive integers d such that d divides both n 2 +1 and (n + 1) for some integer n. Solution. Let d (n 2 + 1) and d [(n + 1) 2 + 1], or d (n 2 + 2n + 2). Then d [(n 2 + 2n + 2) (n 2 + 1)], or d (2n + 1) d (4n 2 + 4n + 1), so d [4(n 2 +2n+2) (4n 2 +4n+1)], or d (4n+7). Then d [(4n+7) 2(2n+1)], or d 5, so d can only be 1 or 5. Taking n = 2 shows that both of these values are achieved. Examle 1.3. Suose that a 1, a 2,..., a 2n are distinct integers such that the equation (x a 1 )(x a 2 ) (x a 2n ) ( 1) n (n!) 2 = 0 has an integer solution r. Show that so (1984 IMO Short List) r = a 1 + a a 2n. 2n Solution. Clearly, r a i for all i, and the r a i are 2n distinct integers, (r a 1 )(r a 2 ) (r a 2n ) (1)(2) (n)( 1)( 2) ( n) = (n!) 2, 2

3 with equality iff {r a 1, r a 2,..., r a 2n } = {1, 2,..., n, 1, 2,..., n}. Therefore, this must be the case, so (r a 1 ) + (r a 2 ) + + (r a 2n ) = 2nr (a 1 + a a 2n ) = n + ( 1) + ( 2) + + ( n) = 0 r = a 1 + a a 2n. 2n Examle 1.4. Let 0 < a 1 < a 2 < < a mn+1 be mn + 1 integers. Prove that you can select either m + 1 of them no one of which divides any other, or n + 1 of them each dividing the following one. (1966 Putnam Mathematical Cometition) Solution. For each i, 1 i mn + 1, let n i be the length of the longest sequence starting with a i and each dividing the following one, among the integers a i, a i+1,..., a mn+1. If some n i is greater than n then the roblem is solved. Otherwise, by the igeonhole rincile, there are at least m + 1 values of n i that are equal. Then, the integers a i corresonding to these n i cannot divide each other. Useful Facts Bertrand s Postulate. For every ositive integer n, there exists a rime such that n 2n. Gauss s Lemma. If a olynomial with integer coefficients factors into two olynomials with rational coefficients, then it factors into two olynomials with integer coefficients. Problems 1. Let a and b be ositive integers such that a b 2, b 2 a 3, a 3 b 4, b 4 a 5,.... Prove that a = b. 2. Let a, b, and c denote three distinct integers, and let P denote a olynomial having all integral coefficients. Show that it is imossible that P (a) = b, P (b) = c, and P (c) = a. (1974 USAMO) 3

4 3. Show that if a and b are ositive integers, then ( a + 1 n ( + b + 2) 1 ) n 2 is an integer for only finitely many ositive integers n. (A Problem Seminar, D.J. Newman) 4. For a ositive integer n, let r(n) denote the sum of the remainders when n is divided by 1, 2,..., n resectively. Prove that r(k) = r(k 1) for infinitely many ositive integers k. (1981 Kürschák Cometition) 5. Prove that for all ositive integers n, 0 < n k=1 g(k) k 2n 3 < 2 3, where g(k) denotes the greatest odd divisor of k. (1973 Austrian Mathematics Olymiad) 6. Let d be a ositive integer, and let S be the set of all ositive integers of the form x 2 + dy 2, where x and y are non-negative integers. (a) Prove that if a S and b S, then ab S. (b) Prove that if a S and S, such that is a rime and a, then a/ S. (c) Assume that the equation x 2 + dy 2 = has a solution in nonnegative integers x and y, where is a given rime. Show that if d 2, then the solution is unique, and if d = 1, then there are exactly two solutions. 2 GCD and LCM The greatest common divisor of two ositive integers a and b is the greatest ositive integer that divides both a and b, which we denote by gcd(a, b), and similarly, the lowest common multile of a and b is the least ositive 4

5 integer that is a multile of both a and b, which we denote by lcm(a, b). We say that a and b are relatively rime if gcd(a, b) = 1. For integers a 1, a 2,..., a n, gcd(a 1, a 2,..., a n ) is the greatest ositive integer that divides all of a 1, a 2,..., a n, and lcm(a 1, a 2,..., a n ) is defined similarly. Useful Facts For all a, b, gcd(a, b) lcm(a, b) = ab. For all a, b, and m, gcd(ma, mb) = m gcd(a, b) and lcm(ma, mb) = mlcm(a, b). If d gcd(a, b), then ( a gcd d, b ) = d gcd(a, b). d In articular, if d = gcd(a, b), then gcd(a/d, b/d) = 1; that is, a/d and b/d are relatively rime. If a bc and gcd(a, c) = 1, then a b. For ositive integers a and b, if d is a ositive integer such that d a, d b, and for any d, d a and d b imlies that d d, then d = gcd(a, b). This is merely the assertion that any common divisor of a and b divides gcd(a, b). If a 1 a 2 a n is a erfect k th ower and the a i are airwise relatively rime, then each a i is a erfect k th ower. Any two consecutive integers are relatively rime. Examle 2.1. Show that for any ositive integer N, there exists a multile of N that consists only of 1s and 0s. Furthermore, show that if N is relatively rime to 10, then there exists a multile that consists only of 1s. Solution. Consider the N + 1 integers 1, 11, 111,..., (N + 1 1s). When divided by N, they leave N + 1 remainders. By the igeonhole rincile, two of these remainders are equal, so the difference in the corresonding integers, an integer of the form , is divisible by N. If N is relatively rime to 10, then we may divide out all owers of 10, to obtain an integer of the form that remains divisible by N. 5

6 Theorem 2.1. For any ositive integers a and b, there exist integers x and y such that ax + by = gcd(a, b). Furthermore, as x and y vary over all integers, ax + by attains all multiles and only multiles of gcd(a, b). Proof. Let S be the set of all integers of the form ax+by, and let d be the least ositive element of S. By the division algorithm, there exist integers q and r such that a = qd + r, 0 r < d. Then r = a qd = a q(ax + by) = (1 qx)a (qy)b, so r is also in S. But r < d, so r = 0 d a, and similarly, d b, so d gcd(a, b). However, gcd(a, b) divides all elements of S, so in articular gcd(a, b) d d = gcd(a, b). The second art of the theorem follows. Corollary 2.2. The ositive integers a and b are relatively rime iff there exist integers x and y such that ax + by = 1. Corollary 2.3. For any ositive integers a 1, a 2,..., a n, there exist integers x 1, x 2,..., x n, such that a 1 x 1 +a 2 x 2 + +a n x n = gcd(a 1, a 2,..., a n ). Corollary 2.4. Let a and b be ositive integers, and let n be an integer. Then the equation ax + by = n has a solution in integers x and y iff gcd(a, b) n. If this is the case, then all solutions are of the form ( (x, y) = x 0 + t b d, y 0 t a ), d where d = gcd(a, b), (x 0, y 0 ) is a secific solution of ax + by = n, and t is an integer. Proof. The first art follows from Theorem 2.1. For the second art, as stated, let d = gcd(a, b), and let (x 0, y 0 ) be a secific solution of ax + by = n, so that ax 0 + by 0 = n. If ax + by = n, then ax + by ax 0 by 0 = a(x x 0 ) + b(y y 0 ) = 0, or a(x x 0 ) = b(y 0 y), and hence (x x 0 ) a d = (y 0 y) b d. Since a/d and b/d are relatively rime, b/d must divide x x 0, and a/d must divide y 0 y. Let x x 0 = tb/d and y 0 y = ta/d. This gives the solutions described above. 6

7 Examle 2.2. Prove that the fraction 21n n + 3 is irreducible for every ositive integer n. Solution. For all n, 3(14n + 3) 2(21n + 4) = 1, so the numerator and denominator are relatively rime. Examle 2.3. For all ositive integers n, let T n = 2 2n + 1. Show that if m n, then T m and T n are relatively rime. Solution. We have that T n 2 = 2 2n 1 = 2 2n = (T n 1 1) 2 1 = T 2 n 1 2T n 1 = T n 1 (T n 1 2) = T n 1 T n 2 (T n 2 2) = = T n 1 T n 2 T 1 T 0 (T 0 2) = T n 1 T n 2 T 1 T 0, for all n. Therefore, any common divisor of T m and T n must divide 2. But each T n is odd, so T m and T n are relatively rime. Remark. It immediately follows from this result that there are an infinite number of rimes. The Euclidean Algorithm. By recursive use of the division algorithm, we may find the gcd of two ositive integers a and b without factoring either, and the x and y in Theorem 2.1 (and so, a secific solution in Corollary 2.4). For examle, for a = 329 and b = 182, we comute 329 = , 182 = , 147 = , 35 = 5 7, and sto when there is no remainder. The last dividend is the gcd, so in our examle, gcd(329,182) = 7. Now, working through the above equations 7

8 backwards, 7 = = ( ) = = 5 ( ) = Remark. The Euclidean algorithm also works for olynomials. Examle 2.4. Let n be a ositive integer, and let S be a subset of n + 1 elements of the set {1, 2,..., 2n}. Show that (a) There exist two elements of S that are relatively rime, and (b) There exist two elements of S, one of which divides the other. Solution. (a) There must be two elements of S that are consecutive, and thus, relatively rime. (b) Consider the greatest odd factor of each of the n + 1 elements in S. Each is among the n odd integers 1, 3,..., 2n 1. By the igeonhole rincile, two must have the same greatest odd factor, so they differ (multilication-wise) by a ower of 2, and so one divides the other. Examle 2.5. The ositive integers a 1, a 2,..., a n are such that each is less than 1000, and lcm(a i, a j ) > 1000 for all i, j, i j. Show that n i=1 1 a i < 2. (1951 Russian Mathematics Olymiad) Solution. If 1000 < a 1000, then the m multiles a, 2a,..., ma do m+1 m not exceed Let k 1 the number of a i in the interval ( 1000, 1000], k 2 2 in ( 1000, 1000], etc. Then there are k k 2 + 3k 3 + integers, no greater than 1000, that are multiles of at least one of the a i. But the multiles are distinct, so k 1 + 2k 2 + 3k 3 + < k 1 + 3k 2 + 4k 3 + = (k 1 + 2k 2 + 3k 3 + ) + (k 1 + k 2 + k 3 + ) < n <

9 Therefore, n i=1 1 2 k 1 a i k k 3 = 2k 1 + 3k 2 + 4k < Useful Facts Dirichlet s Theorem. If a and b are relatively rime ositive integers, then the arithmetic sequence a, a + b, a + 2b,..., contains infinitely many rimes. Problems 1. The symbols (a, b,..., g) and [a, b,..., g] denote the greatest common divisor and lowest common multile, resectively of the ositive integers a, b,..., g. Prove that (1972 USAMO) [a, b, c] 2 [a, b][a, c][b, c] = (a, b, c) 2 (a, b)(a, c)(b, c). 2. Show that gcd(a m 1, a n 1) = a gcd(m,n) 1 for all ositive integers a > 1, m, n. 3. Let a, b, and c be ositive integers. Show that lcm(a, b, c) = abc gcd(a, b, c) gcd(a, b) gcd(a, c) gcd(b, c). Exress gcd(a, b, c) in terms of abc, lcm(a, b, c), lcm(a, b), lcm(a, c), and lcm(b, c). Generalize. 4. Let a, b be odd ositive integers. Define the sequence (f n ) by utting f 1 = a, f 2 = b, and by letting f n for n 3 be the greatest odd divisor of f n 1 + f n 2. Show that f n is constant for n sufficiently large and determine the eventual value as a function of a and b. (1993 USAMO) 5. Let n a 1 > a 2 > > a k be ositive integers such that lcm(a i, a j ) n for all i, j. Prove that ia i n for i = 1, 2,..., k. 9

10 3 Arithmetic Functions There are several imortant arithmetic functions, of which three are resented here. If the rime factorization of n > 1 is e 1 1 e 2 2 e k k, then the number of ositive integers less than n, relatively rime to n, is ) ) ) φ(n) = (1 ( (1 1k n the number of divisors of n is = e e e k 1 k ( 1 1)( 2 1) ( k 1), and the sum of the divisors of n is τ(n) = (e 1 + 1)(e 2 + 1) (e k + 1), σ(n) = ( e e )( e e ) ( e k + e k 1 ( e 1 +1 = k k + + 1) ) ( e ) ( e k +1 k 1 k 1 Also, φ(1), τ(1), and σ(1) are defined to be 1. We say that a function f is multilicative if f(mn) = f(m)f(n) for all relatively rime ositive integers m and n, and f(1) = 1 (otherwise, f(1) = 0, which imlies that f(n) = 0 for all n). ). Theorem 3.1. The functions φ, τ, and σ are multilicative. Hence, by taking the rime factorization and evaluating at each rime ower, the formula above are found easily. Examle 3.1. Find the number of solutions in ordered airs of ositive integers (x, y) of the equation where n is a ositive integer. Solution. From the given, 1 x + 1 y = 1 n, 1 x + 1 y = 1 n xy = nx + ny (x n)(y n) = n2. 10

11 If n = 1, then we immediately deduce the unique solution (2,2). For n 2, let n = e 1 1 e 2 2 e k k be the rime factorization of n. Since x, y > n, there is a 1-1 corresondence between the solutions in (x, y) and the factors of n 2, so the number of solutions is τ(n 2 ) = (2e 1 + 1)(2e 2 + 1) (2e k + 1). Examle 3.2. Let n be a ositive integer. Prove that φ(d) = n. d n Solution. For a divisor d of n, let S d be the set of all a, 1 a n, such that gcd(a, n) = n/d. Then S d consists of all elements of the form b n/d, where 0 b d, and gcd(b, d) = 1, so S d contains φ(d) elements. Also, it is clear that each integer between 1 and n belongs to a unique S d. The result then follows from summing over all divisors d of n. Problems 1. Let n be a ositive integer. Prove that n τ(k) = k=1 n k=1 n k. 2. Let n be a ositive integer. Prove that τ 3 (d) = d n d n 2 τ(d). 3. Prove that if σ(n) = 2N + 1, then N is the square of an odd integer. (1976 Putnam Mathematical Cometition) 4 Modular Arithmetic For a ositive integer m and integers a and b, we say that a is congruent to b modulo m if m (a b), and we denote this by a b modulo m, or more 11

12 commonly a b (mod m). Otherwise, a is not congruent to b modulo m, and we denote this by a b (mod m) (although this notation is not used often). In the above notation, m is called the modulus, and we consider the integers modulo m. Theorem 4.1. If a b and c d (mod m), then a + c b + d (mod m) and ac bd (mod m). Proof. If a b and c d (mod m), then there exist integers k and l such that a = b + km and c = d + lm. Hence, a + c = b + d + (k + l)m, so a + c b + d (mod m). Also, so ac bd (mod m). Useful Facts For all integers n, ac = bd + dkm + blm + klm 2 n 2 For all integers n, 0 n = bd + (dk + bl + klm)m, { 0 1 } { if n is even, (mod 4) if n is odd. (mod 8) if n 0 (mod 4), if n 2 (mod 4), if n 1 (mod 2). If f is a olynomial with integer coefficients and a b (mod m), then f(a) f(b) (mod m). If f is a olynomial with integer coefficients of degree n, not identically zero, and is a rime, then the congruence f(x) 0 (mod ) has at most n solutions modulo, counting multilicity. 12

13 Examle 4.1. Prove that the only solution in rational numbers of the equation x 3 + 3y 3 + 9z 3 9xyz = 0 is x = y = z = 0. (1983 Kürschák Cometition) Solution. Suose that the equation has a solution in rationals, with at least one non-zero variable. Since the equation is homogeneous, we may obtain a solution in integers (x 0, y 0, z 0 ) by multilying the equation by the cube of the lowest common multile of the denominators. Taking the equation modulo 3, we obtain x (mod 3). Therefore, x 0 must be divisible by 3, say x 0 = 3x 1. Substituting, 27x y z x 1 y 0 z 0 = 0 y z x 3 1 9x 1 y 0 z 0 = 0. Therefore, another solution is (y 0, z 0, x 1 ). We may then aly this reduction recursively, to obtain y 0 = 3y 1, z 0 = 3z 1, and another solution (x 1, y 1, z 1 ). Hence, we may divide owers of 3 out of our integer solution an arbitrary number of times, contradiction. Examle 4.2. Does one of the first Fibonacci numbers terminate with 4 zeroes? Solution. The answer is yes. Consider the sequence of airs (F k, F k+1 ) modulo Since there are only a finite number of different ossible airs (10 8 to be exact), and each air is deendent only on the revious one, this sequence is eventually eriodic. Also, by the Fibonacci relation, one can find the revious air to a given air, so this sequence is immediately eriodic. But F 0 0 (mod 10 4 ), so within 10 8 terms, another Fibonacci number divisible by 10 4 must aear. In fact, a comuter check shows that 10 4 F 7500, and (F n ) modulo 10 4 has eriod 15000, which is much smaller than the uer bound of If ax 1 (mod m), then we say that x is the inverse of a modulo m, denoted by a 1, and it is unique modulo m. Theorem 4.2. The inverse of a modulo m exists and is unique iff a is relatively rime to m. Proof. If ax 1 (mod m), then ax = 1+km for some k ax km = 1. By Corollary 2.2, a and m are relatively rime. Now, if gcd(a, m) = 1, then 13

14 by Corollary 2.2, there exist integers x and y such that ax + my = 1 ax = 1 my ax 1 (mod m). The inverse x is unique modulo m, since if x is also an inverse, then ax ax 1 xax xax x x. Corollary 4.3. If is a rime, then the inverse of a modulo exists and is unique iff does not divide a. Corollary 4.4. If ak bk (mod m) and k is relatively rime to m, then a b (mod m). Proof. Multilying both sides by k 1, which exists by Theorem 4.2, yields the result. We say that a set {a 1, a 2,..., a m } is a comlete residue system modulo m if for all i, 0 i m 1, there exists a unique j such that a j i (mod m). Examle 4.3. Find all ositive integers n such that there exist comlete residue systems {a 1, a 2,..., a n } and {b 1, b 2,..., b n } modulo n for which {a 1 + b 1, a 2 + b 2,..., a n + b n } is also a comlete residue system. Solution. The answer is all odd n. First we rove necessity. For any comlete residue system {a 1, a 2,..., a n } modulo n, we have that a 1 + a a n n(n + 1)/2 (mod n). So, if all three sets are comlete residue systems, then a 1 +a 2 + +a n +b 1 +b 2 + +b n n 2 +n 0 (mod n) and a 1 + b 1 + a 2 + b a n + b n n(n + 1)/2 (mod n), so n(n + 1)/2 0 (mod n). The quantity n(n + 1)/2 is divisible by n iff (n + 1)/2 is an integer, which imlies that n is odd. Now assume that n is odd. Let a i = b i = i for all i. Then a i + b i = 2i for all i, and n is relatively rime to 2, so by Corollary 4.4, {2, 4,..., 2n} is a comlete residue system modulo n. Theorem 4.5. Euler s Theorem. If a is relatively rime to m, then a φ(m) 1 (mod m). Proof. Let a 1, a 2,..., a φ(m) be the ositive integers less than m that are relatively rime to m. Consider the integers aa 1, aa 2,..., aa φ(m). We claim that they are a ermutation of the original φ(m) integers a i, modulo m. For each i, aa i is also relatively rime to m, so aa i a k for some k. Since aa i aa j a i a j (mod m), each a i gets taken to a different a k under 14

15 multilication by a, so indeed they are ermuted. Hence, a 1 a 2 a φ(m) (aa 1 )(aa 2 ) (aa φ(m) ) a φ(m) a 1 a 2 a φ(m) 1 a φ(m) (mod m). Remark. This gives an exlicit formula for the inverse of a modulo m: a 1 a φ(m) 2 (mod m). Alternatively, one can use the Euclidean algorithm to find a 1 x as in the roof of Theorem 4.2. Corollary 4.6. Fermat s Little Theorem (FLT). If is a rime, and does not divide a, then a 1 1 (mod ). Examle 4.4. Show that if a and b are relatively rime ositive integers, then there exist integers m and n such that a m + b n 1 (mod ab). Solution. Let S = a m + b n, where m = φ(b) and n = φ(a). Then by Euler s Theorem, S b φ(a) 1 (mod a), or S 1 0 (mod a), and S a φ(b) 1 (mod b), or S 1 0 (mod b). Therefore, S 1 0, or S 1 (mod ab). Examle 4.5. For all ositive integers i, let S i be the sum of the roducts of 1, 2,..., 1 taken i at a time, where is an odd rime. Show that S 1 S 2 S 2 0 (mod ). Solution. First, observe that (x 1)(x 2) (x ( 1)) = x 1 S 1 x 2 + S 2 x 3 S 2 x + S 1. This olynomial vanishes for x = 1, 2,..., 1. But by Fermat s Little Theorem, so does x 1 1 modulo. Taking the difference of these two olynomials, we obtain another olynomial of degree 2 with 1 roots modulo, so it must be the zero olynomial, and the result follows from comaring coefficients. Remark. We immediately have that ( 1)! S 1 1 (mod ), which is Wilson s Theorem. Also, x x 0 (mod ) for all x, yet we cannot comare coefficients here. Why not? Theorem 4.7. If is a rime and n is an integer such that (4n 2 + 1), then 1 (mod 4). 15

16 Proof. Clearly, cannot be 2, so we need only show that 3 (mod 4). Suose = 4k + 3 for some k. Let y = 2n, so by Fermat s Little Theorem, y 1 1 (mod ), since does not divide n. But, y , so y 1 y 4k+2 (y 2 ) 2k+1 ( 1) 2k+1 1 (mod ), contradiction. Therefore, 1 (mod 4). Remark. The same roof can be used to show that if is a rime and (n 2 + 1), then = 2 or 1 (mod 4). Examle 4.6. Show that there are an infinite number of rimes of the form 4k + 1 and of the form 4k + 3. Solution. Suose that there are a finite number of rimes of the form 4k + 1, say 1, 2,..., n. Let N = 4( 1 2 n ) By Theorem 4.7, N is only divisible by rimes of the form 4k + 1, but clearly N is not divisible by any of these rimes, contradiction. Similarly, suose that there are a finite number of rimes of the form 4k + 3, say q 1, q 2,..., q m. Let M = 4q 1 q 2 q m 1. Then M 3 (mod 4), so M must be divisible by a rime of the form 4k + 3, but M is not divisible by any of these rimes, contradiction. Examle 4.7. Show that if n is an integer greater than 1, then n does not divide 2 n 1. Solution. Let be the least rime divisor of n. Then gcd(n, 1) = 1, and by Corollary 2.2, there exist integers x and y such that nx+( 1)y = 1. If (2 n 1), then 2 2 nx+( 1)y (2 n ) x (2 1 ) y 1 (mod ) by Fermat s Little Theorem, contradiction. Therefore, (2 n 1) n (2 n 1). Theorem 4.8. Wilson s Theorem. If is a rime, then ( 1)! 1 (mod ). (See also Examle 4.5.) Proof. Consider the congruence x 2 1 (mod ). Then x 2 1 (x 1)(x + 1) 0, so the only solutions are x 1 and 1. Therefore, for each i, 2 i 2, there exists a unique inverse j i of i, 2 j 2, modulo. Hence, when we grou in airs of inverses, ( 1)! 1 2 ( 2) ( 1) ( 1) 1 (mod ). 16

17 Examle 4.8. Let {a 1, a 2,..., a 101 } and {b 1, b 2,..., b 101 } be comlete residue systems modulo 101. Can {a 1 b 1, a 2 b 2,..., a 101 b 101 } be a comlete residue system modulo 101? Solution. The answer is no. Suose that {a 1 b 1, a 2 b 2,..., a 101 b 101 } is a comlete residue system modulo 101. Without loss of generality, assume that a (mod 101). Then b (mod 101), because if any other b j was congruent to 0 modulo 101, then a j b j a 101 b (mod 101), contradiction. By Wilson s Theorem, a 1 a 2 a 100 b 1 b 2 b ! 1 (mod 101), so a 1 b 1 a 2 b 2 a 100 b (mod 101). But a 101 b (mod 101), so a 1 b 1 a 2 b 2 a 100 b ! 1 (mod 101), contradiction. Theorem 4.9. If is a rime, then the congruence x (mod ) has a solution iff = 2 or 1 (mod 4). (Comare to Theorem 7.1) Proof. If = 2, then x = 1 is a solution. If 3 (mod 4), then by the remark to Theorem 4.7, no solutions exist. Finally, if = 4k + 1, then let x = 1 2 (2k). Then x (2k) (2k) (2k) ( 2k) ( 2) ( 1) 1 2 (2k) ( 2k) ( 2) ( 1) ( 1)! 1 (mod ). (multilying by 2k 1s) Theorem Let be a rime such that 1 (mod 4). Then there exist ositive integers x and y such that = x 2 + y 2. Proof. By Theorem 4.9, there exists an integer a such that a 2 1 (mod ). Consider the set of integers of the form ax y, where x and y are integers, 0 x, y <. The number of ossible airs (x, y) is then ( + 1) 2 > ( ) 2 =, so by igeonhole rincile, there exist integers 0 x 1, x 2, y 1, y 2 <, such that ax 1 y 1 ax 2 y 2 (mod ). Let x = x 1 x 2 and y = y 1 y 2. At least one of x and y is non-zero, and ax y a 2 x 2 x 2 y 2 x 2 + y 2 0 (mod ). Thus, x 2 + y 2 is a multile of, and 0 < x 2 + y 2 < ( ) 2 + ( ) 2 = 2, so x 2 + y 2 =. Theorem Let n be a ositive integer. Then there exist integers x and y such that n = x 2 + y 2 iff each rime factor of n of the form 4k + 3 aears an even number of times. Theorem The Chinese Remainder Theorem (CRT). If a 1, a 2,..., a k are integers, and m 1, m 2,..., m k are airwise relatively rime integers, 17

18 then the system of congruences x a 1 (mod m 1 ), x a 2 (mod m 2 ),. x a k (mod m k ) has a unique solution modulo m 1 m 2 m k. Proof. Let m = m 1 m 2 m k, and consider m/m 1. This is relatively rime to m 1, so there exists an integer t 1 such that t 1 m/m 1 1 (mod m 1 ). Accordingly, let s 1 = t 1 m/m 1. Then s 1 1 (mod m 1 ) and s 1 0 (mod m j ), j 1. Similarly, for all i, there exists an s i such that s i 1 (mod m i ) and s i 0 (mod m j ), j i. Then, x = a 1 s 1 + a 2 s a k s k is a solution to the above system. To see uniqueness, let x be another solution. Then x x 0 (mod m i ) for all i x x 0 (mod m 1 m 2 m k ). Remark. The roof shows exlicitly how to find the solution x. Examle 4.9. For a ositive integer n, find the number of solutions of the congruence x 2 1 (mod n). Solution. Let the rime factorization of n be 2 e e 1 1 e 2 2 e k k. By CRT, x 2 1 (mod n) x 2 1 (mod e i i ) for all i, and x2 1 (mod 2 e ). We consider these cases searately. We have that x 2 1 (mod e i i ) x2 1 = (x 1)(x + 1) 0 (mod e i i ). But i cannot divide both x 1 and x + 1, so it divides one of them; that is, x ±1 (mod e i i ). Hence, there are two solutions. Now, if (x 1)(x + 1) 0 (mod 2 e ), 2 can divide both x 1 and x + 1, but 4 cannot divide both. For e = 1 and e = 2, it is easily checked that there are 1 and 2 solutions resectively. For e 3, since there is at most one factor of 2 in one of x 1 and x + 1, there must be at least e 1 in the other, for their roduct to be divisible by 2 e. Hence, the only ossibilities are x 1 or x + 1 0, 2 e 1 (mod 2 e ), which lead to the four solutions x 1, 2 e 1 1, 2 e 1 + 1, and 2 e 1. Now that we know how many solutions each rime ower factor contributes, the number of solutions modulo n is simly the roduct of these, by CRT. The following table gives the answer: 18

19 e Number of solutions 0, 1 2 k 2 2 k k+2 Theorem Let m be a ositive integer, let a and b be integers, and let k = gcd(a, m). Then the congruence ax b (mod m) has k solutions or no solutions according as k b or k b. Problems 1. Prove that for each ositive integer n there exist n consecutive ositive integers, none of which is an integral ower of a rime. (1989 IMO) 2. For an odd ositive integer n > 1, let S be the set of integers x, 1 x n, such that both x and x + 1 are relatively rime to n. Show that x 1 (mod n). x S 3. Find all ositive integer solutions to 3 x + 4 y = 5 z. (1991 IMO Short List) 4. Let n be a ositive integer such that n + 1 is divisible by 24. Prove that the sum of all the divisors of n is divisible by 24. (1969 Putnam Mathematical Cometition) 5. (Wolstenholme s Theorem) Prove that if is exressed as a fraction, where 5 is a rime, then 2 divides the numerator. 6. Let a be the greatest ositive root of the equation x 3 3x = 0. Show that a 1788 and a 1988 are both divisible by 17. (1988 IMO Short List) 19

20 7. Let {a 1, a 2,..., a n } and {b 1, b 2,..., b n } be comlete residue systems modulo n, such that {a 1 b 1, a 2 b 2,..., a n b n } is also a comlete residue system modulo n. Show that n = 1 or Let m, n be ositive integers. Show that 4mn m n can never be a square. (1984 IMO Proosal) 5 Binomial Coefficients For non-negative integers n and k, k n, the binomial coefficient ( n k) is defined as n! k!(n k)!, and has several imortant roerties. By convention, ( n k) = 0 if k > n. In the following results, for olynomials f and g with integer coefficients, we say that f g (mod m) if m divides every coefficient in f g. Theorem 5.1. If is a rime, then the number of factors of in n! is n n n It is also n s n 1, where s n is the sum of the digits of n when exressed in base. Theorem 5.2. If is a rime, then ( ) 0 (mod ) i for 1 i 1. Corollary 5.3. (1 + x) 1 + x (mod ). Lemma 5.4. For all real numbers x and y, x + y x + y. Proof. x x x + y x + y Z, so x + y x + y. 20

21 Theorem 5.5. If is a rime, then ( ) k 0 (mod ) i for 1 i k 1. Proof. By Lemma 5.4, k ( ) i k i + j j j=1 k k, where the LHS and RHS are the number of factors of in i!( k i)! and k i! resectively. But, = k i = 0 and k = 1, so the inequality is k k k strict, and at least one factor of divides ( ) k i. Corollary 5.6. (1 + x) k 1 + x k j=1 (mod ). Examle 5.1. Let n be a ositive integer. Show that the roduct of n consecutive ositive integers is divisible by n!. Solution. If the consecutive integers are m, m + 1,..., m + n 1, then ( ) m(m + 1) (m + n 1) m + n 1 =. n! n Examle 5.2. Let n be a ositive integer. Show that (( ) ( ) ( )) n n n (n + 1) lcm,,..., = lcm(1, 2,..., n + 1). 0 1 n (AMM E2686) Solution. Let be a rime n + 1 and let α (resectively β) be the highest ower of in the LHS (resectively RHS) of the above equality. Choose r so that r n + 1 < r+1. Then clearly β = r. We claim that ( ) m if r m < r+1, then r+1 for 0 k m. ( ) k Indeed, the number of factors of in ( ) m k is r ( ) m k m k γ =. s=1 s s 21 s j

22 Since each summand in this sum is 0 or 1, we have γ r; that is, (*) holds. For 0 k n, let ( ) ( ) ( ) n n + 1 n + 1 a k = (n + 1) = (n k + 1) = (k + 1). k k k + 1 By ( ), r+1 does not divide any of the integers ( ) ( n k, n+1 ) ( k, or n+1 k+1). Thus, r+1 can divide a k only if divides each of the integers n + 1, n k + 1, and k + 1. This imlies that divides (n + 1) (n k + 1) (k + 1) = 1, contradiction. Therefore, r+1 a k. On the other hand, for k = r 1, we have that k n and a k = (k + 1) ( n+1 k+1) is divisible by r. Therefore, β = r = α. Theorem 5.7. Lucas s Theorem. Let m and n be non-negative integers, and a rime. Let m = m k k + m k 1 k m 1 + m 0, n = n k k + n k 1 k n 1 + n 0 and be the base exansions of m and n resectively. Then ( ) ( )( ) ( )( ) m mk mk 1 m1 m0 (mod ). n n k Proof. By Corollary 5.6, n k 1 n 1 (1 + x) m (1 + x) m k k +m k 1 k 1 + +m 1 +m 0 n 0 (1 + x) k m k (1 + x) k 1 m k 1 (1 + x) m 1 (1 + x) m 0 (1 + x k ) m k (1 + x k 1 ) m k 1 (1 + x ) m 1 (1 + x) m 0 By base exansion, the coefficient of x n on both sides is ( ) ( )( ) ( )( ) m mk mk 1 m1 m0 (mod ). n n k n k 1 n 1 n 0 (mod ). Corollary 5.8. Let n be a ositive integer. Let A(n) denote the number of factors of 2 in n!, and let B(n) denote the number of 1s in the binary exansion of n. Then the number of odd entries in the n th row of Pascal s Triangle, or equivalently the number of odd coefficients in the exansion of (1 + x) n, is 2 B(n). Furthermore, A(n) + B(n) = n for all n. Useful Facts 22

23 For a olynomial f with integer coefficients and rime, [f(x)] n f(x n ) (mod ). Problems 1. Let a and b be non-negative integers, and a rime. Show that ( ) ( ) a a (mod ). b b 2. Let a n be the last non-zero digit in the decimal reresentation of the number n!. Is the sequence a 1, a 2, a 3,... eventually eriodic? (1991 IMO Short List) 3. Find all ositive integers n such that 2 n (3 n 1). 4. Find the greatest integer k for which 1991 k divides (1991 IMO Short List) For a ositive integer n, let a(n) and b(n) denote the number of binomial coefficients in the n th row of Pascal s Triangle that are congruent to 1 and 2 modulo 3 resectively. Prove that a(n) b(n) is always a ower of Let n be a ositive integer. Prove that if the number of factors of 2 in n! is n 1, then n is a ower of 2. 6 Order of an Element We know that if a is relatively rime to m, then there exists a ositive integer n such that a n 1 (mod m). Let d be the smallest such n. Then we say that d is the order of a modulo m, denoted by ord m (a), or simly ord(a) if the modulus m is understood. Theorem 6.1. If a is relatively rime to m, then a n 1 (mod m) iff ord(a) n. Furthermore, a n 0 a n 1 iff ord(a) (n 0 n 1 ). 23

24 Proof. Let d = ord(a). It is clear that d n a n 1 (mod m). On the other hand, if a n 1 (mod m), then by the division algorithm, there exist integers q and r such that n = qd + r, 0 r < d. Then a n a qd+r (a d ) q a r a r 1 (mod m). But r < d, so r = 0 d n. The second art of the theorem follows. Remark. In articular, by Euler s Theorem, ord(a) φ(m). Examle 6.1. Show that the order of 2 modulo 101 is 100. Solution. Let d = ord(2). Then d φ(101), or d 100. If d < 100, then d divides 100/2 or 100/5; that is, d is missing at least one rime factor. However, and ( 6) ( 6) 14 1 (mod 101), so d = (mod 101), Examle 6.2. Prove that if is a rime, then every rime divisor of 2 1 is greater than. Solution. Let q (2 1), where q is a rime. Then 2 1 (mod q), so ord(2). But ord(2) 1, so ord(2) =. And by Fermat s Little Theorem, ord(2) (q 1) q 1 q >. In fact, for > 2, q must be of the form 2k + 1. From the above, ord(2) (q 1), or (q 1) q = m + 1. Since q must be odd, m must be even. Examle 6.3. Let be a rime that is relatively rime to 10, and let n be an integer, 0 < n <. Let d be the order of 10 modulo. (a) Show that the length of the eriod of the decimal exansion of n/ is d. (b) Prove that if d is even, then the eriod of the decimal exansion of n/ can be divided into two halves, whose sum is 10 d/2 1. For examle, 1/7 = , so d = 6, and = 999 = Solution. (a) Let m be the length of the eriod, and let n/ = 24

25 0.a 1 a 2... a m. Then 10 m n (10m 1) n = a 1 a 2... a m.a 1 a 2... a m = a 1 a 2... a m, an integer. Since n and are relatively rime, must divide 10 m 1, so d divides m. Conversely, divides 10 d 1, so (10 d 1)n/ is an integer, with at most d digits. If we divide this integer by 10 d 1, then we obtain a rational number, whose decimal exansion has eriod at most d. Therefore, m = d. (b) Let d = 2k, so n/ = 0.a 1 a 2... a k a k+1... a 2k. Now divides 10 d 1 = 10 2k 1 = (10 k 1)(10 k + 1). However, cannot divide 10 k 1 (since the order of 10 is 2k), so divides 10 k + 1. Hence, 10 k n (10k + 1) n = a 1 a 2... a k.a k+1... a 2k = a 1 a 2... a k + 0.a 1 a 2... a k + 0.a k+1... a 2k is an integer. This can occur iff a 1 a 2... a k +a k+1... a 2k is a number consisting only of 9s, and hence, equal to 10 k 1. Problems 1. Prove that for all ositive integers a > 1 and n, n φ(a n 1). 2. Prove that if is a rime, then 1 has a rime factor that is congruent to 1 modulo. 3. For any integer a, set n a = 101a a. Show that for 0 a, b, c, d 99, n a + n b n c + n d (mod 10100) imlies {a, b} = {c, d}. (1994 Putnam Mathematical Cometition) 4. Show that if 3 d 2 n+1, then d (a 2n + 1) for all ositive integers a. 7 Quadratic Residues Let m be an integer greater than 1, and a an integer relatively rime to m. If x 2 a (mod m) has a solution, then we say that a is a quadratic residue 25

26 of m. Otherwise, we say that a is a quadratic non-residue. Now, let be an odd rime. Then the Legendre symbol ( ) a is assigned the value of 1 if a is a quadratic residue of. Otherwise, it is assigned the value of 1. Theorem 7.1. Let be an odd rime, and a and b be integers relatively rime to. Then ( ) (a) a ( 1)/2 (mod ), and (b) ( a a )( b ) ( = ) ab. Proof. If the congruence x 2 a (mod ) has a solution, then a ( 1)/2 x 1 1 (mod ), by Fermat s Little Theorem. If the congruence x 2 a (mod ) has no solutions, then for each i, 1 i 1, there is a unique j i, 1 j 1, such that ij a. Therefore, all the integers from 1 to 1 can be arranged into ( 1)/2 such airs. Taking their roduct, a ( 1)/2 1 2 ( 1) ( 1)! 1 (mod ), by Wilson s Theorem. Part (b) now follows from art (a). Remark. Part (a) is known as Euler s criterion. Examle 7.1. Show that if is an odd rime, then ( ) ( ) ( ) = 0. Solution. Note that 1 2, 2 2,..., (( 1)/2) 2 are distinct modulo, and that (( + 1)/2) 2,..., ( 1) 2 reresent the same residues, simly in reverse. Hence, there are exactly ( 1)/2 quadratic residues, leaving ( 1)/2 quadratic non-residues. Therefore, the given sum contains ( 1)/2 1s and ( 1)/2 1s. Theorem 7.2. Gauss s Lemma. Let be an odd rime and let a be relatively rime to. Consider the least non-negative residues of a, 2a,..., 26

27 (( 1)/2)a modulo. If n is the number of these residues that are greater than /2, then ( ) a = ( 1) n. ( ) 1 Theorem 7.3. If is an odd rime, then = ( 1) ( 1)/2 ; that is, ( ) { 1 1 if 1 (mod 4), = 1 if 3 (mod 4). Proof. This follows from Theorem 4.9 (and Theorem 7.1). ( ) Theorem 7.4. If is an odd rime, then = ( 1) (2 1)/8 ; that is, ( ) { 2 1 if 1 or 7 (mod 8), = 1 if 3 or 5 (mod 8). Proof. If 1 or 5 (mod 8), then ( ) 1 2 ( 1)/2! ( 1) 2 ( ) ( ) ( 5) ( 3) ( 1) 2 2 ( ) 1 ( 1) ( 1)/4! 2 2 ( 1)/2 ( 1) ( 1)/4 ( By Theorem 7.1, 2 (mod ). 2 ) ( = ( 1) ( 1)/4. Hence, 1 or 5 (mod 8). Similarly, if 3 or 7 (mod 8), then ( ) ( ) ( 1)/2! ( ) 1 ( 1) (+1)/4! 2 2 ( 1)/2 ( 1) (+1)/4 (mod ). 2 ) = 1 or 1 according as ( 1 ) ( 5) ( 3) ( 1) 2 27

28 ( Hence, 2 ) = 1 or 1 according as 7 or 3 (mod 8). Examle 7.2. Prove that if n is an odd ositive integer, then every rime divisor of 2 n 1 is of the form 8k ± 1. (Comare to Examle 6.2) Solution. Let (2 n 1), where( ) is rime. Let n = 2m + 1. Then 2 n 2 2m+1 2(2 m ) 2 1 (mod ) = 1 is of the form 8k ± 1. Theorem 7.5. The Law of Quadratic Recirocity. For distinct odd rimes and q, ( ) ( ) q = ( 1) 1 2 q 1 2. q Examle 7.3. For which rimes > 3 does the congruence x 2 3 (mod ) have a solution? ( ) ( ) ( ) Solution. We seek for which = = 1. By quadratic recirocity, ( ) ( ) ( ) 3 1 = ( 1) ( 1)/2 =, 3 by Theorem 7.3. Thus, in general, ( ) 3 = ( 1 ) ( ) 3 = 2 ( 3 ) ( ) 2 1 = ( ). 3 And, ( 3 ) = 1 iff 1 (mod 3). Since 4 (mod 6), we have that x2 3 (mod ) has a solution iff 1 (mod 6). Examle 7.4. Show that if = 2 n + 1, n 2, is rime, then 3 ( 1)/2 + 1 is divisible by. Solution. We must have that n is even, say 2k, for otherwise 0 (mod 3). By Theorem 7.1, ( ) 3 3 ( 1)/2 (mod ). However, 1 (mod 4), and 4 k (mod 3) ( 3) = 1, and by quadratic recirocity, ( 3 ) ( ) = ( 1) ( 1)/2 = 1, 3 28

29 so ( ) 3 = 1 3 ( 1)/ (mod ). Useful Facts (a) If is a rime and 1 or 3 (mod 8), then there exist ositive integers x and y such that = x 2 + 2y 2. (b) If is a rime and 1 (mod 6), then there exist ositive integers x and y such that = x 2 + 3y 2. Problems 1. Show that if > 3 is a rime, then the sum of the quadratic residues among the integers 1, 2,..., 1 is divisible by. 2. Let F n denote the n th Fibonacci number. Prove that if > 5 is a rime, then ( F (mod ). 5) 3. Show that 16 is a erfect 8 th ower modulo for any rime. 4. Let a, b, and c be ositive integers that are airwise relatively rime, and that satisfy a 2 ab + b 2 = c 2. Show that every rime factor of c is of the form 6k Let be an odd rime and let ζ be a rimitive th root of unity; that is, ζ is a comlex number such that ζ = 1 and ζ k 1 for 1 k 1. Let A and B denote the set of quadratic residues and non-residues modulo, resectively. Finally, let α = k A ζ k and β = k B ζ k. For examle, for = 7, α = ζ + ζ 2 + ζ 4 and β = ζ 3 + ζ 5 + ζ 6. Show that α and β are the roots of ( ) 1 1 x 2 + x + =

30 8 Primitive Roots If the order of g modulo m is φ(m), then we say that g is a rimitive root modulo m, or simly of m. Examle 8.1. Show that 2 is a rimitive root modulo 3 n for all n 1. Solution. The statement is easily verified for n = 1, so assume the result is true for some n = k; that is, 2 φ(3k) 2 2 3k 1 1 (mod 3 k ). Now, let d be the order of 2 modulo 3 k+1. Then 2 d 1 (mod 3 k+1 ) 2 d 1 (mod 3 k ), so 2 3 k 1 d. However, d φ(3 k+1 ), or d 2 3 k. We deduce that d is either 2 3 k 1 or 2 3 k. Now we require the following lemma: Lemma n n (mod 3 n+1 ), for all n 1. This is true for n = 1, so assume it is true for some n = k. Then by assumtion, 2 2 3k 1 = k + 3 k+1 m for some integer m 2 2 3k = k k+2 M 2 2 3k k+1 (mod 3 k+2 ). By induction, the lemma is roved. for some integer M (obtained by cubing) Therefore, 2 2 3k k 1 (mod 3 k+1 ), so the order of 2 modulo 3 k+1 is 2 3 k, and again by induction, the result follows. Corollary 8.2. If 2 n 1 (mod 3 k ), then 3 k 1 n. Proof. The given imlies 2 2n 1 (mod 3 k ) φ(3 k ) 2n, or 3 k 1 n. Theorem 8.3. If m has a rimitive root, then it has φ(φ(m)) (distinct) rimitive roots modulo m. Theorem 8.4. The ositive integer m has a rimitive root iff m is one of 2, 4, k, or 2 k, where is an odd rime. Theorem 8.5. If g is a rimitive root of m, then g n 1 (mod m) iff φ(m) n. Furthermore, g n 0 g n 1 iff φ(m) (n 0 n 1 ). Proof. This follows directly from Theorem 6.1. Theorem 8.6. If g is a rimitive root of m, then the owers 1, g, g 2,..., g φ(m) 1 reresent each integer relatively rime to m uniquely modulo m. In articular, if m > 2, then g φ(m)/2 1 modulo m. 30

31 Proof. Clearly, each ower g i is relatively rime to m, and there are φ(m) integers relatively rime to m. Also, if g i g j (mod m), then g i j 1 φ(m) (i j) by Theorem 8.6, so each of the owers are distinct modulo m. Hence, each integer relatively rime to m is some ower g i modulo m. Furthermore, there is a unique i, 0 i φ(m) 1, such that g i 1 g 2i 1 2i = φ(m), or i = φ(m)/2. Proosition 8.7. Let m be a ositive integer. Then the only solutions to the congruence x 2 1 (mod m) are x ±1 (mod m) iff m has a rimitive root. Proof. This follows from Examle 4.9. Examle 8.2. For a ositive integer m, let S be the set of ositive integers less than m that are relatively rime to m, and let P be the roduct of the elements in S. Show that P ±1 (mod m), with P 1 (mod m) iff m has a rimitive root. Solution. We use a similar strategy as in the roof of Wilson s Theorem. The result is clear for m = 2, so assume that m 3. We artition S as follows: Let A be the elements of S that are solutions to the congruence x 2 1 (mod m), and let B be the remaining elements. The elements in B can be arranged into airs, by airing each with its distinct multilicative inverse. Hence, the roduct of the elements in B is 1 modulo m. The elements in A may also be arranged into airs, by airing each with its distinct additive inverse, i.e. x and m x. These must be distinct, because otherwise, x = m/2, which is not relatively rime to m. Note that their roduct is x(m x) mx x 2 1 (mod m). Now if m has a rimitive root, then by Proosition 8.7, A consists of only the two elements 1 and 1, so P 1 (mod m). Otherwise, by Examle 4.9, the number of elements of A is a ower of two that is at least 4, so the number of such airs in A is even, and P 1 (mod m). Remark. For m rime, this simly becomes Wilson s Theorem. Theorem 8.8. (1) If g is a rimitive root of, a rime, then g or g + is a rimitive root of 2, according as g 1 1 (mod 2 ) or g 1 1 (mod 2 ). (2) If g is a rimitive root of k, where k 2 and is rime, then g is a rimitive root of k+1. By Theorem 8.6, given a rimitive root g of m, for each a relatively rime 31

32 to m, there exists a unique integer i modulo φ(m) such that g i a (mod m). This i is called the index of a with resect to the base g, denoted by ind g (a) (i is deendent on g, so it must be secified). Indices have striking similarity to logarithms, as seen in the following roerties: (1) ind g (1) 0 (mod φ(m)), ind g (g) 1 (mod φ(m)), (2) a b (mod m) ind g (a) ind g (b) (mod φ(m)), (3) ind g (ab) ind g (a) + ind g (b) (mod φ(m)), (4) ind g (a k ) k ind g (a) (mod φ(m)). Theorem 8.9. If is a rime and a is not divisible by, then the congruence x n a (mod ) has gcd(n, 1) solutions or no solutions according as a ( 1)/ gcd(n, 1) 1 (mod ) or a ( 1)/ gcd(n, 1) 1 (mod ). Proof. Let g be a rimitive root of, and let i be the index of a with resect to g. Also, any solution x must be relatively rime to, so let u be the index of x. Then the congruence x n a becomes g nu g i (mod ) nu i (mod 1). Let k = gcd(n, 1). Since g is a rimitive root of, k i g i( 1)/k a ( 1)/k 1. The result now follows from Theorem Remark. Taking to be an odd rime and n = 2, we deduce Euler s criterion. Examle 8.3 Let n 2 be an integer and = 2 n + 1. Show that if 3 ( 1)/ (mod ), then is a rime. (The converse to Examle 7.4.) Solution. From 3 ( 1)/2 3 2n 1 1 (mod ), we obtain 3 2n 1 (mod ), so the order of 3 is 2 n = 1, but the order also divides φ() 1. Therefore, φ() = 1, and is a rime. Examle 8.4. Prove that if n = 3 k 1, then 2 n 1 (mod 3 k ). (A artial converse to Corollary 8.2.) Solution. By Examle 8.1, 2 is a rimitive root of 3 k. Therefore, 2 has order φ(3 k ) = 2 3 k 1 = 2n 2 2n 1 (2 n 1)(2 n + 1) 0 (mod 3 k ). However, 2 n 1 ( 1) 3k (mod 3), so 2 n (mod 3 k ). 32

33 Examle 8.5. Find all ositive integers n > 1 such that is an integer. (1990 IMO) 2 n + 1 n 2 Solution. Clearly, n must be odd. Now assume that 3 k n; that is, 3 k is the highest ower of 3 dividing n. Then 3 2k n 2 (2 n + 1) 2 n 1 (mod 3 2k ) 3 2k 1 n, by Corollary 8.2 2k 1 k k 1, showing that n has at most one factor of 3. We observe that n = 3 is a solution. Suose that n has a rime factor greater than 3; let be the least such rime. Then (2 n +1) 2 n 1 (mod ). Let d be the order of 2 modulo. Since 2 2n 1, d 2n. If d is odd, then d n 2 n 1, contradiction, so d is even, say d = 2d 1. Then 2d 1 2n d 1 n. Also, d ( 1), or 2d 1 ( 1) d 1 ( 1)/2 <. But d 1 n, so d 1 = 1 or d 1 = 3. If d 1 = 1, then d = 2, and (mod ), contradiction. If d 1 = 3, then d = 6, and (mod ), or 63 = 7. However, the order of 2 modulo 7 is 3, which is odd, again contradiction. Therefore, no such can exist, and the only solution is n = 3. Useful Facts All rime divisors of the Fermat number 2 2n + 1, n > 1, are of the form 2 n+2 k + 1. Problems 1. Let be an odd rime. Prove that for all i, 0 i 2. 1 i + 2 i + + ( 1) i 0 (mod ) 2. Show that if is an odd rime, then the congruence x 4 1 (mod ) has a solution iff 1 (mod 8). 3. Show that if a and n are ositive integers with a odd, then a 2n 1 (mod 2 n+2 ). 4. The number has the remarkable roerty that multilying it by 1, 2, 3, 4, 5, and 6 cyclically ermutes the digits. What are other numbers that have this roerty? Hint: Comute

34 9 Dirichlet Series Desite the intimidating name, Dirichlet series are easy to work with, and can rovide quick roofs to certain number-theoretic identities, such as Examle 3.2. Let α be a function taking the ositive integers to the integers. Then we say that f(s) = n=1 α(n) n s = α(1) + α(2) 2 s + α(3) 3 s + is the Dirichlet series generating function (Dsgf) of the function α, which we denote by f(s) α(n). Like general generating functions, these generating functions are used to rovide information about their corresonding number-theoretic functions, rimarily through maniulation of the generating functions. Let 1 denote the function which is 1 for all ositive integers; that is, 1(n) = 1 for all n. Let δ 1 (n) be the function defined by { 1 if n = 1, δ 1 (n) = 0 if n > 1. It is easy to check that 1 and δ 1 are multilicative. Now, let α and β be functions taking the ositive integers to the integers. The convolution of α and β, denoted α β, is defined by (α β)(n) = d n α(d)β(n/d). Note that convolution is symmetric; that is, α β = β α. Theorem 9.1. Let f(s) α(n) and g(s) β(n). Then (f g)(s) (α β)(n). We now do three examles. The Dsgf of 1(n) is the well-known Riemann Zeta function ζ(s): ζ(s) = n=1 1 n s = s s +, so ζ(s) 1(n). This function will lay a rominent role in this theory. What makes this theory nice to work with is that we may work with these 34

35 functions at a urely formal level; no knowledge of the analytic roerties of ζ(s) or indeed of any other Dsgf is required. By Theorem 9.1, the number-theoretic function corresonding to ζ 2 (s) is 1(d)1(n/d) = 1 = τ(n). d n d n Hence, ζ 2 (s) τ(n). Finally, it is clear that 1 δ 1 (n). If α is a multilicative function, then we can comute the Dsgf corresonding to α using the following theorem. n=1 Theorem 9.2. Let α be a multilicative function. Then α(n) n s = k=0 α( k ) ks = [1 + α() s + α( 2 ) 2s + α( 3 ) 3s + ], where the roduct on the right is taken over all rime numbers. As before, if we take α = 1, then we obtain ζ(s) = = = (1 + s + 2s + 3s + ) ( 1 ) 1 s 1 (1 s ), an identity that will be useful. We say that a ositive integer n > 1 is square-free if n contains no reeated rime factors; that is, 2 n for all rimes. With this in mind, we define the Möbius function µ as follows: µ(n) = 1 if n = 1, 0 if n is not square-free, and ( 1) k if n is square-free and has k rime factors. It is easy to check that µ is multilicative. By Theorem 9.2, the corresonding Dsgf is given by (1 s ) = 1 ζ(s). 35

36 Hence, 1/ζ(s) µ(n), and this roerty makes the the seemingly mysterious function µ very imortant, as seen in the following theorem. Theorem 9.3. (Möbius Inversion Formula) Let α and β be functions such that β(n) = α(d). d n Then α(n) = d n µ(n/d)β(d). Proof. Let f(s) α(n) and g(s) β(n). The condition is equivalent to β = α 1, or g(s) = f(s)ζ(s), and the conclusion is equivalent to α = β µ, or f(s) = g(s)/ζ(s). Theorem 9.4. Let f(s) α(n). Then for any integer k, f(s k) n k α(n). For more on Dirichlet series, and generating functions in general, see H. Wilf, Generatingfunctionology. Problems 1. Let α, β, and γ be functions taking the ositive integers to the integers. (a) Prove that α 1 = α. (b) Prove that (α β) γ = α (β γ). (c) Prove that if α and β are multilicative, then so is α β. 2. Prove that the following relations hold: ζ(s 1) φ(n), ζ(s) ζ(s)ζ(s 1) σ(n), ζ(s) ζ(2s) µ(n). 3. Let the rime factorization of a ositive integer n > 1 be e 1 1 e 2 2 e k k. Define the functions λ and θ by λ(n) = ( 1) e 1+e 2 + +e k and θ(n) = 2 k. Set λ(1) = θ(1) = 1. Show that λ and θ are multilicative, and that ζ(2s) ζ(s) λ(n) and ζ 2 (s) ζ(2s) θ(n). 36

Number Theory Naoki Sato <sato@artofproblemsolving.com>

Number Theory Naoki Sato <sato@artofproblemsolving.com> Number Theory Naoki Sato 0 Preface This set of notes on number theory was originally written in 1995 for students at the IMO level. It covers the basic background material

More information

As we have seen, there is a close connection between Legendre symbols of the form

As we have seen, there is a close connection between Legendre symbols of the form Gauss Sums As we have seen, there is a close connection between Legendre symbols of the form 3 and cube roots of unity. Secifically, if is a rimitive cube root of unity, then 2 ± i 3 and hence 2 2 3 In

More information

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

More information

SOME PROPERTIES OF EXTENSIONS OF SMALL DEGREE OVER Q. 1. Quadratic Extensions

SOME PROPERTIES OF EXTENSIONS OF SMALL DEGREE OVER Q. 1. Quadratic Extensions SOME PROPERTIES OF EXTENSIONS OF SMALL DEGREE OVER Q TREVOR ARNOLD Abstract This aer demonstrates a few characteristics of finite extensions of small degree over the rational numbers Q It comrises attemts

More information

Number Theory: A Mathemythical Approach. Student Resources. Printed Version

Number Theory: A Mathemythical Approach. Student Resources. Printed Version Number Theory: A Mathemythical Approach Student Resources Printed Version ii Contents 1 Appendix 1 2 Hints to Problems 3 Chapter 1 Hints......................................... 3 Chapter 2 Hints.........................................

More information

Homework until Test #2

Homework until Test #2 MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such

More information

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2. Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

More information

k, then n = p2α 1 1 pα k

k, then n = p2α 1 1 pα k Powers of Integers An integer n is a perfect square if n = m for some integer m. Taking into account the prime factorization, if m = p α 1 1 pα k k, then n = pα 1 1 p α k k. That is, n is a perfect square

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

Section 4.2: The Division Algorithm and Greatest Common Divisors

Section 4.2: The Division Algorithm and Greatest Common Divisors Section 4.2: The Division Algorithm and Greatest Common Divisors The Division Algorithm The Division Algorithm is merely long division restated as an equation. For example, the division 29 r. 20 32 948

More information

Handout NUMBER THEORY

Handout NUMBER THEORY Handout of NUMBER THEORY by Kus Prihantoso Krisnawan MATHEMATICS DEPARTMENT FACULTY OF MATHEMATICS AND NATURAL SCIENCES YOGYAKARTA STATE UNIVERSITY 2012 Contents Contents i 1 Some Preliminary Considerations

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Some practice problems for midterm 2

Some practice problems for midterm 2 Some practice problems for midterm 2 Kiumars Kaveh November 15, 2011 Problem: What is the remainder of 6 2000 when divided by 11? Solution: This is a long-winded way of asking for the value of 6 2000 mod

More information

MATH 289 PROBLEM SET 4: NUMBER THEORY

MATH 289 PROBLEM SET 4: NUMBER THEORY MATH 289 PROBLEM SET 4: NUMBER THEORY 1. The greatest common divisor If d and n are integers, then we say that d divides n if and only if there exists an integer q such that n = qd. Notice that if d divides

More information

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Discrete Mathematics, Chapter 4: Number Theory and Cryptography Discrete Mathematics, Chapter 4: Number Theory and Cryptography Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 4 1 / 35 Outline 1 Divisibility

More information

1 Gambler s Ruin Problem

1 Gambler s Ruin Problem Coyright c 2009 by Karl Sigman 1 Gambler s Ruin Problem Let N 2 be an integer and let 1 i N 1. Consider a gambler who starts with an initial fortune of $i and then on each successive gamble either wins

More information

Lectures on Number Theory. Lars-Åke Lindahl

Lectures on Number Theory. Lars-Åke Lindahl Lectures on Number Theory Lars-Åke Lindahl 2002 Contents 1 Divisibility 1 2 Prime Numbers 7 3 The Linear Diophantine Equation ax+by=c 12 4 Congruences 15 5 Linear Congruences 19 6 The Chinese Remainder

More information

TRANSCENDENTAL NUMBERS

TRANSCENDENTAL NUMBERS TRANSCENDENTAL NUMBERS JEREMY BOOHER. Introduction The Greeks tried unsuccessfully to square the circle with a comass and straightedge. In the 9th century, Lindemann showed that this is imossible by demonstrating

More information

Math 453: Elementary Number Theory Definitions and Theorems

Math 453: Elementary Number Theory Definitions and Theorems Math 453: Elementary Number Theory Definitions and Theorems (Class Notes, Spring 2011 A.J. Hildebrand) Version 5-4-2011 Contents About these notes 3 1 Divisibility and Factorization 4 1.1 Divisibility.......................................

More information

Pythagorean Triples and Rational Points on the Unit Circle

Pythagorean Triples and Rational Points on the Unit Circle Pythagorean Triles and Rational Points on the Unit Circle Solutions Below are samle solutions to the roblems osed. You may find that your solutions are different in form and you may have found atterns

More information

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

More information

Today s Topics. Primes & Greatest Common Divisors

Today s Topics. Primes & Greatest Common Divisors Today s Topics Primes & Greatest Common Divisors Prime representations Important theorems about primality Greatest Common Divisors Least Common Multiples Euclid s algorithm Once and for all, what are prime

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called

More information

Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

More information

8 Divisibility and prime numbers

8 Divisibility and prime numbers 8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

More information

Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov alexanderrem@gmail.com

Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov alexanderrem@gmail.com Polynomials Alexander Remorov alexanderrem@gmail.com Warm-up Problem 1: Let f(x) be a quadratic polynomial. Prove that there exist quadratic polynomials g(x) and h(x) such that f(x)f(x + 1) = g(h(x)).

More information

Elementary Number Theory

Elementary Number Theory Elementary Number Theory A revision by Jim Hefferon, St Michael s College, 2003-Dec of notes by W. Edwin Clark, University of South Florida, 2002-Dec L A TEX source compiled on January 5, 2004 by Jim Hefferon,

More information

An Introductory Course in Elementary Number Theory. Wissam Raji

An Introductory Course in Elementary Number Theory. Wissam Raji An Introductory Course in Elementary Number Theory Wissam Raji 2 Preface These notes serve as course notes for an undergraduate course in number theory. Most if not all universities worldwide offer introductory

More information

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook. Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

More information

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY January 10, 2010 CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY The set of polynomials over a field F is a ring, whose structure shares with the ring of integers many characteristics.

More information

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS John A. Beachy Northern Illinois University 2014 ii J.A.Beachy This is a supplement to Abstract Algebra, Third Edition by John A. Beachy and William D. Blair

More information

SUM OF TWO SQUARES JAHNAVI BHASKAR

SUM OF TWO SQUARES JAHNAVI BHASKAR SUM OF TWO SQUARES JAHNAVI BHASKAR Abstract. I will investigate which numbers can be written as the sum of two squares and in how many ways, providing enough basic number theory so even the unacquainted

More information

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights

More information

Computer and Network Security

Computer and Network Security MIT 6.857 Computer and Networ Security Class Notes 1 File: http://theory.lcs.mit.edu/ rivest/notes/notes.pdf Revision: December 2, 2002 Computer and Networ Security MIT 6.857 Class Notes by Ronald L. Rivest

More information

Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures Number Theory Hungarian Style Cameron Byerley s interpretation of Csaba Szabó s lectures August 20, 2005 2 0.1 introduction Number theory is a beautiful subject and even cooler when you learn about it

More information

On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples

On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples Brian Hilley Boston College MT695 Honors Seminar March 3, 2006 1 Introduction 1.1 Mazur s Theorem Let C be a

More information

6.042/18.062J Mathematics for Computer Science December 12, 2006 Tom Leighton and Ronitt Rubinfeld. Random Walks

6.042/18.062J Mathematics for Computer Science December 12, 2006 Tom Leighton and Ronitt Rubinfeld. Random Walks 6.042/8.062J Mathematics for Comuter Science December 2, 2006 Tom Leighton and Ronitt Rubinfeld Lecture Notes Random Walks Gambler s Ruin Today we re going to talk about one-dimensional random walks. In

More information

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12 CONTINUED FRACTIONS AND PELL S EQUATION SEUNG HYUN YANG Abstract. In this REU paper, I will use some important characteristics of continued fractions to give the complete set of solutions to Pell s equation.

More information

Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm MTHSC 412 Section 2.4 Prime Factors and Greatest Common Divisor Greatest Common Divisor Definition Suppose that a, b Z. Then we say that d Z is a greatest common divisor (gcd) of a and b if the following

More information

The Magnus-Derek Game

The Magnus-Derek Game The Magnus-Derek Game Z. Nedev S. Muthukrishnan Abstract We introduce a new combinatorial game between two layers: Magnus and Derek. Initially, a token is laced at osition 0 on a round table with n ositions.

More information

n k=1 k=0 1/k! = e. Example 6.4. The series 1/k 2 converges in R. Indeed, if s n = n then k=1 1/k, then s 2n s n = 1 n + 1 +...

n k=1 k=0 1/k! = e. Example 6.4. The series 1/k 2 converges in R. Indeed, if s n = n then k=1 1/k, then s 2n s n = 1 n + 1 +... 6 Series We call a normed space (X, ) a Banach space provided that every Cauchy sequence (x n ) in X converges. For example, R with the norm = is an example of Banach space. Now let (x n ) be a sequence

More information

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 Solutions CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

More information

Overview of Number Theory Basics. Divisibility

Overview of Number Theory Basics. Divisibility Overview of Number Theory Basics Murat Kantarcioglu Based on Prof. Ninghui Li s Slides Divisibility Definition Given integers a and b, b 0, b divides a (denoted b a) if integer c, s.t. a = cb. b is called

More information

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5.

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5. PUTNAM TRAINING POLYNOMIALS (Last updated: November 17, 2015) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include

More information

MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS

MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS Class Meetings: MW 2:00-3:15 pm in Physics 144, September 7 to December 14 [Thanksgiving break November 23 27; final exam December 21] Instructor:

More information

The last three chapters introduced three major proof techniques: direct,

The last three chapters introduced three major proof techniques: direct, CHAPTER 7 Proving Non-Conditional Statements The last three chapters introduced three major proof techniques: direct, contrapositive and contradiction. These three techniques are used to prove statements

More information

Applications of Fermat s Little Theorem and Congruences

Applications of Fermat s Little Theorem and Congruences Applications of Fermat s Little Theorem and Congruences Definition: Let m be a positive integer. Then integers a and b are congruent modulo m, denoted by a b mod m, if m (a b). Example: 3 1 mod 2, 6 4

More information

Quotient Rings and Field Extensions

Quotient Rings and Field Extensions Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

More information

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m) Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.

More information

Math 319 Problem Set #3 Solution 21 February 2002

Math 319 Problem Set #3 Solution 21 February 2002 Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod

More information

MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

More information

Lectures on the Dirichlet Class Number Formula for Imaginary Quadratic Fields. Tom Weston

Lectures on the Dirichlet Class Number Formula for Imaginary Quadratic Fields. Tom Weston Lectures on the Dirichlet Class Number Formula for Imaginary Quadratic Fields Tom Weston Contents Introduction 4 Chater 1. Comlex lattices and infinite sums of Legendre symbols 5 1. Comlex lattices 5

More information

Chapter 3. if 2 a i then location: = i. Page 40

Chapter 3. if 2 a i then location: = i. Page 40 Chapter 3 1. Describe an algorithm that takes a list of n integers a 1,a 2,,a n and finds the number of integers each greater than five in the list. Ans: procedure greaterthanfive(a 1,,a n : integers)

More information

PYTHAGOREAN TRIPLES KEITH CONRAD

PYTHAGOREAN TRIPLES KEITH CONRAD PYTHAGOREAN TRIPLES KEITH CONRAD 1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a + b = c. Examples include (3, 4, 5), (5, 1, 13), and (8, 15, 17). Below is an ancient

More information

MOP 2007 Black Group Integer Polynomials Yufei Zhao. Integer Polynomials. June 29, 2007 Yufei Zhao yufeiz@mit.edu

MOP 2007 Black Group Integer Polynomials Yufei Zhao. Integer Polynomials. June 29, 2007 Yufei Zhao yufeiz@mit.edu Integer Polynomials June 9, 007 Yufei Zhao yufeiz@mit.edu We will use Z[x] to denote the ring of polynomials with integer coefficients. We begin by summarizing some of the common approaches used in dealing

More information

Lecture 21 and 22: The Prime Number Theorem

Lecture 21 and 22: The Prime Number Theorem Lecture and : The Prime Number Theorem (New lecture, not in Tet) The location of rime numbers is a central question in number theory. Around 88, Legendre offered eerimental evidence that the number π()

More information

Introduction to NP-Completeness Written and copyright c by Jie Wang 1

Introduction to NP-Completeness Written and copyright c by Jie Wang 1 91.502 Foundations of Comuter Science 1 Introduction to Written and coyright c by Jie Wang 1 We use time-bounded (deterministic and nondeterministic) Turing machines to study comutational comlexity of

More information

1. Prove that the empty set is a subset of every set.

1. Prove that the empty set is a subset of every set. 1. Prove that the empty set is a subset of every set. Basic Topology Written by Men-Gen Tsai email: b89902089@ntu.edu.tw Proof: For any element x of the empty set, x is also an element of every set since

More information

FREQUENCIES OF SUCCESSIVE PAIRS OF PRIME RESIDUES

FREQUENCIES OF SUCCESSIVE PAIRS OF PRIME RESIDUES FREQUENCIES OF SUCCESSIVE PAIRS OF PRIME RESIDUES AVNER ASH, LAURA BELTIS, ROBERT GROSS, AND WARREN SINNOTT Abstract. We consider statistical roerties of the sequence of ordered airs obtained by taking

More information

SYSTEMS OF PYTHAGOREAN TRIPLES. Acknowledgements. I would like to thank Professor Laura Schueller for advising and guiding me

SYSTEMS OF PYTHAGOREAN TRIPLES. Acknowledgements. I would like to thank Professor Laura Schueller for advising and guiding me SYSTEMS OF PYTHAGOREAN TRIPLES CHRISTOPHER TOBIN-CAMPBELL Abstract. This paper explores systems of Pythagorean triples. It describes the generating formulas for primitive Pythagorean triples, determines

More information

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any. Algebra 2 - Chapter Prerequisites Vocabulary Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any. P1 p. 1 1. counting(natural) numbers - {1,2,3,4,...}

More information

Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

Every Positive Integer is the Sum of Four Squares! (and other exciting problems) Every Positive Integer is the Sum of Four Squares! (and other exciting problems) Sophex University of Texas at Austin October 18th, 00 Matilde N. Lalín 1. Lagrange s Theorem Theorem 1 Every positive integer

More information

Factoring of Prime Ideals in Galois Extensions

Factoring of Prime Ideals in Galois Extensions Chater 8 Factoring of Prime Ideals in Galois Extensions 8.1 Decomosition and Inertia Grous We return to the general AKLB setu: A is a Dedekind domain with fraction field K, L is a finite searable extension

More information

minimal polyonomial Example

minimal polyonomial Example Minimal Polynomials Definition Let α be an element in GF(p e ). We call the monic polynomial of smallest degree which has coefficients in GF(p) and α as a root, the minimal polyonomial of α. Example: We

More information

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize

More information

Modern Algebra Lecture Notes: Rings and fields set 4 (Revision 2)

Modern Algebra Lecture Notes: Rings and fields set 4 (Revision 2) Modern Algebra Lecture Notes: Rings and fields set 4 (Revision 2) Kevin Broughan University of Waikato, Hamilton, New Zealand May 13, 2010 Remainder and Factor Theorem 15 Definition of factor If f (x)

More information

How To Prove The Dirichlet Unit Theorem

How To Prove The Dirichlet Unit Theorem Chapter 6 The Dirichlet Unit Theorem As usual, we will be working in the ring B of algebraic integers of a number field L. Two factorizations of an element of B are regarded as essentially the same if

More information

Settling a Question about Pythagorean Triples

Settling a Question about Pythagorean Triples Settling a Question about Pythagorean Triples TOM VERHOEFF Department of Mathematics and Computing Science Eindhoven University of Technology P.O. Box 513, 5600 MB Eindhoven, The Netherlands E-Mail address:

More information

PROBLEM SET 6: POLYNOMIALS

PROBLEM SET 6: POLYNOMIALS PROBLEM SET 6: POLYNOMIALS 1. introduction In this problem set we will consider polynomials with coefficients in K, where K is the real numbers R, the complex numbers C, the rational numbers Q or any other

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

How To Solve The Prime Prime Prime Root Problem In Algebraic Theory

How To Solve The Prime Prime Prime Root Problem In Algebraic Theory Introductory Number Theory Course No. 100 331 Sring 2006 Michael Stoll Contents 1. Very Basic Remarks 2 2. Divisibility 2 3. The Euclidean Algorithm 2 4. Prime Numbers and Unique Factorization 4 5. Congruences

More information

Real Roots of Univariate Polynomials with Real Coefficients

Real Roots of Univariate Polynomials with Real Coefficients Real Roots of Univariate Polynomials with Real Coefficients mostly written by Christina Hewitt March 22, 2012 1 Introduction Polynomial equations are used throughout mathematics. When solving polynomials

More information

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important

More information

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition

More information

Primality - Factorization

Primality - Factorization Primality - Factorization Christophe Ritzenthaler November 9, 2009 1 Prime and factorization Definition 1.1. An integer p > 1 is called a prime number (nombre premier) if it has only 1 and p as divisors.

More information

Lecture 3: Finding integer solutions to systems of linear equations

Lecture 3: Finding integer solutions to systems of linear equations Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture

More information

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

More information

On the largest prime factor of x 2 1

On the largest prime factor of x 2 1 On the largest prime factor of x 2 1 Florian Luca and Filip Najman Abstract In this paper, we find all integers x such that x 2 1 has only prime factors smaller than 100. This gives some interesting numerical

More information

RSA and Primality Testing

RSA and Primality Testing and Primality Testing Joan Boyar, IMADA, University of Southern Denmark Studieretningsprojekter 2010 1 / 81 Correctness of cryptography cryptography Introduction to number theory Correctness of with 2

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +

More information

The cyclotomic polynomials

The cyclotomic polynomials The cyclotomic polynomials Notes by G.J.O. Jameson 1. The definition and general results We use the notation e(t) = e 2πit. Note that e(n) = 1 for integers n, e(s + t) = e(s)e(t) for all s, t. e( 1 ) =

More information

Factoring Algorithms

Factoring Algorithms Factoring Algorithms The p 1 Method and Quadratic Sieve November 17, 2008 () Factoring Algorithms November 17, 2008 1 / 12 Fermat s factoring method Fermat made the observation that if n has two factors

More information

STUDENT S SOLUTIONS MANUAL ELEMENTARY NUMBER THEORY. Bart Goddard. Kenneth H. Rosen AND ITS APPLICATIONS FIFTH EDITION. to accompany.

STUDENT S SOLUTIONS MANUAL ELEMENTARY NUMBER THEORY. Bart Goddard. Kenneth H. Rosen AND ITS APPLICATIONS FIFTH EDITION. to accompany. STUDENT S SOLUTIONS MANUAL to accompany ELEMENTARY NUMBER THEORY AND ITS APPLICATIONS FIFTH EDITION Bart Goddard Kenneth H. Rosen AT&T Labs Reproduced by Pearson Addison-Wesley from electronic files supplied

More information

More Properties of Limits: Order of Operations

More Properties of Limits: Order of Operations math 30 day 5: calculating its 6 More Proerties of Limits: Order of Oerations THEOREM 45 (Order of Oerations, Continued) Assume that!a f () L and that m and n are ositive integers Then 5 (Power)!a [ f

More information

6.2 Permutations continued

6.2 Permutations continued 6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of

More information

Unique Factorization

Unique Factorization Unique Factorization Waffle Mathcamp 2010 Throughout these notes, all rings will be assumed to be commutative. 1 Factorization in domains: definitions and examples In this class, we will study the phenomenon

More information

V55.0106 Quantitative Reasoning: Computers, Number Theory and Cryptography

V55.0106 Quantitative Reasoning: Computers, Number Theory and Cryptography V55.0106 Quantitative Reasoning: Computers, Number Theory and Cryptography 3 Congruence Congruences are an important and useful tool for the study of divisibility. As we shall see, they are also critical

More information

Algebraic and Transcendental Numbers

Algebraic and Transcendental Numbers Pondicherry University July 2000 Algebraic and Transcendental Numbers Stéphane Fischler This text is meant to be an introduction to algebraic and transcendental numbers. For a detailed (though elementary)

More information

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)! Math 7 Fall 205 HOMEWORK 5 SOLUTIONS Problem. 2008 B2 Let F 0 x = ln x. For n 0 and x > 0, let F n+ x = 0 F ntdt. Evaluate n!f n lim n ln n. By directly computing F n x for small n s, we obtain the following

More information

Factoring Polynomials

Factoring Polynomials Factoring Polynomials Sue Geller June 19, 2006 Factoring polynomials over the rational numbers, real numbers, and complex numbers has long been a standard topic of high school algebra. With the advent

More information

Just the Factors, Ma am

Just the Factors, Ma am 1 Introduction Just the Factors, Ma am The purpose of this note is to find and study a method for determining and counting all the positive integer divisors of a positive integer Let N be a given positive

More information

Die ganzen zahlen hat Gott gemacht

Die ganzen zahlen hat Gott gemacht Die ganzen zahlen hat Gott gemacht Polynomials with integer values B.Sury A quote attributed to the famous mathematician L.Kronecker is Die Ganzen Zahlen hat Gott gemacht, alles andere ist Menschenwerk.

More information

DIVISIBILITY AND GREATEST COMMON DIVISORS

DIVISIBILITY AND GREATEST COMMON DIVISORS DIVISIBILITY AND GREATEST COMMON DIVISORS KEITH CONRAD 1 Introduction We will begin with a review of divisibility among integers, mostly to set some notation and to indicate its properties Then we will

More information

Continued Fractions. Darren C. Collins

Continued Fractions. Darren C. Collins Continued Fractions Darren C Collins Abstract In this paper, we discuss continued fractions First, we discuss the definition and notation Second, we discuss the development of the subject throughout history

More information

Complex Conjugation and Polynomial Factorization

Complex Conjugation and Polynomial Factorization Comlex Conjugation and Polynomial Factorization Dave L. Renfro Summer 2004 Central Michigan University I. The Remainder Theorem Let P (x) be a olynomial with comlex coe cients 1 and r be a comlex number.

More information

Test1. Due Friday, March 13, 2015.

Test1. Due Friday, March 13, 2015. 1 Abstract Algebra Professor M. Zuker Test1. Due Friday, March 13, 2015. 1. Euclidean algorithm and related. (a) Suppose that a and b are two positive integers and that gcd(a, b) = d. Find all solutions

More information

3 1. Note that all cubes solve it; therefore, there are no more

3 1. Note that all cubes solve it; therefore, there are no more Math 13 Problem set 5 Artin 11.4.7 Factor the following polynomials into irreducible factors in Q[x]: (a) x 3 3x (b) x 3 3x + (c) x 9 6x 6 + 9x 3 3 Solution: The first two polynomials are cubics, so if

More information

Precalculus Prerequisites a.k.a. Chapter 0. August 16, 2013

Precalculus Prerequisites a.k.a. Chapter 0. August 16, 2013 Precalculus Prerequisites a.k.a. Chater 0 by Carl Stitz, Ph.D. Lakeland Community College Jeff Zeager, Ph.D. Lorain County Community College August 6, 0 Table of Contents 0 Prerequisites 0. Basic Set

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem The Chinese Remainder Theorem Evan Chen evanchen@mit.edu February 3, 2015 The Chinese Remainder Theorem is a theorem only in that it is useful and requires proof. When you ask a capable 15-year-old why

More information

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by SUBGROUPS OF CYCLIC GROUPS KEITH CONRAD 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by g = {g k : k Z}. If G = g, then G itself is cyclic, with g as a generator. Examples

More information