Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby

Size: px
Start display at page:

Download "Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby"

Transcription

1 Math 8: Advanced Number Theory Samit Dasgupta and Gary Kirby April, 05

2 Contents Basics of Number Theory. The Fundamental Theorem of Arithmetic The Euclidean Algorithm and Unique Factorization The Riemann Zeta Function Some Functions in Number Theory Congruences, Euler s φ-function, and Wilson s Theorem Continued Fractions 5. Farey Fractions Continued Fractions Infinite Continued Fractions Irrational Numbers and Infinite Continued Fractions Approximation by Continued Fractions Periodic Continued Fractions Example of a purely periodic continued fraction Pell s Equation Rings in Number Theory 4 3. Rings Integral Domains Quadratic rings of non-square discriminant The Chinese Remainder Theorem The group (/m) Quadratic Reciprocity, Quadratic Forms, and Quadratic Rings Quadratic Residues Prime Factorization in the Gaussian integers The Legendre Symbol and Quadratic Reciprocity

3 4.4 The Jacobi Symbol Binary Quadratic Forms Equivalence classes of BQFs Quadratic Rings Conjugation and norms in a quadratic ring Nondegenerate BQFs and Quadratic rings Units in Quadratic Rings The Ideal Class Group Binary Quadratic Forms and the Ideal Class Group The Bhargava cube

4 Chapter Basics of Number Theory. The Fundamental Theorem of Arithmetic We denote by the ring of integers. The following is one of the essential axioms satisfied by. This axiom forms the basis of the method of mathematical induction. Axiom.. (Well-Ordering Property of ). Let S be any non-empty subset of the positive integers. Then S has a least element, i.e., there exists an s S such that s x for all x S. By letting S = S +, it is clear that the same property holds if S is a subset of the nonnegative integers as well (or more generally, any subset of integers bounded from below). Theorem.. (Division Algorithm). Let a, b, a 0. Then there exists unique q, r such that b = aq + r and 0 r < a. Proof. Existence: Consider the set S = {b aq : q, b aq 0}. It is clear that S is nonempty, by taking q to have opposite sign from a and larger than b. By the well-ordering property of, the set S has a least element r. So we have b = aq + r, with r 0; we must show that r < a. If on the contrary r a, we note that r a = b aq a = b a(q ± ) 0, implying that r a S, contradicting the minimality of r. Therefore r < a as desired. Uniqueness: Suppose b = aq + r with 0 r < a and b = aq + r with 0 r < a. The inequalities for r and r imply that a < r r < a. Subtracting the two equations for b yields r r = a(q q). The only multiple of a between a and a is zero. Thus r r = 0 so r = r and hence q = b r a = b r a 3 = q.

5 Definition..3. If a, b, then we say a divides b and write a b if there exists d such that ad = b. Theorem..4. Let a, b, not both zero. There exists a unique integer d > 0 such that: d a and d b; for e, we have e a and e b = e d. The integer d is called the greatest common divisor of a and b, denoted d = (a, b). Proof. Consider the set of all linear combinations: a,b = {ax + b y : x, y }. Let d be the smallest positive integer of the set a,b. (Note that a,b contains a positive integer, since a and b are not both zero; for example, take x = a and y = b. A smallest positive integer in a,b exists by the Well-Ordering Property of.) Claim: d a. Using the division algorithm, write a = dq + r with 0 r < d. We ll show that r a,b. We know that d = ax + b y for some integers x and y since d a,b. Thus r = a dq = a (ax + b y)q = a axq + b yq = a( xq) + b( yq). So r a,b by definition. If r is nonzero, then r is a positive integer less than d contained in a,b, contradicting the definition of d. Thus r = 0, so a = dq, i.e. d a. By symmetry, d b as well. Now suppose that e is an integer such that e a and e b. So a = eu, b = ev for some integers u and v. Since d = ax + b y for some integers x and y, we have d = eux + ev y = e(ux + v y) and therefore e d. Corollary..5. Given integers a, b, not both zero, there exist x, y such that ax + b y = (a, b). Moreover, for z, there exist x, y such that ax + b y = z if and only if (a, b) z. 4

6 Proof. The first sentence was proved in the course of the proof of the previous theorem. For the second sentence, note that if z is a multiple of d = (a, b), say z = du, then ax + b y = d implies that axu + b yu = du = z. Conversely, if ax + b y = z then d a, d b implies that d (ax + b y) = z. Definition..6. We say that integers a and b are relatively prime or coprime if (a, b) =. Theorem..7 (Fundamental Theorem of Arithmetic). Let a, b, and c be integers. If a and b are relatively prime and a bc, then a c. Proof. Since (a, b) =, we can write = ax +b y for some integers x and y by Corollary..5. Then c = c(ax + b y) = cax +c b y. However, we clearly have a cax, and a bc implies a cb y, so a (cax + c b y) = c as desired.. The Euclidean Algorithm and Unique Factorization Suppose we want to find the greatest common divisor of two integers a and b. Suppose a b > 0. Using the division algorithm, write a = bq + r with 0 r < b. If r = 0 then b divides a, so (a, b) = b. If r 0, we claim that (a, b) = (b, r); hence we can replace the pair {a, b} with {b, r} and repeat the process until we eventually find the greatest common divisor. This is called the Euclidean Algorithm. To prove our claim, let d = (a, b) and d = (b, r). Then d a and d b, so d a bq = r. Therefore d d by the definition of d = (b, r). Similarly, d b, d r implies d bq + r = a, hence d d. Therefore we have d = d. Example. We show (05,87) = 3 using the Euclidean Algorithm: 05 = = = = Definition... An integer p > is prime if for all a, b, we have p ab = p a or p b. Definition... An integer p > is irreducible if p = ab with a, b positive integers = a = or b =. Theorem..3. A positive integer p is prime if and only if p is irreducible. 5

7 Proof. : Suppose p is prime. Say p = ab, where a, b are positive integers. By definition of prime, p ab implies p a or p b. Say p a, so pu = a for some integer u. So p = pub, which implies = ub, and thus u = b =. Similarly if p b, then we find a =. : Suppose p is irreducible. Say p ab. We need to show that p a or p b. Let (p, a) = d. Since d p and p is irreducible, we know that either d = or d = p. If d = p then p = d a, so we are done. Therefore suppose d =, i.e. (p, a) =. By the Fundamental Theorem of Arithmetic, p ab and (p, a) = implies that p b. Theorem..4 (Unique Factorization). Every nonzero integer can be factored uniquely as ± times a product of primes. More precisely, for all nonzero integers n, there is a unique expression n = ±p e pe pe r where < p r < p < < p r are prime numbers and e,..., e r are positive integers. (For n = ±, we take r = 0 and view the empty product to mean n = ±.) Proof. Existence. Let n be a positive integer. We need to show that n can be factored as a product of primes. Let = {positive integers n that can t be factored as a product of primes}. Assume is nonempty and let n be the minimal element of. Note that n >, since we view n = as the empty product of primes. Case : n is prime. Then n = n is already a factorization of n into primes, hence n. Case : n is not prime. Then n = ab for positive integers a, b both smaller than n. But a and b are not in since n is the least element of. So a, b can be factorized as a product of primes and n = ab. Thus n is a product of primes and n is not in. Uniqueness. Let n be a positive integer. Suppose n = p p p r and n = q q q s where p i, q i are positive primes. Then we need to prove that r = s and the p i s are the same as q i s up to ordering. (One easily checks that this is equivalent to the statement of the theorem.) We prove this by induction on r. If r = 0, then n = = q q q s which implies that s = 0, since is not divisible by any prime. Therefore assume that r and p p p r = q q q s. (..) Then p r q q q s, so by the definition of a prime, p r q j for some j =,..., s. But the q j s are all prime and hence irreducible, so p r q j implies p r = q j. Without loss of generality, after possibly reordering the q i, we suppose p r = q s and cancel from (..). We obtain p p p r = q q q s. By induction r = s and {p, p,..., p r } = {q, q,..., q s } as multisets (i.e. counting multiplicity). This implies that r = s and {p, p,..., p r } = {q, q,..., q s } as 6

8 multisets, as desired..3 The Riemann Zeta Function The following is Euclid s classical proof of the infinitude of the primes (c. 300 BC). Theorem.3. (Euclid). There are infinitely many prime numbers. Proof. Suppose there are only finitely many primes p,..., p n. Consider the integer N = p p n. By the Unique Factorization Theorem, the positive integer N + factors uniquely into primes, and in particular has at least one prime factor. Say this prime factor is p i. By the definition of N, it is clear that p i N. But p i (N + ) as well, and hence p i ((N + ) N) =. This is a contradiction since p i is a prime number. Therefore, there must be infinitely many primes. Remark.3.. If we define a sequence by p = and for n >, p n = the smallest prime divisor of p p p n, then it is unknown whether {p, p, p 3, } is the set of all primes in. We now give Euler s analytic proof of the infinitude of the primes (700s). Definition.3.3 (Riemann zeta-function). For real number s >, define ζ(s) := This definition of ζ(s) actually makes sense for all complex numbers s with Re(s) >. Lemma.3.4. For s >, we have ζ(s) = ( p prime p s ). This is called the Euler product representation of ζ(s). Proof. Before giving a rigorous proof, we give the intuitive idea, which boils down to the Unique Factorization Theorem. Not worrying about issues of convergence, we have p prime p s = p prime ( + p s + p s + ), using the formula for a geometric series. Multiplying out the terms on the right side, we get the sum of all terms of the form p α s pα n n as the pi range over all primes. By the Unique Factorization Theorem, every positive integer n has a unique such representation. In other words, we obtain the sum of n s for all n >0, giving the definition of ζ(s). Now let us make this argument rigorous. Fix a positive integer y, and define n= n s. N y := {n : n is divisible only by primes less than or equal to y}. 7

9 Then we claim that for any s > 0, we have p y p prime p s = n N y n s. (.3.) (There are lots if ways to see that the right side converges for s > 0. For instance, note that there are at most (n + ) y elements of N y less than or equal to n. In particular, there are at most (n + ) y elements of N y between n and n. So the sum n N y n s is majorized by n= (n + )y / (n )s. This latter sum converges for all s > 0 by the standard tests from calculus, such as the ratio test.) To prove (.3.), fix an ε > 0. Note that since for each prime p y, = lim s p ( + k p s + p s + + p ks ). Since there are only finitely many primes p y, we can choose k large enough so that p s p y p prime p y p prime ( + p s + p s + + p ks ) < ε (.3.) for each prime p y. Expanding out the second product, we obtain the sum of n s for all n in the set N y,k = {n : n = p α pα pα r r with each p i y and each α i k}. Since the N y,k for increasing k are nested sets of integers (i.e. N N N 3 ) whose union is N y, we can take k large enough so that n s n N y n s n N y,k Using the triangle inequality with (.3.) and (.3.3), we obtain p s p y p prime < ε. (.3.3) n s n N y Since this is true for all ε > 0 we obtain (.3.) as desired. < ε. 8

10 Now we assume s >, and explore what happens as we take the limit as y. Since {,, y} N y >0, we have using (.3.): n y n s p y p prime p s n= n s = ζ(s). Taking the limit as y, the left hand side approaches ζ(s), so by the squeeze theorem, we have as desired. ζ(s) = p prime p s We can now give Euler s proof of the infinitude of the primes: Euler s proof of Theorem.3.. Using Riemann sums, one finds that for s >, we have Therefore, n= n > s lim s + n= From Lemma.3.4, we therefore conclude that lim s + p prime x s d x = s. n s =. p s =. If there were only finitely many primes, then this limit would not be infinity, it would be the positive rational number p prime p Therefore, there must be an infinite number of primes. Now that we know that there infinitely many primes, we can ask questions about how dense the primes are within all the integers. There are many ways to make this question precise. Here is one result in this realm of questions.. Proposition.3.5. We have p y p prime p > log(log y). 9

11 In particular, p prime p diverges. Proof. Recall that by estimating the sum by an integral, we have using Riemann sums we have for y > : y n= n > y+ y n= d x = log(y + ) > log(y). x log(y). More precisely, n Therefore by (.3.). Hence log(y) < y n= log log(y) < n < n = p n N y p y p prime p y p prime log. p It is easy to show that for 0 x, we have x ex+x and hence log( ) x + x. x Thus log log y <. Note Thus as desired. p y p prime p < p y p prime n= log log y < + n < p + p p y p prime d x x =. p.4 Some Functions in Number Theory Definition.4.. Let a, b be two nonzero integers. The least common multiple (lcm) of a and b, denoted [a, b] = lcm(a, b), is the unique positive integer m such that a m, b m, and such that for all n a n, b n = m n. 0

12 Notice the duality of the greatest common divisor and the least common multiple; the definition of least common multiple is the same as greatest common divisor with the divisibilities reversed. Unique factorization in the integers tells us that any nonzero integers m and n can be written uniquely as n = ± p prime p α p(n), m = ± p prime p α p(m), (.4.) where α p (n) 0 and α p (n) = 0 for all but finitely many p. Note that n m iff α p (n) α p (m) for all p. Therefore (m, n) = p prime p min(α p(n),α p (m)), [m, n] = p prime p max(α p(n),α p (m)). Lemma.4.. Let m and n be nonzero integers. We have mn = [m, n](m, n), i.e. [m, n] = mn (m,n). Proof. In general, min(a, b)+max(a, b) = a+ b. The result therefore follows from (.4.). Define d(n) := = number of positive divisors of n d n and σ(n) := d = sum of positive divisors of n. d n As implied by our descriptions, when d n is written as the subscript in a sum, one typically assumes that the sum is over positive divisors d of n. Definition.4.3. A function f : is called multiplicative if for any m, n with (m, n) = we have f (m, n) = f (m) f (n). Lemma.4.4. If f is multiplicative and F(n) = f (d), then F is multiplicative. d n Proof. Let m and n be relatively prime integers. First we show that there is a bijection: {d mn, d > 0} {ordered pairs (d, d ), where d m, d n, and d, d > 0} (.4.) d (gcd(d, m), gcd(d, n)) d d (d, d ). Let us prove this by showing that the given maps are mutually inverse. In one direction, we need to show that if d mn, then d = (d, m)(d, n). So let d = (d, m) and d = (d, n), and write d = d d, m = d m, and d = d d, n = d n with (d, m ) = and (d, n ) =. The

13 equation d = d d = d d together with (d, d ) = (which holds since d m and d n and (m, n) = ) implies that d d, by the fundamental theorem of arithmetic. Conversely, d = d d mn = d m n implies d m n, which implies d n, again by the fundamental theorem of arithmetic. But d n, d d implies d d by the definition of gcd. Therefore d d and d d, so d = d, and we obtain d = d d as desired. To prove that the maps are inverse in the other direction, we need to show that if d m and d n, then (d d, m) = d and (d d, n) = d. Now d m and d d d. Furthermore, if e is an integer such that e d d and e m, then note that (e, n) = since (m, n) =. Therefore (e, d ) = since d n, and hence e d by the fundamental theorem of arithmetic. Thus d satisfies the definition of the gcd of d d and m. Similarly we have (d d, n) = d. We have therefore established that (.4.) is a bijection. Using this bijection, the proof of the lemma is now a simple computation: F(mn) = d mn f (d) = f (d d ) d m d n = f (d )f (d ) d m d n = f (d ) f (d ) d m =F(m)F(n) d n as desired. Corollary.4.5. The functions d and σ are multiplicative. Proof. This follows as a direct consequence of the previous lemma, since the functions f (d) = and f (d) = d are clearly multiplicative. The divisors of a prime power p α are {, p, p,..., p α }. Therefore, we have d(p α ) = α + and σ(p α ) = + p + p + + p α = pα+ p.

14 Corollary.4.5 therefore implies that if the prime factorization of n is n = p prime pαp(n), then d(n) = (α p (n) + ) p prime and p α p (n)+ σ(n) =. p p prime.5 Congruences, Euler s φ-function, and Wilson s Theorem Definition.5.. Let a, b, m be integers. We say that a b (mod m) if m (a b), i.e. if there exists x such that mx = a b. With m fixed, congruence modulo m is an equivalence relation on. We denote the set of equivalence classes by /m. When m is a positive integer, the equivalence classes have standard representatives given by 0,,,..., m. The set of equivalence classes /m is equipped with the usual operations of addition and multiplication modulo m. Theorem.5.. (mod m (a,m) ).. Let a and m be nonzero. Then ax a y (mod m) if and only if x y. Let m and n be nonzero. Then we have x y (mod m) and x y (mod n) if and only if x y (mod [m, n]). Proof.. ax a y mod m if and only if m (ax a y) if and only if m a(x y). Let d = (m, a), then m = dm and a = da, with (m, a ) =. Thus m a(x y) dm da (x y) m a (x y). By the Fundamental Theorem of Arithmetic, this holds if and only if m (x y), i.e. if and only if x y (mod m ).. m (x y) and n (x y) if and only if [m, n] x y, by the definition of lcm. Definition.5.3. Let φ(n) := #{ d n : (d, n) = }. This is the Euler-totient function. Example. φ() =, φ() =, φ(3) =, φ(4) =, φ(5) = 4, φ(6) =. For any prime p, we have φ(p) = p. More generally for a prime power, we have φ(p α ) = p α p α = p α (p ), (.5.) 3

15 since the numbers relatively prime to p α are exactly those not divisible by p. Define (/n) (/n) to be the set of classes x such that there exists another class y with x y (mod m). This subset contains and is closed under multiplication and inverses; in other words, it forms a group under multiplication. Proposition.5.4. φ(n) = #(/n). Proof. There exists a bijection {k : k n} /n k Equivalence class of k (mod n). Under this bijection, k and n are coprime if and only if the equivalence class of k is a unit. Indeed, if k and n are coprime, then there exist a, b such that ak + bn =. Reducing modulo n, we find ak mod n. Conversely, if k represents an element of (/n), then by definition there exists an a such that ak mod n. Therefore, there exists a b such that bn = ak, which implies that bn + ak = and thus k and n are coprime. The result now follows from the definition of φ(n). Theorem.5.5. If (a, n) =, then a φ(n) (mod n). Proof. This follows from the previous proposition combined with Lagrange s theorem in group theory: in the group (/n), any element raised to the power of the size of the group is the identity. However, we ll give an explicit proof that works for our special case (and can easily be seen to work for arbitrary finite abelian groups). Let a, a,, a φ(n) be the positive integers less than or equal to n that are relatively prime to n. Note that these elements form a complete set of representatives for (/n). Since (a, n) =, it follows that aa, aa,..., aa φ(n) are all relatively prime to n as well. Furthermore aa i aa j (mod n) implies that a i a j (mod n) since (a, n) =, by Theorem.5.. Therefore, the elements aa, aa,..., aa φ(n) form a complete set of representatives of (/m) as well. Therefore, we have two complete sets of representatives, so the elements aa, aa,..., aa φ(n) must be congruent to the elements a, a,..., a φ(n), but in some possibly different order. In particular, the products of all the elements in these complete sets of representatives must be congruent, i.e. aa aa aa φ(n) a a a φ(n) (mod n), so a φ(n) (a a a φ(n) ) a a a φ(n) mod n. 4

16 Since (a i, n) = for all i, we have (a a a φ(n), n) =. Therefore, by Theorem.5. we may divide both sides of the previous congruence by the common factor a a a φ(n), and obtain a φ(n) (mod n) as desired. Corollary.5.6 (Fermat s Little Theorem). If p is prime, and (a, p) =, then a p (mod p). For any a, we have a p a (mod p). Theorem.5.7 (Wilson). If p is prime then (p )! mod p. Proof. If p is equal to or 3 this is easily computed, so we will assume p 5. Suppose a p. Then a is coprime to p, so there exists a unique integer a, such that aa (mod p) and a p. Because p is prime, a = a p (a ) = (a + )(a ) p (a ) or p a +. This occurs if and only if a = or a = p. We can therefore group the integers, 3,..., p into pairs a, a where a a and aa mod p. When these p 3 congruences are multiplied together and rearranged we obtain 3 4 (p ) = (p )! (mod p). Multiply this congruence by p to obtain (p )! p (mod p) as desired. 5

17 Chapter Continued Fractions. Farey Fractions For each positive integer n, the Farey sequence at stage n is a certain list of fractions. As we will eventually prove, the list contains all reduced fractions between 0 and with denominator less than or equal to n, in increasing order. The rule for defining the Farey sequence at stage n is recursive, as follows. At the first stage we start with 0 = 0/ and = /. The recursive rule is that at the nth stage, we include a+a if a b+b b b + b n. For example, we have: st stage: nd stage: 3rd stage: 4th stage: and a b 0,,,, 3,, 3,, 4, 3,, 3, 3 4,. are consecutive in the (n )st stage and Proposition... If a b and a b are consecutive in the nth stage, then a b b a =. Proof. We use induction on n. At the st stage, we have 0 =. Now suppose the result holds at the (n )st stage. If a b following three things happens. and a b are consecutive in the nth stage, then one of the 6

18 . a b, a b are consecutive in the (n )st stage. In this case the result holds by induction.. a = a + x and b = b + y where a and x b y induction we have x b a y =. Hence are consecutive at the (n )st stage. Then by a b ab = (x + a)b a(y + b) = x b + ab a y ab = x b a y =. 3. a = x + a and b = y + b where x a and are consecutive at the (n )st stage. The y b result can be proven in this case similarly to (). Corollary... The fractions in the Farey sequence are reduced. Proof. Since a b b a =, it follows that (a, b) =. Corollary..3. The fractions in the Farey sequence are in increasing order. Proof. We have a /b a/b = (a b b a)/(bb ) = /(bb ) > 0. Theorem..4. If a a and are consecutive in the nth stage, then the rational number between b b them with smallest denominator is a+a. b+b Proof. Note that a+a does indeed lie between a a and (prove this to yourself). Now suppose b+b b b a < x < a, where a a = by Proposition... We therefore have: b y b b b bb bb = a b a b a = b x x + y y a b = a y b x b y + bx a y b y b y + b y = b + b bb y. Multiplying by bb y, we find that y b + b. If y = b + b then we must have equality in the inequalities above. Hence a y b x = and bx a y = ; solving these two linear equations in two variables gives x = a + a and y = b + b as desired. 7

19 Corollary..5. At the nth stage, the Farey sequence contains all rational numbers in [0, ] with denominator less than or equal to n in increasing order. Proof. We use induction on n. The statement clearly holds when n =. Suppose that the statement holds for the (n )st stage and suppose that it is not true at the nth stage. Then there exists x [0, ] such that x is not in the nth stage. Let a a and be consecutive in the n n b b (n )st stage such that a < x < a. By our previous theorem, n b + b. But if n = b + b, b n b then x = a + a by the theorem. However if x = a + a and n = b + b, then x/n is in the nth stage by the definition of the Farey sequence. Thus n > b + b, which implies b + b n. But then by induction, a+a must be in the (n )st stage, contradicting the fact that a/b and b+b a /b are consecutive in the (n )st stage. Definition..6. The Infinite Farey sequence at the nth stage is the (doubly infinite) list of all reduced fractions with denominator less than or equal to n, in increasing order. Theorem..7. Let n be a positive integer and x a real number. There exists a rational number a such that x a < with 0 < b n. b b b(n+) Proof. Consider the Farey sequence at the nth stage; let p/q and r/s be consecutive fractions in the sequence such that p q x < r s. Case : Suppose p q x < p + r q + s. Let a = p. Then b n by definition, and we calculate b q since q + s n +. Case : Suppose x a p + r < b q + s p q = q(q + s) q(n + ) p + r q + s x < r s. Let a = r. The proof in this case is similar to Case and left to the reader. b s Theorem..8 (Hurwitz). If x is an irrational number, then there exist infinitely many rational numbers h k such that x h k < 5k. Proof. Let a/b and c/d be consecutive fractions in the Farey sequence at the nth stage such that a b < x < c d. Then a b < x < a+c b+d or a+c b+d < x < c d. 8

20 Case : a b < x < a+c b+d. We claim that a b, a+c b+d, or c d has the desired property. If not, then x a b 5b, a + c b + d x, 5(b + d) c d x. (..) 5d Adding the first and third inequalities, Multiplying by 5(bd) we obtain bd = c d a b 5 b + d 5bd b + d. (..) Similarly adding the first and second inequalities of (..) we obtain b(b + d) 5 b +, (b + d) and hence 5b(b + d) (b + d) + b. (..3) Let y = b d. Dividing (..) and (..3) by d, we obtain 5y(y + ) (y + ) + y and 5 y y +. (..4) The first of these inequalities simplifies to 5(y + y) y + y+, which yields ( 5)y + ( 5)y + 0. Dividing by 5, which is negative, we obtain y + y ( + 5) 0. Solving for the roots, we obtain y 3 5 or y + 5. On the other hand, the second inequality in (..4) can be written y 5 y + 0, which yields 5 y 5+. Therefore the only possibility is y = + 5, which is a contradiction since y is rational. Case : Similar to Case and left to the reader. Theorem is the best (i.e. largest) constant possible in Hurwitz Theorem. In other words, for every c > 5 there exists an irrational number x such that there exist only finitely many rational numbers h x such that k h <. In fact x = + 5 satisfies this property for all k ck such c. Proof. Suppose there exists infinitely many rational h k with x = + 5 such that h k x < ck. (..5) 9

21 We will show that c 5. By the triangle inequality, h k 5 = h k h k < ck + 5. (..6) If we multiply (..5) and (..6), then the left hand side is: h k + 5 h k 5 = h k h k = h hk k k k. Therefore we obtain < + 5. Multiplying by ck we obtain c < + 5. As k k ck ck ck goes to infinity, the right side approaches 5. Therefore c 5 as desired.. Continued Fractions Let a 0, a,... be real numbers. Assume that a i > 0 for i > 0. Define a 0, a,..., a n = a 0 +. a + a an + a n Example 3., 3, 4 = + = = Definition... A simple continued fraction is a continued fraction a 0, a,..., a n where each a i is an integer. Clearly, a simple continued fraction is a rational number. The converse is also true: Proposition... Any rational number can be written as a simple continued fraction. Proof. We are given a rational number p in reduced form. If q = ±, then p/q = ±p = ±p, q and we are done. Therefore suppose that q. We assume without loss of generality that 0

22 p > 0. We let u 0 = p and u = q. By the Euclidean Algorithm u 0 = u a 0 + u with 0 u < u u = u a + u 3 with 0 u 3 < u. u j = u j+ a j. Claim: a 0, a,..., a j = p q. Define r i = u i u i+. Dividing the equation u = u i+ a i + u i+ by u i+, we see that r i = a i + r i+. Starting from r 0 = a 0 + /r, and applying this equation recursively for r, r,..., until r j = a j, we see that So r 0 = a 0, a, a,..., a j. Since r 0 = p/q, this proves the desired result. Note that there is a simple way to alter a given simple continued fraction representation of a given rational number. Namely, suppose we have x = a 0, a,..., a j with a j >. Then we also have x = a 0, a,..., a j,, since (a j ) + / = a j. To eliminate this ambiguity, we impose the condition on our simple continued fractions that they do not end with except for the case =. We formalize this with the following definition: Definition..3. We say that a simple continued fraction x = a 0, a,..., a j is in simplest form if j = 0 or if j > 0 and a j >. Theorem..5 below states that the simple continued fraction representation in simplest form of a given rational number is unique. First we prove the following lemma. Lemma..4. Suppose that the simple continued fraction x = a 0, a,..., a j is in simplest form. Then a 0 = x, the greatest integer less than or equal to x. Proof. If j = 0, then x = a 0 = a 0, so we are done. Therefore suppose j > 0. We have x = a 0 + a + a +... Consider the expression y = a, a,..., a j, so x = a 0 + / y. We will prove that y >, which will imply that 0 < / y < and hence a 0 < x < a 0 + as desired. If j =, then y = a j = a j > by the assumption that our continued fraction is in simplest form, so we are done in this case. If j >, then y = a + / a, a 3,..., a j ; furthermore we.

23 have a and a, a 3,..., a j > 0 by the definition of continued fractions, so we have y > as desired. This completes the proof. Theorem..5. The representation of a rational number as a simple continued fraction in simplest form is unique. In other words, if x = a 0, a,..., a j = b 0, b, b,..., b n, with both representations in simplest form, then j = n and a i = b i for 0 i n. Proof. By Lemma..4, we have a 0 = x and b 0 = x as well. Therefore a 0 = b 0. Subtracting this equation from a 0, a,..., a j = b 0, b, b,..., b n and taking the reciprocal, we obtain a, a,..., a j = b, b,..., b n. Since these continued fraction representations have shorter length by one, we see by induction that j = n and a i = b i, for i n..3 Infinite Continued Fractions Let {a i } be a sequence of integers, all but possibly a 0 positive. We will make sense of the infinite continued fraction a 0, a, a,... by showing that that lim n a 0, a,..., a n exists. Each of the finite continued fractions h n /k n = a 0, a,..., a n is called a convergent to the infinite continued fraction. The convergents may be computed recursively as follows. Let h = 0, h =, k =, k = 0. Inductively, define h n = a n h n + h n and k n = a n k n + k n. In practice, it is nice to organize in a table as follows: a 0 a a a 3 0 h 0 = a 0 h = a h 0 + h = a h + h 0 h 3 = a 3 h + h... 0 k 0 = k = a k = a k + k 0 k 3 = a 3 k + k... Note that the k n are all positive, since the a i for i > 0 are positive. Proposition.3.. We have a 0, a,..., a n = h n /k n. In fact, more generally we have a 0, a,..., a n, x = xh n + h n xk n + k n. (.3.) Proof. First note that the more general claim implies the first sentence by plugging in x = a n, since in this case the right hand side is h n k n by definition.

24 We now prove the more general claim by induction on n. In the base case n = 0, we want to show that x = xh +h = x = x, which is true. In the case n =, we have a xk +k 0, x = a 0 +. x On the other hand xh 0+h = xa 0+ = a xk 0 +k x 0 + as desired. x Now we carry out the inductive step, and suppose n. By definition, we have a 0, a,..., a n, x = a 0, a,..., a n, a n + x. The right hand side is a continued fraction of shorter length, so we can apply the inductive hypothesis to find: by definition. Example 4., 3,, 4, 5 = + with associated table: a 0, a,..., a n + x = (a n + x )h n + h n 3 (a n + x )k n + k n = xa n h n + h n + xh n 3 xa n k n + k n + xk n 3 = xh n + h n xk n + k n , Proposition.3.. The convergents h n /k n satisfy h n k n h n k n = ( ) n, and hence h n k n h n k n = ( )n k n k n. Proof. We use induction on n. The base cases n =, 0 are easily checked. For the inductive step, we use the defining equations for h n and k n and multiply by k n and h n, respectively. h n = a n h n + h n (k n ) (.3.) k n = a n k n + k n (h n ) (.3.3) 3

25 Subtracting.3.3 from.3., we obtain h n k n h n k n = h n k n h n k n = ( ) n = ( ) n. Proposition.3.3. We have h n k n k n h n = ( ) n a n, so h n k n h n k n = ( )n a n k n k n. Proof. Using the defining equation of h n and k n, we have h n k n k n h n = (a n h n + h n )k n (a n k n + k n )h n = a n (h n k n k n h n ) = a n ( ) n = a n ( ) n. Recall that we write r n = h n /k n = a 0, a,..., a n for the convergents of the continued fraction. Corollary.3.4. The sequence of even-numbered convergents r 0, r, r 4,... is increasing, while the sequence of odd-numbered convergents r, r 3, r 5,... is decreasing. Furthermore, every even convergent is less than every odd convergent, i.e. r n < r m+ for all n and m. Proof. The first sentence follows directly from Proposition.3.. For the second sentence, suppose for the sake of a contradiction that r n r m+ for some n, m. Then: If n m, note that r m r n r m+. But r m+ r m = k m k m+ > 0. If m n, note that r n r m+ r n+, which again is a contradiction as in the previous case. Therefore r n < r m+ as desired. Theorem.3.5. lim n r n exists. Proof. The sequence {r 0, r, r 4,... } is a monotonically increasing sequence of real numbers, bounded above by r. Therefore lim n r n exists; call this limit L 0. Similarly {r, r 3, r 5,... } is monotonically decreasing and bounded below by r 0. Therefore lim n r n+ exists; call this L. 4

26 Since r n < r n+ for all n it is clear that L 0 L. Now suppose for the sake of a contradiction that L > L 0. Since each r n < L 0 and each r n+ > L, we have = r k n k n+ r n > L L 0. n+ Since /k n k n+ 0 as n, this is a contradicion if L L 0 > 0. Therefore L L 0 = 0, so L = L 0, and therefore lim n r n = L 0 = L. Definition.3.6. We define a 0, a,..., a n,... := lim n r n, where r n = h n /k n = a 0, a,..., a n are the convergents of the continued fraction..4 Irrational Numbers and Infinite Continued Fractions Theorem.4.. An infinite continued fraction is irrational. Proof. Let θ = a 0, a,.... By the proof of Theorem.3.5, we see that θ lies between any two consecutive convergents r n and r n+, since the odd-numbered convergent is greater than θ and the even-numbered convergent is less than θ. Hence θ r n < r n r n+ = k n k n+, where the equality is given by Proposition.3.. Multiplying by k n, we obtain k n θ h n < /k n+. Assume that θ is rational, say θ = a/b where b is nonzero and (a, b) =. Multiplying the previous inequality by b, we obtain k n a h n b < b/k n+. Since the denominators k n are unbounded, for n large enough we have b/k n+ and b/k n are less that. We claim that k n a h n b is nonzero. Otherwise h n /k n = a/b; since the reduced fraction representation of a rational number is unique, and (h n, k n ) = (a, b) =, with k n and b positive, we have b = k n. This contradicts b/k n <. Therefore k n a h n b 0 as claimed. But then 0 < k n a h n b <. Therefore θ is not rational. }{{} integer We next show that a given irrational number can have at most one infinite continued fraction representation. Theorem.4.. Suppose θ = a 0, a, = b 0, b, then a i = b i for all i 0. Proof. The idea of the proof is the same as the rational case, as follows. We know that a 0 and 5

27 b 0 are uniquely determined by θ, namely a 0 = b 0 = θ. Then from a 0 + a +... = b 0 +, b +... we can subtract a 0 = b 0 and invert, obtaining a + a +... = b +. b +... Hence a = b by the same logic as above we can continue this process to see a i = b i for all i 0. To make this rigorous, suppose θ = a 0, a,... = b 0, b,... with a n b n for some n. Fix the smallest such index, i.e. suppose a i = b i for i n and a n b n. So θ = a 0 + a + a +... = b 0 + b + b By cancelling and inverting n times as above we obtain a n + a n = b n + b n = x. Then a n = b n = x. Theorem.4.3. Given an irrational real number θ, there exist integers a i for i 0 with a i positive for i > 0, such that θ = a 0, a,.... Proof. We define the a i recursively. Let a 0 = θ and define θ 0 = θ. For n, define θ n = θ n a n and a n = θ n. Claim: θ n is irrational for all n and a n for n > 0. This is proved by induction. For the base case, we are given that θ 0 = θ is irrational. For the inductive step, since θ n is irrational and a n is an integer, it follows that θ n a n is irrational and hence that θ n = 6

28 /(θ n a n ) is irrational. Next, to show that a n, we need to show θ n since a n = θ n. By definition of θ n, this is equivalent to /(θ n a n ), that is, 0 < θ n a n. This is true since a n = θ n, and since a n θ n by the inductive hypothesis (since θ n is irrational and a n is an integer). The claim implies that θ = a 0, a,... is a well-defined infinite continued fraction, and it remains to show that θ = a 0, a,.... By our definition θ = θ 0 = a 0 + = a 0, θ θ = a 0 + = a a + 0, a, θ. θ Thus in general θ = a 0, a,..., a n, θ n+ Here the second equality follows from equation (.3.). Now = θ n+h n + h n θ n+ k n + k n (.4.) θ θ rn n+ h n + h n = h n θ n+ k n + k n k n k = n h n+ h n k n k n (θ n+ k n + k n ) = k n (θ n+ k n + k n ), (.4.) by Proposition.3.. The denominator of the last expression is at least k n k n (since θ n+ and k n > 0). Hence we obtain θ rn < /(kn k n ), which approaches 0 as n approaches infinity. This concludes the proof. 7

29 Example 5. Let θ = 7. a 0 = 7 = = = + a = = = = + a = = = = + a 3 = = = 7 + = 4 + ( 7 ) a 4 = Inverting again we obtain /( 7 ) as in the second line, implying that the process will repeat. Therefore 7 =,,,, 4,,,, 4,... =,,,, 4..5 Approximation by Continued Fractions In this section we study how well the convergents of the continued fraction of an irrational number approximate the number. In a certain sense, we will show that the convergents are the best possible" rational approximations to the number. Theorem.5.. Let θ be an irrational real number and let h n /k n be the convergents of the continued fraction of θ. Then θ h n < <. k n k n k n+ kn Proof. θ lies between h n k n and h n+ k n+. So θ h n k < h n+ h n n k n+ k n h = n+ k n h n k n+ k n k n+ =. k n k n+ The second inequality of the theorem follows since k n+ > k n. Theorem.5.. We have θ k n h n < θ k n h n. Proof. Let θ n = a n, a n+,... as in Theorem.4.3. The equality a n = θ n implies a n + > θ n. 8

30 So θ n k n + k n+ < (a n + )k n + k n = (a n k n + k n ) + k n = k n + k n k n+. (.5.) We therefore obtain θ h n = k n (θ n k n + k n ) >. k n k n+ k n Here the equality was proven in (.4.), and the inequality follows from (.5.). Multiplying by k n yields θ k n h n > k n+ > θ k n h n, where the second inequality follows from Theorem.5.. one. As a corollary, we see that each convergent to θ is a better approximation than the previous Corollary.5.3. We have θ h n k n < θ h n k n. Proof. θ h n k n = k n k n θ h n < k n k n θ h n = k n θ h n < θ h n. k n k n k n We now move on to proving that the convergents h n /k n are in some sense the best rational approximations to θ. Theorem.5.4. Let θ be an irrational number and a rational with b > 0. If θ b a < θ k b n h n for some n 0 then b k n+. Proof. Suppose θ b a < θ k n h n for some n 0 and b < k n+. Consider the system of 9

31 linear equations xk n + yk n+ = b, xh n + yh n+ = a. This can be written in the following way: k n k n+ x b =. h n h n+ y a }{{} determinant=± Since the determinant of the matrix on the left is ±, there is a unique integer solution (x, y). Furthermore x and y are not both zero since (a, b) (0, 0). Claim: x, y 0. If x = 0 then b = yk n+, which implies b k n+. If y = 0 then b = xk n and a = xh n, so θ b a = x θ kn h n θ kn h n. Claim: x and y have opposite signs. If y < 0 then xk n = b yk n+, which implies x > 0. If y > 0 then xk n = b yk n+ < 0 since b < k n+. Thus x < 0. This proves the claim. Next note that θ k n h n and θ k n+ h n+ have opposite signs since θ h n and θ h n+ k n k n+ opposite signs. Therefore, x(θ k n h n ) and y(θ k n+ h n+ ) have the same sign. Putting this all together, we obtain have θ b a = θ(xk n + yk n+ ) (xh n + yh n+ ) = x(θ k n h n ) + y(θ k n+ h n+ ) = x(θ k n h n ) + y(θ k n+ h n+ ) > θ k n h n. This concludes the proof. As a corollary, we find that a convergent h n /k n is the best rational approximation to θ with denominator at most k n. Corollary.5.5. If a rational number a b with b > 0 satisfies θ a b < θ h n k n, then b > k n. Proof. Suppose that θ a b < θ h n k n and b k n. We obtain θ b a < b θ h n k n θ h n = θ k n h n, contradicting the previous theorem since b k n < k n+. k n k n 30

32 Finally, we prove that any sufficiently good rational approximation to an irrational number must be a convergent of the continued fraction. Theorem.5.6. Let θ be an irrational real number. If a rational number a with b > 0 satisfies b θ a <, then a = h n for some convergent h n of the continued fraction of θ. b b b k n k n Proof. Since the k n are increasing and tend to infinity, we have k n b < k n+ for a unique n. By Theorem.5.4, we have θ k n h n θ b a < b. This implies θ h n k n < bk n. Hence h n a θ k n b a + b θ h n k n < b +. bk n (triangle inequality) Multiplying by bk n, we obtain bh n ak n < k n +, where the second inequlity follows b since b k n. This implies bh n ak n = 0, since it is an integer with absolute value less than. Therefore bh n = ak n, and hence a b = h n k n..6 Periodic Continued Fractions We start with an example. Example 6. Let θ = + 5. At the next step will invert to obtain Therefore a 0 = [θ] =, θ a 0 = = ( + 5) = a = θ = + 5 once again, and hence the process will repeat. =,,,... =. Recall that in an earlier example we found 7 =,,,, 4. These two examples lead to the following definition. Definition.6.. A continued fraction θ = a 0, a, a,..., is called periodic if there exists an N 0 and an r such that a n = a n+r for all n N. The integer r is called the period of the continued fraction, and we write θ = a 0, a,..., a N, a N, a N+,..., a N+r. A continued fraction is called purely periodic if we may take N = 0, i.e. if it has the form θ = a 0, a,..., a r. 3

33 Example 7. Let θ = 3, 4. Then θ = 3, 4, θ = θ The right side simplifies to 3θ+3 4+θ, and hence we obtain 4θ + θ = 3θ + 3. This yields the quadratic equation 4θ θ 3 = 0 with solutions θ = ± 9 8 have θ = Since θ > 3 > 0 we must Theorem.6.. The continued fraction of real number θ is periodic if and only if θ is quadratic irrational, i.e. θ = a + b d where a and b are rational numbers and d is a positive non-square integer. Proof. Suppose θ = a 0, a,..., a N, a N, a N+,..., a N+r and let α = a N, a N+,..., a N+r = a N, a N+,..., a N+r, α. If the convergents to α are h n k n then by equation (.3.), we have α = αh r + h r αk r + k r. This implies α k r + α(k r + h r ) h r = 0. By the quadratic formula, α may be written a + b d with a, b and d a postive non-square integer as stated in the theorem. (Note that the discriminant d must be non-square because α is not rational, since α has an infinite continued fraction represntation.) Now, the set {a + b d : a, b } is a field, denoted ( d). We will study these fields in greater detail in the next section, but for now it is easy to check that indeed this set is closed under addition, subtraction, multiplication, and division. Therefore, the fact that α ( d) implies that θ ( d) as well, since θ can be obtained from α using these field operations. Finally, we note that as with α, we have θ since it has an infinite continued fraction. : Write θ = r+ s. We will first show that θ can be written in the form θ = m 0+ d t q 0 where q 0 divides m d. If t > 0 then we multiply by t and obtain 0 t θ = r t + t s = r t + t s = m 0 + d t t q 0 3

34 where q 0 = t, m 0 = r t, and d = t s, so q 0 (m t d) as desired. If t < 0 then multiply by 0 t and obtain θ = r t t s = r t + t s = m 0 + d t t where q 0 = t, m 0 = r t, and d = t s. Then q 0 (m d) is again satisfied. 0 We now define sequences of real numbers m i, q i, a i, and θ i recursively as follows. Let θ i = m i + d q i, a i = [θ i ], m i+ = a i q i m i, and q i+ = d m i+ q i. Claim: m i, q i, q i 0, and q i (m i d). We prove the claim by induction on i. When i = 0 the results hold by construction. For the inductive step there are four things we need to prove. First, it is clear from the formula that m i+ is an integer, since a i, m i and q i are. Next we show q i+ 0: if q i+ = 0, then d = m ; this is a contradiction since d is not a square. i+ Next, we note that q 0 q i+ = d m i+ q i = d (a i q i a i q i m i + m i ) q i = d m i q i }{{} + ( a i q i + a i m i ). }{{} Therefore, q i+. Lastly we have m i+ d = q q i which is an integer, so q i+ divides m d. i+ i+ This completes the inductive proof of our claim. Claim: These θ i s and a i s are the same as those given by the continued fraction of θ, i.e. we have θ = a 0, a,... and θ i = a i, a i+,... for all i. Recall that the latter θ i s and a i s are defined recursively by a i = [θ i ] and θ i+ = θ i a i. So we need to show the θ i s from previous claim satisfy these formulae. Now a i = [θ i ] by definition, so we only need to show 33

35 that θ i+ = θ i a i. We compute θ i+ = m i+ + d q i+ = m i+ + d (d m i+ )/q i q i (m i+ + d) = ( d + m i+ )( d m i+ ) q i =, d mi+ so d mi+ = θ i+ q i d aqi + m i = q i = m i + d q i a i = θ i a i as desired. Hence θ i and a i are indeed those given by the continued fraction of θ. Claim: q n > 0 for n large enough. For an element x = a + b d, we define the conjugate by x := a b d. Then we have θ n θ n = m i+ d mi d = d. So θ q n q n q n θ n > 0 if and only n if q n > 0. We ll show θ n < 0 for n large enough. This will imply the claim, since θ n > 0, so we will have θ n θ n > 0. Now from (.4.) we have that θ = θ nh n + h n θ n k n + k n, which implies θ n = θ k n h n θ k n + h n. Conjugating this last equation, we have θ n = θ k n h n = k n θ k n + h n k n θ h n k n θ h n k n }{{} Now as n, we have h n /k n θ and h n /k n θ, hence θ θ =. Therefore, θ θ for n sufficiently large, we see that θ n < 0, so θ n θ n > 0 and q n > 0 as claimed. We can finally complete the proof of the theorem. Recall that q n+ = d m n+, so q q n q n+ = n d m. This implies that 0 < q n+ n d and d < m n < d since m < d. Therefore, there n. 34

36 are only finitely many possibilities for m n and q n ; eventually we have a repetition of a pair (m n, q n ), yielding a repetition of θ n. Therefore the continued fraction of θ eventually repeats, which is what we wanted to show. Theorem.6.3. Let θ be a quadratic irrational. periodic if and only if θ > and < θ < 0. The continued fraction of θ is purely Proof. : We are given θ > and < θ < 0, and we want to prove that the continued fraction of θ is purely periodic. continued fraction is periodic since θ is quadratic irrational. Here is the idea of the proof: we already know that the To prove that the continued fraction is purely periodic, we want to show that we can always move the start of the repeating part of the continued fraction back one step. To do this, we will show that θ i+ determines a i for each i. Let us now carry this out rigorously. Claim: < θ i < 0 for all i 0. Proof by induction. The base case i = 0 is given, since θ 0 = θ. For the inductive step, note that θ i+ = θ i a i, so θ i = θ i a i. By induction, < θ i < 0. We also know that a i for all i 0; this is always true for i for any continued fraction, and it is true for i = 0 since θ >, so a 0 = θ. So θ i a i < a i and hence < < 0. This completes the inductive proof of our claim. θ i a i Now θ i+ = implies θ θ i a i = + a i θ i, thus θ i = + a i+ θ i. We know that < θ i < 0, so i+ plugging in the previous equality for θ i, we find: < θ i+ + a i < 0, a i < < a i, θ i+ (subtract a i ) a i < < a i +. θ i+ (multiply by ) This implies that a i = θ i+. This tells us that θ i+ determines a i, as claimed above. Since the continued fraction of θ repeats at some point, we know that there exists r > and N 0 such that θ n = θ n+r for all n N. Suppose that N is minimal. We want to show that N = 0. If N > 0, then the equations θ N = θ N+r, a N = imply that a N = a N+r. Therefore θ N, and a N+r = θ N+r θ N = a N + θ N = a N+r + θ N+r = θ N+r, 35

37 contradicting the minimality of N. Therefore N = 0 and the continued fraction of θ is purely periodic. : We want to show that if θ has purely periodic continued fraction then θ > and < θ < 0. Since a 0 = a r where r > is the period of the continued fraction, and a r, we must have a 0. Since a 0 = θ, we have θ > as desired. Next note that θ = a 0, a,..., a r, θ = θh r + h r θ k r + k r, so θ k r +θ(k r h r ) h r = 0. Taking the conjugate, we see that θ is a root of the same quadratic polynomial, i.e. θ and θ are the two roots of the polynomial f (x) = k r x + (k r h r )x h r. (Note that θ θ since θ is not rational.) Therefore it suffices to show that f (x) has some root between and 0. Note that f (0) = h r < 0 and f ( ) = k r k r +h r h r > 0, since the h i s and k i s are increasing. Therefore, f has a root between 0 and by the Intermediate value theorem..7 Example of a purely periodic continued fraction Let d bs a non-square integer greater than, and let θ = d + [ d]. Then θ is a quadratic irrationality satisfying θ >. Furthermore we have θ = [ d] d and we calculate: d < d < d + 0 < d d < < [ d] < θ < 0. (subtract d ) d < 0 (multiply by ) Therefore by Theorem.6.3, θ has purely periodic continued fraction, say θ = a 0, a,..., a r. We have: a 0 = d + d = d, θ = =, θ a 0 d d a = θ 36

Summary Slides for MATH 342 June 25, 2018

Summary Slides for MATH 342 June 25, 2018 Summary Slides for MATH 342 June 25, 2018 Summary slides based on Elementary Number Theory and its applications by Kenneth Rosen and The Theory of Numbers by Ivan Niven, Herbert Zuckerman, and Hugh Montgomery.

More information

NOTES ON SIMPLE NUMBER THEORY

NOTES ON SIMPLE NUMBER THEORY NOTES ON SIMPLE NUMBER THEORY DAMIEN PITMAN 1. Definitions & Theorems Definition: We say d divides m iff d is positive integer and m is an integer and there is an integer q such that m = dq. In this case,

More information

1. multiplication is commutative and associative;

1. multiplication is commutative and associative; Chapter 4 The Arithmetic of Z In this chapter, we start by introducing the concept of congruences; these are used in our proof (going back to Gauss 1 ) that every integer has a unique prime factorization.

More information

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z: NUMBER SYSTEMS Number theory is the study of the integers. We denote the set of integers by Z: Z = {..., 3, 2, 1, 0, 1, 2, 3,... }. The integers have two operations defined on them, addition and multiplication,

More information

Math 314 Course Notes: Brief description

Math 314 Course Notes: Brief description Brief description These are notes for Math 34, an introductory course in elementary number theory Students are advised to go through all sections in detail and attempt all problems These notes will be

More information

Part IA Numbers and Sets

Part IA Numbers and Sets Part IA Numbers and Sets Definitions Based on lectures by A. G. Thomason Notes taken by Dexter Chua Michaelmas 2014 These notes are not endorsed by the lecturers, and I have modified them (often significantly)

More information

Part II. Number Theory. Year

Part II. Number Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 Paper 3, Section I 1G 70 Explain what is meant by an Euler pseudoprime and a strong pseudoprime. Show that 65 is an Euler

More information

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime. PUTNAM TRAINING NUMBER THEORY (Last updated: December 11, 2017) Remark. This is a list of exercises on Number Theory. Miguel A. Lerma Exercises 1. Show that the sum of two consecutive primes is never twice

More information

Introduction to Number Theory

Introduction to Number Theory INTRODUCTION Definition: Natural Numbers, Integers Natural numbers: N={0,1,, }. Integers: Z={0,±1,±, }. Definition: Divisor If a Z can be writeen as a=bc where b, c Z, then we say a is divisible by b or,

More information

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2,

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2, SOLUTIONS TO PROBLEM SET 1 Section 1.3 Exercise 4. We see that 1 1 2 = 1 2, 1 1 2 + 1 2 3 = 2 3, 1 1 2 + 1 2 3 + 1 3 4 = 3 4, and is reasonable to conjecture n k=1 We will prove this formula by induction.

More information

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2 8. p-adic numbers 8.1. Motivation: Solving x 2 a (mod p n ). Take an odd prime p, and ( an) integer a coprime to p. Then, as we know, x 2 a (mod p) has a solution x Z iff = 1. In this case we can suppose

More information

CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS

CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS JEREMY BOOHER Continued fractions usually get short-changed at PROMYS, but they are interesting in their own right and useful in other areas

More information

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. 2 Arithmetic This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. (See [Houston, Chapters 27 & 28]) 2.1 Greatest common divisors Definition 2.16. If a, b are integers, we say

More information

CHAPTER 8: EXPLORING R

CHAPTER 8: EXPLORING R CHAPTER 8: EXPLORING R LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN In the previous chapter we discussed the need for a complete ordered field. The field Q is not complete, so we constructed

More information

Public-key Cryptography: Theory and Practice

Public-key Cryptography: Theory and Practice Public-key Cryptography Theory and Practice Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Chapter 2: Mathematical Concepts Divisibility Congruence Quadratic Residues

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element. The first exam will be on Monday, June 8, 202. The syllabus will be sections. and.2 in Lax, and the number theory handout found on the class web site, plus the handout on the method of successive squaring

More information

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Lecture Notes 1 Basic Concepts of Mathematics MATH 352 Lecture Notes 1 Basic Concepts of Mathematics MATH 352 Ivan Avramidi New Mexico Institute of Mining and Technology Socorro, NM 87801 June 3, 2004 Author: Ivan Avramidi; File: absmath.tex; Date: June 11,

More information

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2006 Contents 9 Introduction to Number Theory and Cryptography 1 9.1 Subgroups

More information

Contribution of Problems

Contribution of Problems Exam topics 1. Basic structures: sets, lists, functions (a) Sets { }: write all elements, or define by condition (b) Set operations: A B, A B, A\B, A c (c) Lists ( ): Cartesian product A B (d) Functions

More information

ECEN 5022 Cryptography

ECEN 5022 Cryptography Elementary Algebra and Number Theory University of Colorado Spring 2008 Divisibility, Primes Definition. N denotes the set {1, 2, 3,...} of natural numbers and Z denotes the set of integers {..., 2, 1,

More information

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some

More information

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31 Contents 1 Lecture 1: Introduction 2 2 Lecture 2: Logical statements and proof by contradiction 7 3 Lecture 3: Induction and Well-Ordering Principle 11 4 Lecture 4: Definition of a Group and examples 15

More information

0 Sets and Induction. Sets

0 Sets and Induction. Sets 0 Sets and Induction Sets A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a A to denote that a is an element of the set

More information

Selected Chapters from Number Theory and Algebra

Selected Chapters from Number Theory and Algebra Selected Chapters from Number Theory and Algebra A project under construction Franz Rothe Department of Mathematics University of North Carolina at Charlotte Charlotte, NC 83 frothe@uncc.edu December 8,

More information

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer. CHAPTER 2 INTRODUCTION TO NUMBER THEORY ANSWERS TO QUESTIONS 2.1 A nonzero b is a divisor of a if a = mb for some m, where a, b, and m are integers. That is, b is a divisor of a if there is no remainder

More information

Discrete mathematics I - Number theory

Discrete mathematics I - Number theory Discrete mathematics I - Number theory Emil Vatai (based on hungarian slides by László Mérai) 1 January 31, 2018 1 Financed from the financial support ELTE won from the Higher Education

More information

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove

More information

Introduction to Abstract Mathematics

Introduction to Abstract Mathematics Introduction to Abstract Mathematics Notation: Z + or Z >0 denotes the set {1, 2, 3,...} of positive integers, Z 0 is the set {0, 1, 2,...} of nonnegative integers, Z is the set {..., 1, 0, 1, 2,...} of

More information

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers. MATH 4 Summer 011 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove

More information

Chapter 1 : The language of mathematics.

Chapter 1 : The language of mathematics. MAT 200, Logic, Language and Proof, Fall 2015 Summary Chapter 1 : The language of mathematics. Definition. A proposition is a sentence which is either true or false. Truth table for the connective or :

More information

Contest Number Theory

Contest Number Theory Contest Number Theory Andre Kessler December 7, 2008 Introduction Number theory is one of the core subject areas of mathematics. It can be somewhat loosely defined as the study of the integers. Unfortunately,

More information

Elementary Properties of the Integers

Elementary Properties of the Integers Elementary Properties of the Integers 1 1. Basis Representation Theorem (Thm 1-3) 2. Euclid s Division Lemma (Thm 2-1) 3. Greatest Common Divisor 4. Properties of Prime Numbers 5. Fundamental Theorem of

More information

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences. MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences. Congruences Let n be a postive integer. The integers a and b are called congruent modulo n if they have the same

More information

NOTES ON FINITE FIELDS

NOTES ON FINITE FIELDS NOTES ON FINITE FIELDS AARON LANDESMAN CONTENTS 1. Introduction to finite fields 2 2. Definition and constructions of fields 3 2.1. The definition of a field 3 2.2. Constructing field extensions by adjoining

More information

Elementary Number Theory Review. Franz Luef

Elementary Number Theory Review. Franz Luef Elementary Number Theory Review Principle of Induction Principle of Induction Suppose we have a sequence of mathematical statements P(1), P(2),... such that (a) P(1) is true. (b) If P(k) is true, then

More information

1 Overview and revision

1 Overview and revision MTH6128 Number Theory Notes 1 Spring 2018 1 Overview and revision In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction

More information

Chapter 5. Number Theory. 5.1 Base b representations

Chapter 5. Number Theory. 5.1 Base b representations Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

More information

Cool Results on Primes

Cool Results on Primes Cool Results on Primes LA Math Circle (Advanced) January 24, 2016 Recall that last week we learned an algorithm that seemed to magically spit out greatest common divisors, but we weren t quite sure why

More information

LECTURE NOTES IN CRYPTOGRAPHY

LECTURE NOTES IN CRYPTOGRAPHY 1 LECTURE NOTES IN CRYPTOGRAPHY Thomas Johansson 2005/2006 c Thomas Johansson 2006 2 Chapter 1 Abstract algebra and Number theory Before we start the treatment of cryptography we need to review some basic

More information

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93. Exercises Exercises 1. Determine whether each of these integers is prime. a) 21 b) 29 c) 71 d) 97 e) 111 f) 143 2. Determine whether each of these integers is prime. a) 19 b) 27 c) 93 d) 101 e) 107 f)

More information

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations Page 1 Definitions Tuesday, May 8, 2018 12:23 AM Notations " " means "equals, by definition" the set of all real numbers the set of integers Denote a function from a set to a set by Denote the image of

More information

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald) Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald) 1 Euclid s Algorithm Euclid s Algorithm for computing the greatest common divisor belongs to the oldest known computing procedures

More information

Beautiful Mathematics

Beautiful Mathematics Beautiful Mathematics 1. Principle of Mathematical Induction The set of natural numbers is the set of positive integers {1, 2, 3,... } and is denoted by N. The Principle of Mathematical Induction is a

More information

Number Theory Proof Portfolio

Number Theory Proof Portfolio Number Theory Proof Portfolio Jordan Rock May 12, 2015 This portfolio is a collection of Number Theory proofs and problems done by Jordan Rock in the Spring of 2014. The problems are organized first by

More information

Mathematics for Cryptography

Mathematics for Cryptography Mathematics for Cryptography Douglas R. Stinson David R. Cheriton School of Computer Science University of Waterloo Waterloo, Ontario, N2L 3G1, Canada March 15, 2016 1 Groups and Modular Arithmetic 1.1

More information

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2000 2013 Contents 9 Introduction to Number Theory 63 9.1 Subgroups

More information

MATH 152 Problem set 6 solutions

MATH 152 Problem set 6 solutions MATH 52 Problem set 6 solutions. Z[ 2] is a Euclidean domain (i.e. has a division algorithm): the idea is to approximate the quotient by an element in Z[ 2]. More precisely, let a+b 2, c+d 2 Z[ 2] (of

More information

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Chapter : Logic Topics:. Statements, Negation, and Compound Statements.2 Truth Tables and Logical Equivalences.3

More information

A SURVEY OF PRIMALITY TESTS

A SURVEY OF PRIMALITY TESTS A SURVEY OF PRIMALITY TESTS STEFAN LANCE Abstract. In this paper, we show how modular arithmetic and Euler s totient function are applied to elementary number theory. In particular, we use only arithmetic

More information

Part IA Numbers and Sets

Part IA Numbers and Sets Part IA Numbers and Sets Theorems Based on lectures by A. G. Thomason Notes taken by Dexter Chua Michaelmas 2014 These notes are not endorsed by the lecturers, and I have modified them (often significantly)

More information

I Foundations Of Divisibility And Congruence 1

I Foundations Of Divisibility And Congruence 1 Contents I Foundations Of Divisibility And Congruence 1 1 Divisibility 3 1.1 Definitions............................. 3 1.2 Properties Of Divisibility..................... 5 1.3 Some Basic Combinatorial

More information

Chapter 14: Divisibility and factorization

Chapter 14: Divisibility and factorization Chapter 14: Divisibility and factorization Matthew Macauley Department of Mathematical Sciences Clemson University http://www.math.clemson.edu/~macaule/ Math 4120, Summer I 2014 M. Macauley (Clemson) Chapter

More information

Chapter 5: The Integers

Chapter 5: The Integers c Dr Oksana Shatalov, Fall 2014 1 Chapter 5: The Integers 5.1: Axioms and Basic Properties Operations on the set of integers, Z: addition and multiplication with the following properties: A1. Addition

More information

Course 2316 Sample Paper 1

Course 2316 Sample Paper 1 Course 2316 Sample Paper 1 Timothy Murphy April 19, 2015 Attempt 5 questions. All carry the same mark. 1. State and prove the Fundamental Theorem of Arithmetic (for N). Prove that there are an infinity

More information

Lecture 4: Number theory

Lecture 4: Number theory Lecture 4: Number theory Rajat Mittal IIT Kanpur In the next few classes we will talk about the basics of number theory. Number theory studies the properties of natural numbers and is considered one of

More information

Math 319 Problem Set #2 Solution 14 February 2002

Math 319 Problem Set #2 Solution 14 February 2002 Math 39 Problem Set # Solution 4 February 00. (.3, problem 8) Let n be a positive integer, and let r be the integer obtained by removing the last digit from n and then subtracting two times the digit ust

More information

MATH 215 Final. M4. For all a, b in Z, a b = b a.

MATH 215 Final. M4. For all a, b in Z, a b = b a. MATH 215 Final We will assume the existence of a set Z, whose elements are called integers, along with a well-defined binary operation + on Z (called addition), a second well-defined binary operation on

More information

PRACTICE PROBLEMS: SET 1

PRACTICE PROBLEMS: SET 1 PRACTICE PROBLEMS: SET MATH 437/537: PROF. DRAGOS GHIOCA. Problems Problem. Let a, b N. Show that if gcd(a, b) = lcm[a, b], then a = b. Problem. Let n, k N with n. Prove that (n ) (n k ) if and only if

More information

Number Theory in Problem Solving. Konrad Pilch

Number Theory in Problem Solving. Konrad Pilch Number Theory in Problem Solving Konrad Pilch April 7, 2016 1 Divisibility Number Theory concerns itself mostly with the study of the natural numbers (N) and the integers (Z). As a consequence, it deals

More information

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus...

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus... PREFACE These notes have been prepared by Dr Mike Canfell (with minor changes and extensions by Dr Gerd Schmalz) for use by the external students in the unit PMTH 338 Number Theory. This booklet covers

More information

198 VOLUME 46/47, NUMBER 3

198 VOLUME 46/47, NUMBER 3 LAWRENCE SOMER Abstract. Rotkiewicz has shown that there exist Fibonacci pseudoprimes having the forms p(p + 2), p(2p 1), and p(2p + 3), where all the terms in the products are odd primes. Assuming Dickson

More information

Introduction to Information Security

Introduction to Information Security Introduction to Information Security Lecture 5: Number Theory 007. 6. Prof. Byoungcheon Lee sultan (at) joongbu. ac. kr Information and Communications University Contents 1. Number Theory Divisibility

More information

Number Theory Solutions Packet

Number Theory Solutions Packet Number Theory Solutions Pacet 1 There exist two distinct positive integers, both of which are divisors of 10 10, with sum equal to 157 What are they? Solution Suppose 157 = x + y for x and y divisors of

More information

MATH 310 Course Objectives

MATH 310 Course Objectives MATH 310 Course Objectives Upon successful completion of MATH 310, the student should be able to: Apply the addition, subtraction, multiplication, and division principles to solve counting problems. Apply

More information

Numbers and their divisors

Numbers and their divisors Chapter 1 Numbers and their divisors 1.1 Some number theoretic functions Theorem 1.1 (Fundamental Theorem of Arithmetic). Every positive integer > 1 is uniquely the product of distinct prime powers: n

More information

Winter Camp 2009 Number Theory Tips and Tricks

Winter Camp 2009 Number Theory Tips and Tricks Winter Camp 2009 Number Theory Tips and Tricks David Arthur darthur@gmail.com 1 Introduction This handout is about some of the key techniques for solving number theory problems, especially Diophantine

More information

A Few Primality Testing Algorithms

A Few Primality Testing Algorithms A Few Primality Testing Algorithms Donald Brower April 2, 2006 0.1 Introduction These notes will cover a few primality testing algorithms. There are many such, some prove that a number is prime, others

More information

Chapter 3 Basic Number Theory

Chapter 3 Basic Number Theory Chapter 3 Basic Number Theory What is Number Theory? Well... What is Number Theory? Well... Number Theory The study of the natural numbers (Z + ), especially the relationship between different sorts of

More information

PRIME NUMBERS YANKI LEKILI

PRIME NUMBERS YANKI LEKILI PRIME NUMBERS YANKI LEKILI We denote by N the set of natural numbers: 1,2,..., These are constructed using Peano axioms. We will not get into the philosophical questions related to this and simply assume

More information

Math 2070BC Term 2 Weeks 1 13 Lecture Notes

Math 2070BC Term 2 Weeks 1 13 Lecture Notes Math 2070BC 2017 18 Term 2 Weeks 1 13 Lecture Notes Keywords: group operation multiplication associative identity element inverse commutative abelian group Special Linear Group order infinite order cyclic

More information

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES 2018 57 5. p-adic Numbers 5.1. Motivating examples. We all know that 2 is irrational, so that 2 is not a square in the rational field Q, but that we can

More information

Solutions for Homework Assignment 2

Solutions for Homework Assignment 2 Solutions for Homework Assignment 2 Problem 1. If a,b R, then a+b a + b. This fact is called the Triangle Inequality. By using the Triangle Inequality, prove that a b a b for all a,b R. Solution. To prove

More information

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. INTEGERS PETER MAYR (MATH 2001, CU BOULDER) In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. 1. Divisibility Definition. Let a, b

More information

MATH 3330 ABSTRACT ALGEBRA SPRING Definition. A statement is a declarative sentence that is either true or false.

MATH 3330 ABSTRACT ALGEBRA SPRING Definition. A statement is a declarative sentence that is either true or false. MATH 3330 ABSTRACT ALGEBRA SPRING 2014 TANYA CHEN Dr. Gordon Heier Tuesday January 14, 2014 The Basics of Logic (Appendix) Definition. A statement is a declarative sentence that is either true or false.

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem Chapter 5 The Chinese Remainder Theorem 5.1 Coprime moduli Theorem 5.1. Suppose m, n N, and gcd(m, n) = 1. Given any remainders r mod m and s mod n we can find N such that N r mod m and N s mod n. Moreover,

More information

Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition. Todd Cochrane

Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition. Todd Cochrane Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition Todd Cochrane Department of Mathematics Kansas State University Contents Notation v Chapter 0. Axioms for the set of Integers Z. 1 Chapter 1.

More information

Homework #2 solutions Due: June 15, 2012

Homework #2 solutions Due: June 15, 2012 All of the following exercises are based on the material in the handout on integers found on the class website. 1. Find d = gcd(475, 385) and express it as a linear combination of 475 and 385. That is

More information

. As the binomial coefficients are integers we have that. 2 n(n 1).

. As the binomial coefficients are integers we have that. 2 n(n 1). Math 580 Homework. 1. Divisibility. Definition 1. Let a, b be integers with a 0. Then b divides b iff there is an integer k such that b = ka. In the case we write a b. In this case we also say a is a factor

More information

MATH 117 LECTURE NOTES

MATH 117 LECTURE NOTES MATH 117 LECTURE NOTES XIN ZHOU Abstract. This is the set of lecture notes for Math 117 during Fall quarter of 2017 at UC Santa Barbara. The lectures follow closely the textbook [1]. Contents 1. The set

More information

1. (a) q = 4, r = 1. (b) q = 0, r = 0. (c) q = 5, r = (a) q = 9, r = 3. (b) q = 15, r = 17. (c) q = 117, r = 11.

1. (a) q = 4, r = 1. (b) q = 0, r = 0. (c) q = 5, r = (a) q = 9, r = 3. (b) q = 15, r = 17. (c) q = 117, r = 11. 000 Chapter 1 Arithmetic in 1.1 The Division Algorithm Revisited 1. (a) q = 4, r = 1. (b) q = 0, r = 0. (c) q = 5, r = 3. 2. (a) q = 9, r = 3. (b) q = 15, r = 17. (c) q = 117, r = 11. 3. (a) q = 6, r =

More information

5: The Integers (An introduction to Number Theory)

5: The Integers (An introduction to Number Theory) c Oksana Shatalov, Spring 2017 1 5: The Integers (An introduction to Number Theory) The Well Ordering Principle: Every nonempty subset on Z + has a smallest element; that is, if S is a nonempty subset

More information

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics:

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics: Executive Assessment Math Review Although the following provides a review of some of the mathematical concepts of arithmetic and algebra, it is not intended to be a textbook. You should use this chapter

More information

MAT115A-21 COMPLETE LECTURE NOTES

MAT115A-21 COMPLETE LECTURE NOTES MAT115A-21 COMPLETE LECTURE NOTES NATHANIEL GALLUP 1. Introduction Number theory begins as the study of the natural numbers the integers N = {1, 2, 3,...}, Z = { 3, 2, 1, 0, 1, 2, 3,...}, and sometimes

More information

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers: WORKSHEET MATH 215, FALL 15, WHYTE We begin our course with the natural numbers: N = {1, 2, 3,...} which are a subset of the integers: Z = {..., 2, 1, 0, 1, 2, 3,... } We will assume familiarity with their

More information

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand 1 Divisibility, prime numbers By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a

More information

Gaussian integers. 1 = a 2 + b 2 = c 2 + d 2.

Gaussian integers. 1 = a 2 + b 2 = c 2 + d 2. Gaussian integers 1 Units in Z[i] An element x = a + bi Z[i], a, b Z is a unit if there exists y = c + di Z[i] such that xy = 1. This implies 1 = x 2 y 2 = (a 2 + b 2 )(c 2 + d 2 ) But a 2, b 2, c 2, d

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation

More information

Solutions to Problem Set 4 - Fall 2008 Due Tuesday, Oct. 7 at 1:00

Solutions to Problem Set 4 - Fall 2008 Due Tuesday, Oct. 7 at 1:00 Solutions to 8.78 Problem Set 4 - Fall 008 Due Tuesday, Oct. 7 at :00. (a Prove that for any arithmetic functions f, f(d = f ( n d. To show the relation, we only have to show this equality of sets: {d

More information

1 Lecture 1 (1/5/2009)

1 Lecture 1 (1/5/2009) 1 Lecture 1 (1/5/2009) Notation 1.1 Introduce N := {0, 1, 2,... }, Z, Q, R, and C. Also let Z + := N \ {0}. Set notations. Recalled basic notions of a function being one to one, onto, and invertible. Think

More information

1 Lecture 1 (1/5/2009)

1 Lecture 1 (1/5/2009) 1 Lecture 1 (1/5/2009) Notation 1.1 Introduce N := {0, 1, 2,... }, Z, Q, R, and C. Also let Z + := N \ {0}. Set notations. Recalled basic notions of a function being one to one, onto, and invertible. Think

More information

Covering Subsets of the Integers and a Result on Digits of Fibonacci Numbers

Covering Subsets of the Integers and a Result on Digits of Fibonacci Numbers University of South Carolina Scholar Commons Theses and Dissertations 2017 Covering Subsets of the Integers and a Result on Digits of Fibonacci Numbers Wilson Andrew Harvey University of South Carolina

More information

Numbers, Groups and Cryptography. Gordan Savin

Numbers, Groups and Cryptography. Gordan Savin Numbers, Groups and Cryptography Gordan Savin Contents Chapter 1. Euclidean Algorithm 5 1. Euclidean Algorithm 5 2. Fundamental Theorem of Arithmetic 9 3. Uniqueness of Factorization 14 4. Efficiency

More information

A Readable Introduction to Real Mathematics

A Readable Introduction to Real Mathematics Solutions to selected problems in the book A Readable Introduction to Real Mathematics D. Rosenthal, D. Rosenthal, P. Rosenthal Chapter 7: The Euclidean Algorithm and Applications 1. Find the greatest

More information

Notes on Continued Fractions for Math 4400

Notes on Continued Fractions for Math 4400 . Continued fractions. Notes on Continued Fractions for Math 4400 The continued fraction expansion converts a positive real number α into a sequence of natural numbers. Conversely, a sequence of natural

More information

Number Theory Course notes for MA 341, Spring 2018

Number Theory Course notes for MA 341, Spring 2018 Number Theory Course notes for MA 341, Spring 2018 Jared Weinstein May 2, 2018 Contents 1 Basic properties of the integers 3 1.1 Definitions: Z and Q....................... 3 1.2 The well-ordering principle...................

More information

PELL S EQUATION, II KEITH CONRAD

PELL S EQUATION, II KEITH CONRAD PELL S EQUATION, II KEITH CONRAD 1. Introduction In Part I we met Pell s equation x dy = 1 for nonsquare positive integers d. We stated Lagrange s theorem that every Pell equation has a nontrivial solution

More information

Elementary Number Theory MARUCO. Summer, 2018

Elementary Number Theory MARUCO. Summer, 2018 Elementary Number Theory MARUCO Summer, 2018 Problem Set #0 axiom, theorem, proof, Z, N. Axioms Make a list of axioms for the integers. Does your list adequately describe them? Can you make this list as

More information