Math 180A - Notes. Neil Donaldson. March 14, 2018

Size: px
Start display at page:

Download "Math 180A - Notes. Neil Donaldson. March 14, 2018"

Transcription

1 Math 180A - Notes Neil Donaldson March 14, Introduction & Notation Number Theory is primarily concerned with the properties of integers and with integer solutions to equations, so-called Diophantine Equations in honor of Diophantus of Alexandria, a Greek Mathematician of the 3rd century CE. Here are some classic number theory problems and examples. 1. Find all the integer points (x, y) on the line 3x y = 1. The answer is (x, y) = (1 + n, 1 + 3n) where n Z. Can you prove right now that these are all the solutions?. If n is an odd integer then n 1 is a multiple of Can we find all Pythagorean triples: integers x, y, z such that x + y = z? 4. Prime numbers: if n is prime, what is the next prime? Is there a formula for the nth prime? Is n + n + 41 always prime whenever n is an integer? 5. Which integers can be written as the sums of two squares? Three? Four? 6. Fermat s Last Theorem: 1 if n 3 is an integer, then there are no positive integers x, y, z such that x n + y n = z n. Mathematics restricted to the integers is less intuitive than with the reals, or rational, numbers. The fundamental reason is that division within the integers is often impossible: for instance 7 4 is not an integer. Instead, an alternative notion of division involving remainders is used: e.g. 7 4 is 1 remainder 3. In algebraic language the integers are merely a ring, not a field like the rationals or reals. Notation The Integers: Z = {..., 3,, 1, 0, 1,, 3,...} The Natural Numbers: N = {1,, 3, 4,...} The Whole Numbers: N 0 = {0, 1,, 3,...} The Rational Numbers: Q = { m n : m Z, n N 0} The real numbers R and complex numbers C will not play much role in this class. 1 Historical note: In 1637 Pierre de Fermat left a note in the margin of a copy of Diophantus Arithmetica famously claiming to have proved his theorem. A complete proof took mathematicians another three and a half centuries...

2 Divisibility in the integers Given two integers m, n, it is unlikely that the ratio n m is also an integer. E.g. 3 would say the following: Z. Algebraists Z is not closed under division. The first order of business is to identify those pairs of integers for which division is allowed. Definition 1.1. Let m, n Z. We say that m divides n, and write m n if: k Z such that n = km We say that m is a divisor or factor of n. A common factor of two integers x, y is any (positive) integer d such that d x and d y. We say that x, y are relatively prime or coprime if the only positive common factor is 1. Notes and conventions Keep the line vertical! m n is a proposition (a statement which is either true or false), whereas m/n = m n is (usually) a rational number. Thus: 4 1 is true, 7 9 is false, 4 1 is a rational number. Some version of the following is a very common mistake: m n m/n m n Z Not only are we confusing propositions with numbers, but the resulting fraction is upsidedown! The word positive is usually omitted when talking about common factors. For instance, even though is a common factor of 8 and 1, it is common to say that the common factors are only 1, and 4. Note that m 0 for all integers m, since k = 0 satisfies the definition! In particular, 0 0 is true. The first observation relates to a subtely in the definition. It would be tempting to say that m divides n if and only if n m is an integer. There are two problems with this: n m Z = m n is true but it s converse is false, 0 0 being the sole counter-example. Divisibility is a property solely of the integers. It is somehow cleaner not to introduce the concept of a rational number n m into a discussion purely about integers. Colloquially we say that x, y have no common factors.

3 Pythagorean triples As a motivational problem, we find all positive integers x, y, z for which x + y = z. It is easy to find many: 1. Take a known Pythagorean triple (3, 4, 5) and multiply it by a constant. Thus (3n) + (4n) = (5n) for any n N. We immediately have infinitely many triples.. Use a spreadsheet or computer program to run through a large number of pairs (x, y) of integers, take the square-root of x + y, and test whether this is an integer. For example: in C/C++, the code 3 for(int x=1; x<=100; ++x) {for(int y=x; y<=100; ++y) {real z=sqrt(x^+y^); if(z-floor(z)==0){write(x,y,z);} } } would return all Pythagorean triples where x, y 100 (the last in the list is (80, 84, 116)). But what if we want to find them all? We need to proceed more deviously. Case 1 above is a motivator: in the triple (3, 4, 5), none of x, y, z have any common factors. Definition.1. A Pythagorean triple (x, y, z) is primitive if no pair of x, y, z have a common factor. We can now state some basic results that help narrow our search: Lemma.. Suppose that (x, y, z) is a Pythagorean triple. 1. If any pair of x, y, z have a common factor, the third shares this factor.. All non-primitive triples are a common multiple of a primitive triple. 3. If (x, y, z) is primitive, then z is odd. Proof (sketch). 1. This hard at the moment: it depends on being able to show that d m = d m. This follows very quickly from unique factorization, which we shall see later.... If a triple is non-primitive then some pair of x, y, z have a common factor. By part 1 they all do. Divide x, y, z by their greatest common factor d to obtain the primitive triple ( x d, y d, z d ). 3. If (x, y, z) is primitive, then at most one of x, y, z can be even. Moreover, they cannot all be odd, since odd + odd = odd. If z = m is even, then x and y are both odd and we may write x = k + 1 and y = l + 1 for some integers k, l. But then 4m = x + y = (k + 1) + (l + 1) = 4(k + l + k + l) +. The right hand side is not divisible by 4 so we have a contradiction. Hence z must be odd. 3 This code is very inefficient but is fine for investigating. A more efficient algorithm could be based on Theorem.3. 3

4 To summarize the Lemma, we may assume that a primitive Pythagorean triple (x, y, z) has x, z odd and y even. We are now ready to finish things off. Suppose that (x, y, z) is a primitive triple where y is even. Then x = z y = (z y)(z + y) Observe that z y and z + y have no common factors, for if they did, such would be a common factor of y and z: a contradiction. It can now be shown 4 that z y and z + y must both be perfect squares. Write z y = t, z + y = s Moreover, s, t must be relatively prime for otherwise y, z have a common factor. We have therefore sketched a proof of the following result. Theorem.3. All primitive triples (x, y, z) with x odd and y even have the form x = st, y = s t, z = s + t where s > t 1 are any odd integers with no common factor. For example, take s = 9, t = 5 to get (45, 8, 53). All Pythagorean triples are simply multiples of these. 3 Pythagorean Triples and the Unit Circle Assume that (x, y, z) is a Pythagorean triple. Then ( x ) ( y ) x + y = z = + = 1 z z Since x, y, z N, it follows that the point ( x z, y z ) is a rational point5 on the unit circle. For example, ( ) 3 ( ) 4 + = whence ( 3 5, 4 5 ) is a rational point on the unit circle. Conversely, suppose that (α, β) is a rational point satisfying α + β = 1. Let d be the product of the denominators of α, β. Then αd and βd are both integers. Moreover, (αd) + (βd) = d We therefore have a Pythagorean triple (αd, βd, d). Indeed there is a correspondence between rational points on the unit circle and Pythagorean triples. The correspondence is not 1 1, but with a little care it can be made so. We state the following without proof. 4 Unique factorization again... 5 A point whose co-ordinates are both rational numbers. 4

5 Theorem Suppose that (x, y, z) is a primitive Pythagorean triple. Then ( x z, y z ) is a rational point in the first quadrant of the unit circle.. Suppose that (α, β) is a rational point in the first quadrant of the unit circle. When written in lowest terms, α = a c and β = b c have the same denominator c. It follows that (a, b, c) is a primitive Pythagorean triple. To obtain a formula for the rational points we could simply divide the values for (x, y, z) in Theorem.3 to obtain ( x z, y ) ( st = z s + t, s t ) ( ) m s + t = m + 1, m 1 m where m = s + 1 t Noting, for primitive triples, that s > t, we see that m > 1 whence the resulting point really does lie in the first quadrant. Alternative viewpoint We could instead have started with the geometric problem of finding all rational points (x, y) on the unit circle. For this, imagine drawing a straight line with gradient m through the point (0, 1). Where does this intersect the circle? We want to solve the simultaneous equations { x + y = 1 y = mx 1 Substituting one in the other, we obtain x + m x mx + 1 = 1 = x[(m + 1)x m] = 0 = x = 0, x = 0 manifestly gives us our base point (0, 1), whereas the other yields y = mx 1 = m m = m 1 m + 1 We therefore obtain the second point of intersection (x, y) = ( ) m m + 1, m 1 m + 1 m m + 1 It is immediate that this is a rational point if and only if m is rational. Indeed we can go a little further: letting m = 0 yields the point (0, 1), while 6 m = results in the point (0, 1). We have therefore proved: 6 I.e. lim (x, y) = (0, 1). m 5

6 Theorem 3.. There is a bijective correspondence between the set of extended rational numbers Q { } and the rational points on the unit circle according the the formula m (x, y) = ( ) m m + 1, m 1 m + 1 P y 1 Indeed m can be interpreted as the gradient of the line joining the south pole (0, 1) with the desired rational point (x, y). 1 1 x The picture shows the line with gradient m = 5 through the south pole S, which generates the point P = ( 0 9, 1 9 ). Note that (0, 1, 9) is a (primitive) Pythagorean triple. 1 S Generalizing the method This method pay be applied to other quadratic curves. A full discussion requires an introduction to projective geometry which will have to wait until next term, but a simplified version of the idea is as follows. 1. Let C be a curve in the plane whose equation is quadratic with rational coefficients. I.e. ax + bxy + cy + dx + ey + f = 0 where a, b, c, d, e, f Q. Suppose that S is a rational point on C. 3. All rational points on C may be found by drawing a line through S which is either vertical or has rational gradient and intersecting it with C. Example Find all the rational points on the hyperbola x(y + x) = 3. We may choose S = (1, ). A line with gradient m through S has equation y = m(x 1) + Substituting into the original curve, we obtain (m + 1)x + ( m)x 3 = 0 = (x 1)[(m + 1)x + 3] = 0 = x = 1, 3 m + 1 It follows that all rational points on the hyperbola are given by the formula (x, y) = ( 3 ) m m, m + 1 m + 1 where m Q. In this case, a vertical line (m = ) does not yield a point on the hyperbola. y 3 S P x 3 6

7 Hopefully these introductory sections convince you that the approaches that may be required in Number Theory are very different to those seen in other courses. We ve already seen a deep connection to Geometry; there are equally deep links to other areas of Mathematics. It is now time we started a thorough discussion of the integers: of divisibility and of the prime numbers. 5 Divisibility and the Greatest Common Divisor First we rehash part of Definition 1.1. Definition 5.1. Let a, b, d be integers: if d satisfies d a and d b then d is a common divisor 7 of a and b. Suppose that a, b are not both zero. The greatest common divisor 8 of a, b is written d = gcd(a, b). We say that a, b are coprime or relatively prime iff gcd(a, b) = 1. Examples gcd(0, 9) = 9, gcd(45, 33) = 3, gcd(16, 450) = 18. The definition may be extended to any list of numbers: gcd(a 1,..., a n ) is the largest divisor of all the numbers a 1,..., a n. A famous algorithm exists for computing the GCD of a pair of numbers. Since it dates back at least to Euclid it is named for him. The extended Euclidean Algorithm (Bézout s Identity) will be even more useful to us, for it shows not only how to find the GCD d of two integers a, b, but also how to construct integers x, y satisfying the linear Diophantine equation ax + by = d. Using this approach will allow us to find all solutions to such equations. Theorem 5. (Division algorithm). If a Z, b N then there exist unique q, r Z such that a = qb + r, 0 r < b. We call q the quotient and r the remainder. While we can t divide in the integers, we can calculate using remainders exactly as you did in elementary school: 13 4 = 3r1 b a = qrr } { 13 = a = q b + r Proof. Consider the set S = N 0 {a bz : z Z}. This is a non-empty (take z large and negative) subset of the natural numbers, whence (well-ordering) it has a minimum element. Call this minimum r. Certainly r [0, b) for otherwise r b S. Now let q = a r b be the corresponding choice of z. This establishes existence. For uniqueness, suppose that a = q 1 b + r 1 and a = q b + r where 0 r 1, r < b. Then b < r 1 r < b and r 1 r = (q q 1 )b Thus r 1 r is divisible by b and lies in the interval ( b, b). Clearly r = r 1, whence q = q 1 and we have uniqueness. 7 By convention one tends to list only positive common divisors. 8 All positive common divisors satisfy d max( a, b ), hence there are a finite number of them; a greatest such must therefore exist. 7

8 While it is known as an algorithm, the presentation of Theorem 5. doesn t seem very algorithmic: indeed we shall simply take it as given that we can find q, r by whatever means we wish (messing with a calculator is fine!). To see it more as an algorithm, consider the case where a > 0 and follow these instructions: 1. Is a < b? If Yes, stop: r = a and q = 0.. Otherwise, compute a b. 3. Is a b < b? If Yes, stop: r = a b and q = Otherwise, compute a b, etc. 5. Repeat until the process terminates. For example, the following simple program computes q = 34 and r = from a = 40 and b = 7 simply by subtracting 7 from a until it can no longer do so. You can check that 40 = int a=40; int b=7; int q=0; int r=a; while(r>=b){r=r-b; q=q+1; } write(q); write(r); The Euclidean Algorithm for computing gcd(a, b) Suppose a > b > 0. By Theorem 5. there exist integers q 1, r 1 with 0 r 1 < b such that a = q 1 b + r 1 Supposing r 1 = 0 and noting that r 1 < b we apply the Division Algorithm again to see that there exist q, r with 0 r < r 1 and b = q r 1 + r We iterate this process until we reach a remainder 9 r k+1 = 0: (Line 1) a = q 1 b + r 1 (Line ) b = q r 1 + r (Line 3) r 1 = q 3 r + r 3. (Line k 1) r k 3 = q k 1 r k + r k 1 (Line k) r k = q k r k 1 + r k (Line k + 1) r k 1 = q k+1 r k To help distinguish quotients from remainders, when working the Algorithm we will type all remainders a, b, r 1, r,... in boldface; observe how one can trace the same remainder diagonally from one line to the next. 8

9 We can now state the important result: Theorem 5.3. The Euclidean Algorithm always terminates with final non-zero remainder r k = gcd(a, b). Proof. First observe that the sequence a > b > r 1 > r > r 3 > > 0 is a decreasing sequence of positive integers. At worst, one might imagine that this sequence takes b steps to reach 0 (in practice it requires far fewer). We may therefore follow the algorithm for any pair of integers a > b > 0 and be assured of its termination. Now let d = gcd(a, b) and consider the first line of the Algorithm: a = q 1 b + r 1 Certainly r 1 = a q 1 b is divisible by d, whence d is a common divisor of b and r 1. Moreover, if c were any larger common divisor of b and r 1, then c would divide a = bq 1 + r 1 and necessarily be a larger common divisor of a, b than d = gcd(a, b). This is a contradiction, whence gcd(b, r 1 ) = gcd(a, b) Iterating this (strictly by induction) we obtain gcd(a, b) = gcd(b, r 1 ) = gcd(r 1, r ) = = gcd(r k 1, r k ) = gcd(r k q k+1, r k ) = r k Note that if a or b are negative, you may still apply the Theorem to the pair a, b before compensating for the sign afterwards. Example We use the Algorithm to compute gcd(161, 1) 161 = = = = 7 = gcd(161, 140) = 7 We could easily have done this by listing the positive divisors of 1 (there are only 1, 3, 7, 1) and checking which of these is also a divisor of 161, but it is good to see the Algorithm at work. For larger a, b, finding all the divisors is prohibitively time-consuming, whereas the Euclidean Algorithm will always do the job in a (relatively) efficient manner. Bézout s Identity The next result is of great importance: not only does it allow us to write the GCD of two numbers in a special way, it tells us how we can construct those numbers. There are a great many existence theorems in Mathematics, but few of them tell you explicitly how to construct the desired objects. Theorem 5.4 (Extended Euclidean Algorithm/Bézout s Identity). Suppose that a, b Z are not both zero. Then there exist integers x, y such that gcd(a, b) = ax + by 9

10 Proof. Suppose that d = gcd(a, b). In the Euclidean Algroithm this appears in the penultimate line (line k), which can be rearranged to write d as an integer linear combination of the remainders r k and r k 1 : d = r k = r k q k r k 1 Move one line up the Algorithm: we can substitute for r k 1 (using line k 1): r k 1 = r k 3 q k 1 r k = d = r k q k (r k 3 q k 1 r k ) = (1 + q k 1 q k )r k q k r k 3 We now have an expression for d as an integer linear combination of the remainders r k and r k 3. Simply continue moving up the Algorithm ans substituting: after substituting for r j using line j, we will obtain an expression d = α j 1 r j 1 + α j r j where α j 1, α j Z. Eventually one reaches the first line of the Algorithm resulting in an integer linear combination for d in terms of the a and b. The proof is much easier to follow with our above example where d = r = 7. 7 = (rearrange line 3) = 1 ( ) (substitute for r = 14 using line ) = = ( ) (substitute for r 1 = 1 using line 1) = We therefore obtain 7 = 161x + 140y where (x, y) = (7, 8). Example Find d = gcd(113, 490) and integers x, y such that d = 113x + 490y Simply apply the Algorithm: 113 = = = = = 8 = gcd(113, 490) = We therefore have d =. Now reverse the steps of the Algorithm: = (line 4) = 34 ( ) = (line 3) = 9 ( ) 15 = (line ) = ( ) = (line 1) Hence (x, y) = ( 9, 67) is a solution to d = 113x + 490y. 10

11 As an example of the immediate theoretical power of Theorem 5.4 we prove the following: Corollary 5.5. Suppose that gcd(a, b) = 1 and a bc. Then a c. Proof. Since gcd(a, b) = 1, there exist integers x, y such that ax + by = 1. But then (ac)x + (bc)y = c, whence a bc = a LHS = a c Well-ordering, or the Least Integer Principle Recall that a set (of numbers) is well-ordered if every non-empty subset has a minimum element. In particular the natural numbers form a well-ordered set. In this context, well-ordering is also known as the least integer principle: any non-empty subset of the positive integers has a minimum element. We have now used this concept twice: 1. In the proof of the Division Algorithm, to guarantee the existence of r = min S.. To obtain a contradiction in the proof of the Euclidean Algorithm. The set of remainders {b, r 1, r,...} is a non-empty set of natural numbers: this has a minimum and since the remainders are decreasing, the minimum must be the last remainder. This second application of well-ordering is used repeatedly in Number Theory in particular in the method of descent. In short, any decreasing sequence of positive integers much have a minimum and therefore a finite length. The observation depends crucially on the terms of the sequence being positive integers; a decreasing sequence of positive rational numbers can be infinitely long (e.g. (1, 1, 1 3, 1 4,...)). 6 Linear Diophantine Equations A Linear Diophantine equation is an equation of the form ax + by = c where a, b, c Z are given and we are interested only in integer solutions (x, y). As the previous section shows we have already found solutions to some such equations: if c = gcd(a, b) then Bézout s Identity tells us how to find a solution. As this section shows, Bézout s Identity is essentially all one needs to deal with all linear equations. To see this, we use Bézout s Identity to obtain an important visualization of the GCD of two numbers. Theorem 6.1. If a, b Z are not both zero, then d = gcd(a, b) is the least positive member of the set D = {ax + by : x, y Z} Moreover, if E = {md : m Z} is the set of all integer multiples of d, then E = D. Proof. If one of a or b were zero then the GCD is the other and the theorem is trivial. If either is negative, consider a, b and observe that the sets D are independent of the signs of a, b. We thus assume without loss of generality that a > b > 0 and that we have applied the Euclidean Algorithm and its Extension to obtain integers x, y such that d = ax + by 11

12 We have therefore shown that d D 1. Moreover, we easily see that md = a(mx) + b(my) D = E D Conversely, d ax + by for all X, Y Z; every element ax + by D is therefore a multiple of d and so D E. The two sets are identical. Finally observe that d is clearly the least positive element of E. Corollary 6.. The Diophantine equation ax + by = c has a solution if and only if gcd(a, b) c. Proof. We have a solution iff c D which, by the Theorem, is iff c is a multiple of d = gcd(a, b). Example Show that 147x 45y = has no solutions in integers. 147 = = = gcd(147, 45) = 3 1 = = 3 3 Since {147x 45y : x, y Z} = {3n : n Z} does not contain, there are no solutions to the equation. General Solutions We have already seen (Corollary 6.) that ax + by = c has a solution in integers iff d = gcd(a, b) c, and how, when a solution exists, to find one using the Extended Euclidean algorithm (Theorem 5.4). Here we find all solutions to such an equation. Suppose that d c so that we have a solution (x 0, y 0 ) to ax + by = c. Moreover, suppose that (x 1, y 1 ) is another solution. Then a(x 1 x 0 ) + b(y 1 y 0 ) = (ax 1 + by 1 ) (ax 0 + by 0 ) = c c = 0 It follows that the difference (x 1 x 0, y 1 y 0 ) is a solution to the associated homogeneous equation 10 ax + by = 0 Indeed we see that ax + by = c (x, y) = (x 0, y 0 ) + (x h, y h ) where ax h + by h = 0 It remains to solve the homogeneous equation. For this, divide by d to obtain a d x h + b d y h = 0 = b d y h = a d x h ( ) ( ) Note that the coefficients are integers and that gcd a d, b d = 1. Since b d divides ( ), we may appeal to Corollary 5.5 to see that b d divides x h. We quickly conclude that x h = b d t and y h = a t for some t Z. d Indeed we have proved the following: 10 This method of solution is analogous to the standard approach to inhomogeneous linear ordinary differential equations, and to non-homogeneous linear algebra problems Ax = b. 1

13 Theorem 6.3. The Diophantine equation ax + by = c has a solution iff d c where d = gcd(a, b). In such a case there are infinitely many solutions: if (x 0, y 0 ) is a given solution then all may be found using the formula (x, y) = (x 0 + bd t, y 0 ad ) t where t Z We have therefore reduced the problem to finding the GCD d = gcd(a, b) and a single solution (x 0, y 0 ) to ax + by = c. Thankfully the (Extended) Euclidean Algorithm does both for us! Remember to take care to solve the correct equation; Bézout s Identity only solves ax + by = d: if d = c then multiply your solution (x 0, y 0 ) accordingly. Moreover, if the signs of a, b are not positive take this into account in your final answer. 1. Find all the solutions to the Diophantine equation 161x + 140y = 14. From before we have d = gcd(161, 140) = 7 and a solution (7, 8) to 161x + 140y = 7. Multiplying this by to obtain a solution to the desired equation, we see that the general solution to 161x + 140y = 14 is ( (x, y) = t, t ) = ( t, 16 3t) : t Z. Find all the solutions in integers to the equation 490x 113y = 4. We know that d = gcd(113, 490) = and that ( 9, 67) is a solution to 113x + 490y =. Rearranging this and taking the signs into account, we see that (x 0, y 0 ) = (134, 58) is a solution to the equation of interest. Hence the general solution is ( (x, y) = t, 58 + t, 7 Primes and Unique Factorization ) = ( t, t) : t Z. Now we turn to the building blocks of the integers, the prime numbers. Intuitively we understand what a prime is and that a positive integer can be decomposed into a product of primes: e.g. 156 = 3 13 The primary question for this section involves establishing that 156 cannot be factored into primes in any other way. Indeed the same is true for all positive integers: up to reordering there is one, and only one, decomposition as a product of primes. This famous result is known as the Unique Factorization Theorem or the Fundamental Theorem of Arithmetic. You have probably come across two different notions of a prime number: 1. A prime is an integer whose only positive divisors are 1 and itself.. A prime is an integer which, if it divides a product of integers must divide at least one of them. In abstract algebra, the first notion is known as irreducibility and the second primality. The challenge of proving unique factorization is showing the uniqueness part which, in essence, amounts to showing that these two concepts are the same. We restate the definitions for clarity. 13

14 Definition 7.1. Let z be an integer. We say that z is: Irreducible if, for any positive k, we have k z = k = 1 or k = z. Composite if z is not irreducible. Prime if z ab = z a or z b. We also refer to ±1 as units. 11 We will build up to Unique Factorization in two stages. First we show that every positive integer may be factored in terms of irreducibles. Then, by showing that primes and irreducibles are identical, we see that said factorization is unique. Irreducibiles and Composites First observe that a composite number z must have a positive divisor which is neither 1 nor z. That is, z is composite iff there exists a, b neither of which are units such that z = ab. Lemma 7.. Every composite number is divisible by an irreducible. Proof. Suppose that z is composite, but has no irreducible factors. Then: We may write z = a 1 b 1 where a 1, b 1 are not irreducible, and thus must be composites. If a 1 had an irreducible factor then this would be an irreducible factor of z. Hence a 1 is composite and may be written a 1 = a b for a, b composite. We may repeat the process ad infinitum: z = a 1 b 1 = a b b 1 = a 3 b 3 b b 1 = Since each b n we see that (a 1, a, a 3, a 4,...) is a decreasing sequence of positive integers. This is a contradiction. We conclude that z must have an irreducible factor. We can use Lemma 7. to prove Euclid s famous theorem that the set of irreducibles (primes) is infinite. Theorem 7.3. There are infinitely many irreducibles. Proof. Suppose that {p 1,..., p n } constitutes all the irreducibles and consider P := p 1 p n + 1. By Lemma 7., P has an irreducible factor p which, by assumption, is one of our irreducibles p i. But then p P and p p 1 p n = p 1 This contradicts the fact that p. 11 In a pure algebra sense, we should also deal with negative numbers and state that, for instance, is prime/irreducible. Don t worry if this makes you uncomfortable: we won t do this! 14

15 Theorem 7.4 (Fundamental Theorem of Arithmetic, part 1 (existence)). Every integer a may be factorized into irreducibles: that is a = p 1 p n where p 1,..., p n are a list of irreducibles. Proof. This is algorithmic. If a is irreducible, we are done. Otherwise (Lemma 7.) a has an irreducible factor p 1. But then a = p 1 a 1 for some a 1 N. If a 1 is an irreducible p, we are done. If a 1 is composite, apply Lemma 7. again to obtain an irreducible factor p and write a 1 = p a. Continue until the process terminates: we have our factorization a = p 1 p p n If the process never terminates, then we have an infinite sequence (a, a 1, a, a 3,...) of decreasing positive integers; a contradiction. Primes and Irreducibles Lemma 7.5. Every prime is irreducible. Proof. Suppose that p = k 1 k is prime where k 1, k are positive. Then p k 1 or p k ; without loss of generality suppose the former. Then k 1 = pα for some α Z. But then p = pαk = αk = 1 Since we are working in the integers and k > 0, it follows that k = 1 and k 1 = p. Lemma 7.6. Every irreducible is prime. Proof. This is a consequence of Bézout s Identity and the Euclidean Algorithm. Suppose that z is irreducible and that z ab for some integers a, b. Let d = gcd(a, z). Since z is irreducible, there are only two possibilities: d = 1: in this case gcd(a, z) = 1 and z ab implies (Corollary 5.5) that z b. d = z: in this case z a. From now on we can simply refer to irreducibles as primes. Theorem 7.7 (Fundamental Theorem of Arithmetic, part (uniqueness)). Every integer a may be uniquely factorized a = p µ 1 1 pµ n n where p 1 < < p n are a list of primes and each µ i N. 15

16 Proof. Theorem 7.4 says that we can factor a into irreducibles. Now suppose that we have two distinct such factorizations of a 1 p µ 1 1 pµ n n = p ν 1 1 pν n n Since the factorizations are distinct, we may suppose WLOG that µ 1 > ν 1. But then p µ 1 ν 1 1 p µ pµ n n = p ν pν n n Clearly p 1 LHS whence p 1 RHS. Since p 1 is prime (this is where we use Lemma 7.6) we see that p 1 divides at least one of p,..., p n. This is a contradiction. The result is often stated as follows: Theorem 7.8 (Unique Prime Factorization/Fundamental Theorem of Arithmetic). Every integer a is either 0, a unit, or may be written uniquely as a = up µ 1 1 pµ n n where p 1 < < p n are a list of primes, u is a unit, and each µ i N. Now that we have unique factorization, all manner of obvious things are seen to be true. For instance, suppose that a = p µ 1 1 pµ n n and b = p ν 1 1 pν n n are written in terms of their factorizations, where some of the exponents may need to be zero in order to have the same list of primes. The following should be immediate: 1. b a ν i µ i for all i. In essence, all the primes in b must also be in a.. gcd(a, b) = p min(µ 1,λ 1 ) 1 p min(µ n,λ n ) n. 3. a is a perfect square if and only if every µ i is even (consider a = b then µ i = ν i ). Indeed, look back to our discussion of Pythagorean triples where we used the facts that 4. d m = d m. 5. If ab is a perfect square and gcd(a, b) = 1 then both a and b are perfect squares. These facts are also very easy to prove using unique factorization. 1 Note that some of the exponents µ i, ν i could be zero if the supposed lists of primes were different. 16

17 Least Common Multiple Definition 7.9. The least common multiple lcm(a, b) of two positive integers a, b is the smallest positive integer divisible by both a and b. In terms of the unique prime decompositions of a and b we clearly have a = p µ 1 1 pµ n n b = p λ 1 1 pλ n n } = lcm(a, b) = p max(µ 1,λ 1 ) 1 p max(µ n,λ n ) n. As ever, we allow some of the µ i, λ i to be zero so as to simultaneously list all primes appearing in both decompositions. Recalling observation above, we see that lcm(a, b) gcd(a, b) = ab. This follows since max(µ i, λ i ) + min(µ i, λ i ) = µ i + λ i for each i. Warning: this formula does not hold for gcd s or lcm s of three or more integers. Example Find lcm(110, 154). We can either do this by brute force, listing the multiples of each number and looking for the smallest in the list, or we may proceed by calculating the GCD instead. By the Euclidean Algorithm we have 154 = = = Using the above formula we see that = gcd(110, 154) = lcm(110, 154) = = = Congruences and Z n A great many problems in number theory rely only on remainders when dividing by an integer. Recall the Division Algorithm: given a Z and n N there exists a unique quotient q and remainder r (both integers) such that a = qn + r, 0 r < n ( ) Motivated by this, we make a definition: Definition 8.1. For each n N, the set of residues modulo n is Z n = {0, 1,..., n 1}. ( ) says that every integer a Z has a unique residue r Z n. a, b Z are said to be congruent modulo n if they have the same residue modulo n. We write this as a b mod n 17

18 Example We may write 7 3 mod 5, since applying the Division Algorithm yields 7 = and 3 = 5 ( 1) + Indeed both 7 and 1 have residue modulo 5. As a further example of using just this definition, we prove a simple result. Proposition 8.. All perfect squares of integers have remainders 0 or 1 upon dividing by 3. Proof. By the definition, every integer x Z has remainder 0, 1 or upon division by 3. We therefore have three mutually exclusive cases to check: (Remainder zero) We may write x = 3y for some integer y. But then x = 9y = 3(3y ) 0 mod 3 (Remainder one) We may write x = 3y + 1 for some integer y. Then x = 9y + 6y + 1 = 3(3y + y) mod 3 (Remainder two) We may write x = 3y + for some integer y. Then x = 9y + 1y + 4 = 3(3y + 4y + 1) mod 3 A perfect square can therefore never have remainder. This is tedious notation, and we will shortly make it less unwieldy. To start this process we observe that there is an easier way to check whether two integers are congruent modulo n. Theorem 8.3. a b mod n n (a b) Proof. Suppose that a = nq 1 + r 1 and b = nq + r are the results of applying the Division Algorithm to a, b modulo n. We prove each direction separately: ( ) First note that a b mod = r 1 = r = a nq 1 = b nq = a b = n(q q 1 ) Since q q 1 is an integer, this forces a b to be a multiple of n. ( ) Conversely, suppose that a b = kn is a multiple of n. Then r 1 r = (a nq 1 ) (b nq ) = (a b) + n(q q 1 ) = n(k + q q ) This says that r 1 r is an integers multiple of n. Recalling the proof of the Division Algorithm, the fact that n < r 1 r < n forces r 1 r = 0, whence a b mod n. 18

19 For instance, we can now prove that 7 3 mod 5 simply by observing that 7 ( 3) = 10 is divisible by 5. The advantage should be clear: Theorem 8.3 says that we can compare remainders without computing quotients. Our next goal is to define an arithmetic with remainders: that is, we want to be able to add and multiply remainders without calculating quotients. For instance, it certainly seems reasonable that if x and y have remainders 3 and 5 (respectively) modulo 7, then x 3, y 5 = xy mod 7 so that the product has remainder 1. At the present, we have to justify this in laborious fashion: If x 3 and y 5 modulo 7, then there exist integers k, l such that x = 7k + 3 and y = 7l + 5; but then xy = 7(7kl + 5k + 3l) + 15 = 7(7kl + 5k + 3l + ) + 1 = xy 1 mod 7 We now establish this in general. Theorem 8.4. Suppose that x a, y b modulo n. Then 1. x ± y a ± b mod n. xy ab mod n 3. For any m N, x m a m mod n Proof. We just prove the second: the first is similar, and the third is by induction using the second as the induction step. By Theorem 8.3, there exist integers k, l such that x = kn + a and y = ln + b. But then xy = (kn + a)(ln + b) = n(kln + al + bk) + ab = xy ab mod n According to the theorem, we can now easily compute remainders of complex arithmetic objects; for instance: 1. What is the remainder when is divided by 3? Don t bother asking your calculator: is 139 digits long so a calculator won t help! Instead we use modular arithmetic: 17 1 mod 3 = ( 1) 113 (Theorem 8.4, part 3.) 1 mod 3 (since 113 is odd) Since 1, we conclude that has remainder when divided by 3.. Similarly, calculating remainders modulo 10 gives ( 1) ( 1) mod 10 19

20 3. In this lengthy example, we first search for a power of 4 which is small modulo n = 67: the obvious choice is 4 3 = (4 3 ) 16 4 ( 3) mod 67 Next we search for a power of 3 which is small: since 3 4 = mod 67 we obtain (3 4 ) mod 67 Now observe that 14 = mod 67 and we are almost finished: ( 5) mod 67 Don t try this without a calculator! Now that we have some better notation, here is a much faster proof of Proposition 8.. Proof. Modulo 3 we have: 0 0, 1 1, 4 1 Hence squares can only have remainders 0 or 1 modulo 3. As an application, we can easily show that in a Pythagorean triple (a, b, c) exactly one of a or b is a multiple of three: just think about the remainders modulo 3: a + b c where each square is congruent to 0 or 1. The only possibilities are , and , however the first of these says that all three of a, b, c are divisible by three whence the triple is non-primitive. Aside: What is Z n? (for those with some abstract algebra experience) Our notation Z n = {0, 1,..., n 1} for the set of residues is strictly incorrect, for it makes it appear that the elements of Z n are integers. In fact the symbol Z n is used to denote something subtly different. Here is some of the detail: Strictly speaking, congruence modulo n is an equivalence relation on the ring (Z, +, ) of integers. Write Z/ nz = {[0], [1],..., [n 1]} for the set of equivalence classes: that is [x] = [a] x a mod n In this language the subring nz = [0] of multiples of n is an ideal in Z. It follows that the set of equivalence classes Z/ nz inherits a ring structure from Z where addition + n and multiplication n are defined by [x] + n [y] := [x + y], [x] n [y] := [xy] ( We call the triple Z / ) nz, + n, n a quotient or factor ring. Since the notation is very ugly, it is customary to omit the square brackets and subscripts and to denote the new ring by Z n. Thus Z n is the quotient ring of residues modulo n. It is perfectly legitimate to denote the elements of this ring by Z n = {0, 1,..., n 1} 0

21 as long as one understands that each element is an equivalence class and may be represented by any other element in the class. Thus it is perfectly acceptable to write 1 = 4 in the ring Z 5. This discussion means that we now have three competing notations: for example, if n = 6: Congruence notation: mod 6 Factor ring notation: [4] + 6 [5] = [3] Z n notation: = 3 This last is clearly the most succinct, but it very easy to be confused: 4, 5 and 3 are not integers in this context, they are elements of a new algebraic structure, namely the ring Z 6. Unless you make it absolutely clear in which ring Z n you are working, you should avoid this notation. Congruence and Division We are able to add, subtract, multiply and take positive integer powers of remainders without issue. Division is another matter entirely. For example, since 8 0 mod 6, we know that mod 6 ( ) We d like to be able to divide by four, however 5 mod 6. What can we try instead? To motivate the next result, we follow the definition: mod 6 = 4 = m for some m Z Dividing this by we see that = 5 + 3m = m = m = l for some l Z But then we may divide by again to correctly conclude = 5 + 3l = 5 mod 3 It appears that we were able to divide ( ) by four, but at the cost of dividing the modulus by : it just so happens that = gcd(4, 6). Theorem 8.5. Suppose that k = 0. If gcd(k, n) = d then ka kb mod n = a b mod n d ( ) Proof. gcd(k, n) = d gcd k d, n d = 1. Therefore ka kb = n k(a b) = n d k (a b) d Since n d and k d are comprime integers, an appeal to Corollary 5.5 tells us that n d a b mod n d. a b. Otherwise said 13 It is obvious that m = but leaving this unsaid makes it easier to see a proof of the following theorem. 1

22 Examples 1. We divide by 4 in the congruence 1 8 mod 8. Since gcd(4, 8) = 4 we also divide the modulus by 4 to obtain 1 8 mod 8 = 3 7 mod. We divide by 1 in the congruence 1 7 mod 30. Since gcd(1, 30) = 6, we conclude that 1 7 mod 30 = 1 6 mod 5 Aside: Rings and Fields While considering division, it is worth revisiting Corollary 5.5 and Bézout s identity. We know that gcd(a, p) = 1 = x, y Z such that ax + py = 1 Looking at this modulo p, we obtain ax 1 mod p Otherwise said, if a Z p is relatively prime to p then a has a multiplicative inverse x. If p is prime then every non-zero element in the ring Z p has a multiplicative inverse. This is precisely what it means for a ring to be a field. For example: in Z 5 we have 1 = 1 1 = 3 = 4 4 = 1 1 = 1, 1 = 3, 3 1 =, 4 1 = 4 In Z 6 however, we see that the remainder has no multiplicative inverse: x x I.e. there is no x such that x 1 mod 6. In general this approach gives us a converse for composite numbers. Suppose that n = ab is composite, where a, b < n: if a Z n had a multiplicative inverse c then we would have ac 1 mod n = abc b = b 0 mod n But this says that b is divisible by n: a contradiction. We conclude: Theorem. Z n is a field if and only if n is prime. Tying this to Theorem 8.5, we see that in a field Z p we can divide by any non-zero remainder while remaining in the same set of remainders.

23 Congruence Equations We can rephrase our discussion of Linear Diophantine Equations ax c mod m has a solution x y s.t. ax c = my ax my = c has a solution. But this is iff gcd(a, m) c. Indeed: Theorem 8.6. Let d = gcd(a.m). The equation ax c mod m has a solution iff d c. If x 0 is such a solution, then all solutions are x = x 0 + k m d : k Z. Indeed, modulo m, there are exactly d solutions x 0, x 0 + m d, x 0 + m d,..., x 0 + (d 1)m d Example 188x 1 mod 1575 has a solution since d = gcd(1575, 188) = 7 and 7 1. Indeed Bézout s identity says 7 = = 7 188( 11) mod 1575 = x = is a solution. Since m d = = 5 in this case, we see that all solutions are then {x k : k = 0,..., 6} = {19, 417, 64, 867, 109, 1317, 154}. Polynomial Congruence Equations Consider the quadratic equation x + 3x 0 mod 10. One can easily check by plugging in the remainders 0,..., 9 that the solutions to this equation are x 0,, 5, 7 mod 10 This is perhaps surprising. We are used to quadratic equations having at most two solutions. Now consider the same equation modulo the two prime divisors of 10, namely and 5. Indeed it should be clear that { x x + 3x 0 mod, and, + 3x 0 mod 10 x + 3x 0 mod 5. Again we can check by substituting values for x, that x + 3x 0 mod x 0, 1 mod, x + 3x 0 mod 5 x 0, mod 5. Sanity is restored! Indeed, we can even factorize like we are used to: x + 3x x x x(x 1) mod, x + 3x x x x(x ) mod 5. Modulo 10, we have two distinct factorizations: x + 3x x(x 7) (x )(x 5) mod 10. For general polynomial congruences, the same sort of thing is true, but only when the modulus is prime. 3

24 Theorem 8.7 (Lagrange). Let p be prime and f (x) a degree n polynomial with integer coefficients. Then the congruence f (x) 0 mod p has at most n distinct roots modulo p. Of course Lagrange s Theorem is useless for polynomial congruences such as x x mod 17. There are only 17 distinct values of x to try, and so the congruence can only have a maximum of 17 solutions, not the 39 given by Lagrange s Theorem. Aside: a (sketch) proof of Lagrange s Theorem Since we ve not done all the preliminaries for a proof of Lagrange s Theorem, we provide only a sketch. One needs a little more algebra than we have, in particular the division algorithm in the ring Z[x] of polynomial with integers coefficients. Suppose that f (c 1 ) 0 mod p. Then there exist polynomials q(x), r(x) satisfying { f (x) = (x c 1 )q(x) + r(x) 0 deg(r) < deg(x c 1 ) = 1 Since the degree of the remainder r(x) must be zero, we see that it is constant. Moreover f (c 1 ) 0 = r 0 mod p. We conclude that (x c 1 ) is a factor of f (x) modulo p. Proof. Suppose that we find n roots of the equation. According to the division algorithm above, we may therefore totally factorize f (x) as f (x) = a(x c 1 ) (x c n ). Since the degree of both sides is n we cannot divide out by any further linear factors. Now suppose that ξ c 1,..., c n mod p. Then ξ c i 0 mod p for all i. Since products of non-zero elements in a field Z p are non-zero we must have f (ξ) = 0. There are thus at most n roots of the polynomial congruence. In fact, the ring of polynomials Z p [x] with coefficients in the field Z p has a Euclidean Algorithm, and therefore a unique factorization theorem. This means that there is only one way to factorize any polynomial modulo p, but this takes us beyond the scope of the course. The practical upshot is that you can hunt for roots of f (x) 0 modulo p by extracting a linear factor f (x) (x c 1 )q(x), then searching for roots of q(x) 0, exactly as you would for polynomials with real coefficients. Lagrange s Theorem is completely useless in the situation when n p as there can only be at most p solutions to any equation modulo p. Examples 1. Factorize f (x) = x 3 + x + 4x + 3 over Z 5. By inspection we see that x ±1, are solutions. By Lagrange s Theorem these are the only solutions and we can factorize f (x) (x 1)(x + 1)(x + ) mod 5. We know that the factorization is unique and there are no other solutions, but it is worth seeing it played out in stages. f (x) x 3 + x + 4x + 3 (x 1)(x + 3x + 7) (spot x 1 and factorize) 4

25 (x 1)(x + 3x + ) (x 1)(x + 1)(x + ) (simplify) (spot x 1 and factorize). Note that Lagrange only says that there are at most n solutions modulo p. Consider the polynomial f (x) = x + x + 1 mod. It is easy to check that this has no solutions Here is another example of a quadratic with four roots: modulo 6 we have f (x) x 5x x(x 5) (x )(x 3). Comparing with example 1, note that we can t simply factor out (x 0) from x 5x because the factorization need not be unique. This is because 6 is not prime. 4. We find all solutions to x + 14x 3 0 mod 18. While you may feel it is fastest to try all remainders 0, 1,..., 17 with your calculator, we give a more systematic approach. x is a solution if and only if both { x + 14x 3 x 1 0 mod x odd, and, x + 14x 3 x + 5x 3 0 mod 9. The second condition implies that x + x 0 mod 3 which, by factoring, yields x 0, 1 mod 3. We therefore try x 0, 1, 3, 4, 6, 7 mod 9 and observe that only x 6, 7 mod 9 work. We therefore have to solve two different sets of equations: { x 1 mod, x 6 mod 9, or { x 1 mod, x 7 mod 9. We have two sets of simultaneous equations. In general, the Chinese Remainder Theorem (later) can deal with these, but these are so simple that there s no need. For instance x 6 mod 9 = x 6, 15 mod 18 If x must also be odd (and 18 is even), only x 15 mod 18 will do. Similarly, the second simultaneous congruence has solution x 7 mod Find all solutions to x 3 x mod 1. We easily spot that x 1 mod 1 is a solution. Are there others? Considering the primes dividing 1 we see that any solution must satisfy x 3 x + 1 (x 1)(x + x 1) 0 mod and mod 3. It is clear by inspection that the only solutions modulo and 3 are x 1. It follows that any solution must satisfy x 1 mod 6. Stepping this up to modulo 1, we should try x 1 and x 7 mod 1. The first is certainly a solution. As for the latter, mod 1 It follows that the only solution is x 1 mod In the language of Section 7, f is an irreducible polynomial in the ring Z [x]. 5

26 9 Congruences, Powers and Fermat s Little Theorem Fermat s Little 15 Theorem provides a useful trick for simplifying large powers in congruence equations. Perhaps the simplest proof relies on a simple fact about the residues modulo a prime. Lemma 9.1. Let p be a prime and a be a positive integer less than p. Then numbers a, a, 3a, 4a,..., (p 1)a constitute all the non-zero remainders modulo p. Otherwise said, modulo p these are the numbers 1,, 3,..., p 1 though probably in a different order. Example table: If you re having trouble believing this, try an examples. Let p = 5 and we can create a a a 3a 4a Notice that every remainder appears exactly once in each row. If we try to repeat with a non-prime, say p = 6, we get a different story: a a 3a 4a 5a The only lines in which all the non-zero remainders appear are when a = 1 or a = 5. This will be important in the next section: these are precisely the remainders a for which gcd(a, 6) = 1. With primes, we always have gcd(a, p) = 1, and this forms the heart of the proof. Proof. If 1 a p 1 and p is prime, then gcd(a, p) = 1. Suppose that two of the remainders xa, ya were equal. Appealing to Theorem 8.5, we can divide by a to obtain xa ya = x y mod p It follows that the numbers a, a,..., (p 1)a are distinct modulo p. Moreover, none are zero, since none are divisible by p. Corollary 9. (Fermat s Little Theorem). If p is prime and p a then a p 1 1 mod p Proof. Multiply the remainders a, a,..., a(p 1) together. Since these are just the remainders 1,,..., p 1 in a different order, we obtain a p 1 (p 1)! (p 1)! mod p Since p is prime and gcd ( (p 1)!, p) = 1 we must be able to divide by (p 1)!. The result follows. 15 To distinguish it from his famous last. 6

27 Examples Here are a few examples of using Fermat s Little Theorem to simplify calculations. Doing these without the Theorem is very tedious! 1. Since 39 is not divisible by the prime 137, we instantly see that mod 137. Compute the remainder when is divided by 97. Since 97 is prime and 66 is coprime to it, we can apply Fermat s Little Theorem: mod 97 ( 31) mod This time we employ the Theorem to help solve the high-powered congruence x 74 1 mod 37. First note that x 0. If there is a solution, we see that the theorem applies. But then x 37 1 x 36 1 mod 37. Since 74 = 36 + we conclude that 1 x 74 (x 36 ) x x mod 37 We have therefore reduced the congruence to something much more manageable. Finally, we consider numbers congruent to 1 modulo 37: we don t have far to look before we find a perfect square! 1, 49,... Thus x 7 is a solution, which says that x 7 30 is another. By Lagrange s Theorem, there are at most two solutions to this congruence: we conclude x 74 1 x 7, 30 mod 37 Theorem 9.3 (Wilson s Theorem). If p is prime then (p 1)! 1 mod p. Proof. Consider the polynomial congruence g(x) (x p 1 1) (x 1)(x ) (x (p 1) ) 0 mod p We can attack this using two theorems: Multiplying out and cancelling the x p 1 terms, we see that g has degree at most p. Lagrange s Theorem says that g(x) 0 can have at most p distinct roots. Fermat s little theorem says that the congruence has at least p 1 distinct roots, namely x 1,,..., p 1. The only way to make sense of this is if g(x) is not a polynomial at all: it is identically zero modulo p. It follows that x p 1 1 (x 1)(x ) (x (p 1) ) mod p Evaluating at x 0 yields the result. 7

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 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

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

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

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

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

1 Continued Fractions

1 Continued Fractions Continued Fractions To start off the course, we consider a generalization of the Euclidean Algorithm which has ancient historical roots and yet still has relevance and applications today.. Continued Fraction

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

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic 11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic Bezout s Lemma Let's look at the values of 4x + 6y when x and y are integers. If x is -6 and y is 4 we

More information

Homework 7 solutions M328K by Mark Lindberg/Marie-Amelie Lawn

Homework 7 solutions M328K by Mark Lindberg/Marie-Amelie Lawn Homework 7 solutions M328K by Mark Lindberg/Marie-Amelie Lawn Problem 1: 4.4 # 2:x 3 + 8x 2 x 1 0 (mod 1331). a) x 3 + 8x 2 x 1 0 (mod 11). This does not break down, so trial and error gives: x = 0 : f(0)

More information

Example: This theorem is the easiest way to test an ideal (or an element) is prime. Z[x] (x)

Example: This theorem is the easiest way to test an ideal (or an element) is prime. Z[x] (x) Math 4010/5530 Factorization Theory January 2016 Let R be an integral domain. Recall that s, t R are called associates if they differ by a unit (i.e. there is some c R such that s = ct). Let R be a commutative

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

2 Elementary number theory

2 Elementary number theory 2 Elementary number theory 2.1 Introduction Elementary number theory is concerned with properties of the integers. Hence we shall be interested in the following sets: The set if integers {... 2, 1,0,1,2,3,...},

More information

Fermat s Last Theorem for Regular Primes

Fermat s Last Theorem for Regular Primes Fermat s Last Theorem for Regular Primes S. M.-C. 22 September 2015 Abstract Fermat famously claimed in the margin of a book that a certain family of Diophantine equations have no solutions in integers.

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

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6 Math 131 notes Jason Riedy 6 October, 2008 Contents 1 Modular arithmetic 2 2 Divisibility rules 3 3 Greatest common divisor 4 4 Least common multiple 4 5 Euclidean GCD algorithm 5 6 Linear Diophantine

More information

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Intermediate Math Circles February 26, 2014 Diophantine Equations I Intermediate Math Circles February 26, 2014 Diophantine Equations I 1. An introduction to Diophantine equations A Diophantine equation is a polynomial equation that is intended to be solved over the integers.

More information

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively 6 Prime Numbers Part VI of PJE 6.1 Fundamental Results Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively D (p) = { p 1 1 p}. Otherwise

More information

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...} WORKSHEET ON NUMBERS, MATH 215 FALL 18(WHYTE) We start our study of numbers with the integers: Z = {..., 2, 1, 0, 1, 2, 3,... } and their subset of natural numbers: N = {1, 2, 3,...} For now we will not

More information

1. Factorization Divisibility in Z.

1. Factorization Divisibility in Z. 8 J. E. CREMONA 1.1. Divisibility in Z. 1. Factorization Definition 1.1.1. Let a, b Z. Then we say that a divides b and write a b if b = ac for some c Z: a b c Z : b = ac. Alternatively, we may say that

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

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

LEGENDRE S THEOREM, LEGRANGE S DESCENT

LEGENDRE S THEOREM, LEGRANGE S DESCENT LEGENDRE S THEOREM, LEGRANGE S DESCENT SUPPLEMENT FOR MATH 370: NUMBER THEORY Abstract. Legendre gave simple necessary and sufficient conditions for the solvablility of the diophantine equation ax 2 +

More information

Basic Algebra. Final Version, August, 2006 For Publication by Birkhäuser Boston Along with a Companion Volume Advanced Algebra In the Series

Basic Algebra. Final Version, August, 2006 For Publication by Birkhäuser Boston Along with a Companion Volume Advanced Algebra In the Series Basic Algebra Final Version, August, 2006 For Publication by Birkhäuser Boston Along with a Companion Volume Advanced Algebra In the Series Cornerstones Selected Pages from Chapter I: pp. 1 15 Anthony

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

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. Chapter 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. If n > 1

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

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

CHAPTER 6. Prime Numbers. Definition and Fundamental Results CHAPTER 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results 6.1. Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and the only positive divisors of p are 1 and p. If n

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

EUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972)

EUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972) Intro to Math Reasoning Grinshpan EUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972) We all know that every composite natural number is a product

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

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

Finite Fields: An introduction through exercises Jonathan Buss Spring 2014

Finite Fields: An introduction through exercises Jonathan Buss Spring 2014 Finite Fields: An introduction through exercises Jonathan Buss Spring 2014 A typical course in abstract algebra starts with groups, and then moves on to rings, vector spaces, fields, etc. This sequence

More information

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today?

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today? 2 Mod math Modular arithmetic is the math you do when you talk about time on a clock. For example, if it s 9 o clock right now, then it ll be 1 o clock in 4 hours. Clearly, 9 + 4 1 in general. But on a

More information

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases Lecture 2. The Euclidean Algorithm and Numbers in Other Bases At the end of Lecture 1, we gave formulas for the greatest common divisor GCD (a, b), and the least common multiple LCM (a, b) of two integers

More information

4 Powers of an Element; Cyclic Groups

4 Powers of an Element; Cyclic Groups 4 Powers of an Element; Cyclic Groups Notation When considering an abstract group (G, ), we will often simplify notation as follows x y will be expressed as xy (x y) z will be expressed as xyz x (y z)

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

Olympiad Number Theory Through Challenging Problems

Olympiad Number Theory Through Challenging Problems Olympiad Number Theory Justin Stevens Page 1 Olympiad Number Theory Through Challenging Problems Authors Justin Stevens Editor and L A TEX Manager David Altizio Dedicated to my sister. Justin Contents

More information

Number theory (Chapter 4)

Number theory (Chapter 4) EECS 203 Spring 2016 Lecture 10 Page 1 of 8 Number theory (Chapter 4) Review Questions: 1. Does 5 1? Does 1 5? 2. Does (129+63) mod 10 = (129 mod 10)+(63 mod 10)? 3. Does (129+63) mod 10 = ((129 mod 10)+(63

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

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

CHAPTER 3. Congruences. Congruence: definitions and properties

CHAPTER 3. Congruences. Congruence: definitions and properties CHAPTER 3 Congruences Part V of PJE Congruence: definitions and properties Definition. (PJE definition 19.1.1) Let m > 0 be an integer. Integers a and b are congruent modulo m if m divides a b. We write

More information

6 Cosets & Factor Groups

6 Cosets & Factor Groups 6 Cosets & Factor Groups The course becomes markedly more abstract at this point. Our primary goal is to break apart a group into subsets such that the set of subsets inherits a natural group structure.

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

DR.RUPNATHJI( DR.RUPAK NATH )

DR.RUPNATHJI( DR.RUPAK NATH ) Contents 1 Sets 1 2 The Real Numbers 9 3 Sequences 29 4 Series 59 5 Functions 81 6 Power Series 105 7 The elementary functions 111 Chapter 1 Sets It is very convenient to introduce some notation and terminology

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

= 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

3 The language of proof

3 The language of proof 3 The language of proof After working through this section, you should be able to: (a) understand what is asserted by various types of mathematical statements, in particular implications and equivalences;

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

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions Warm-up Problems 1. What is a prime number? Give an example of an even prime number and an odd prime number. A prime number

More information

MATH 361: NUMBER THEORY FOURTH LECTURE

MATH 361: NUMBER THEORY FOURTH LECTURE MATH 361: NUMBER THEORY FOURTH LECTURE 1. Introduction Everybody knows that three hours after 10:00, the time is 1:00. That is, everybody is familiar with modular arithmetic, the usual arithmetic of the

More information

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24 Direct Proof MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Direct Proof Fall 2014 1 / 24 Outline 1 Overview of Proof 2 Theorems 3 Definitions 4 Direct Proof 5 Using

More information

Divisibility. Chapter Divisors and Residues

Divisibility. Chapter Divisors and Residues Chapter 1 Divisibility Number theory is concerned with the properties of the integers. By the word integers we mean the counting numbers 1, 2, 3,..., together with their negatives and zero. Accordingly

More information

Chapter 1 A Survey of Divisibility 14

Chapter 1 A Survey of Divisibility 14 Chapter 1 A Survey of Divisibility 14 SECTION C Euclidean Algorithm By the end of this section you will be able to use properties of the greatest common divisor (gcd) obtain the gcd using the Euclidean

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

Number Theory. Henry Liu, 6 July 2007

Number Theory. Henry Liu, 6 July 2007 Number Theory Henry Liu, 6 July 007 1. Introduction In one sentence, number theory is the area of mathematics which studies the properties of integers. Some of the most studied subareas are the theories

More information

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II CS 5319 Advanced Discrete Structure Lecture 9: Introduction to Number Theory II Divisibility Outline Greatest Common Divisor Fundamental Theorem of Arithmetic Modular Arithmetic Euler Phi Function RSA

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

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

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r.

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r. 118 18. DIVISIBILITY 18 Divisibility Chapter V Theory of the Integers One of the oldest surviving mathematical texts is Euclid s Elements, a collection of 13 books. This book, dating back to several hundred

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

= 5 2 and = 13 2 and = (1) = 10 2 and = 15 2 and = 25 2

= 5 2 and = 13 2 and = (1) = 10 2 and = 15 2 and = 25 2 BEGINNING ALGEBRAIC NUMBER THEORY Fermat s Last Theorem is one of the most famous problems in mathematics. Its origin can be traced back to the work of the Greek mathematician Diophantus (third century

More information

Number Theory Notes Spring 2011

Number Theory Notes Spring 2011 PRELIMINARIES The counting numbers or natural numbers are 1, 2, 3, 4, 5, 6.... The whole numbers are the counting numbers with zero 0, 1, 2, 3, 4, 5, 6.... The integers are the counting numbers and zero

More information

A Guide to Arithmetic

A Guide to Arithmetic A Guide to Arithmetic Robin Chapman August 5, 1994 These notes give a very brief resumé of my number theory course. Proofs and examples are omitted. Any suggestions for improvements will be gratefully

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

Table of Contents. 2013, Pearson Education, Inc.

Table of Contents. 2013, Pearson Education, Inc. Table of Contents Chapter 1 What is Number Theory? 1 Chapter Pythagorean Triples 5 Chapter 3 Pythagorean Triples and the Unit Circle 11 Chapter 4 Sums of Higher Powers and Fermat s Last Theorem 16 Chapter

More information

CHAPTER 3. Number Theory

CHAPTER 3. Number Theory CHAPTER 3 Number Theory 1. Factors or not According to Carl Friedrich Gauss (1777-1855) mathematics is the queen of sciences and number theory is the queen of mathematics, where queen stands for elevated

More information

Number theory lectures

Number theory lectures Number theory lectures By Dr. Mohammed M. AL-Ashker Associated professor Mathematics Department E.mail:mashker @ mail.iugaza.edu Islamic University of Gaza P.O.Box 108, Gaza, Palestine 1 Contents 1 Divisibility

More information

Euler s, Fermat s and Wilson s Theorems

Euler s, Fermat s and Wilson s Theorems Euler s, Fermat s and Wilson s Theorems R. C. Daileda February 17, 2018 1 Euler s Theorem Consider the following example. Example 1. Find the remainder when 3 103 is divided by 14. We begin by computing

More information

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time. 8 Modular Arithmetic We introduce an operator mod. Let d be a positive integer. For c a nonnegative integer, the value c mod d is the remainder when c is divided by d. For example, c mod d = 0 if and only

More information

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology. MATH 501 Discrete Mathematics Lecture 6: Number theory Prof. Dr. Slim Abdennadher, slim.abdennadher@guc.edu.eg German University Cairo, Department of Media Engineering and Technology 1 Number theory Number

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 8 February 1, 2012 CPSC 467b, Lecture 8 1/42 Number Theory Needed for RSA Z n : The integers mod n Modular arithmetic GCD Relatively

More information

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. Math 152, Problem Set 2 solutions (2018-01-24) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1

More information

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

Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby Math 8: Advanced Number Theory Samit Dasgupta and Gary Kirby April, 05 Contents Basics of Number Theory. The Fundamental Theorem of Arithmetic......................... The Euclidean Algorithm and Unique

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

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

Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures

Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures Lance Burger Fresno State Preliminary Edition Contents Preface ix 1 Z The Integers 1 1.1 What are the Integers?......................

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

Lecture Notes. Advanced Discrete Structures COT S

Lecture Notes. Advanced Discrete Structures COT S Lecture Notes Advanced Discrete Structures COT 4115.001 S15 2015-01-13 Recap Divisibility Prime Number Theorem Euclid s Lemma Fundamental Theorem of Arithmetic Euclidean Algorithm Basic Notions - Section

More information

CHAPTER 4: EXPLORING Z

CHAPTER 4: EXPLORING Z CHAPTER 4: EXPLORING Z MATH 378, CSUSM. SPRING 2009. AITKEN 1. Introduction In this chapter we continue the study of the ring Z. We begin with absolute values. The absolute value function Z N is the identity

More information

The Integers. Peter J. Kahn

The Integers. Peter J. Kahn Math 3040: Spring 2009 The Integers Peter J. Kahn Contents 1. The Basic Construction 1 2. Adding integers 6 3. Ordering integers 16 4. Multiplying integers 18 Before we begin the mathematics of this section,

More information

M381 Number Theory 2004 Page 1

M381 Number Theory 2004 Page 1 M81 Number Theory 2004 Page 1 [[ Comments are written like this. Please send me (dave@wildd.freeserve.co.uk) details of any errors you find or suggestions for improvements. ]] Question 1 20 = 2 * 10 +

More information

Number Theory. Zachary Friggstad. Programming Club Meeting

Number Theory. Zachary Friggstad. Programming Club Meeting Number Theory Zachary Friggstad Programming Club Meeting Outline Factoring Sieve Multiplicative Functions Greatest Common Divisors Applications Chinese Remainder Theorem Throughout, problems to try are

More information

Modular Arithmetic Instructor: Marizza Bailey Name:

Modular Arithmetic Instructor: Marizza Bailey Name: Modular Arithmetic Instructor: Marizza Bailey Name: 1. Introduction to Modular Arithmetic If someone asks you what day it is 145 days from now, what would you answer? Would you count 145 days, or find

More information

Notes: Pythagorean Triples

Notes: Pythagorean Triples Math 5330 Spring 2018 Notes: Pythagorean Triples Many people know that 3 2 + 4 2 = 5 2. Less commonly known are 5 2 + 12 2 = 13 2 and 7 2 + 24 2 = 25 2. Such a set of integers is called a Pythagorean Triple.

More information

AN ALGEBRA PRIMER WITH A VIEW TOWARD CURVES OVER FINITE FIELDS

AN ALGEBRA PRIMER WITH A VIEW TOWARD CURVES OVER FINITE FIELDS AN ALGEBRA PRIMER WITH A VIEW TOWARD CURVES OVER FINITE FIELDS The integers are the set 1. Groups, Rings, and Fields: Basic Examples Z := {..., 3, 2, 1, 0, 1, 2, 3,...}, and we can add, subtract, and multiply

More information

4. Number Theory (Part 2)

4. Number Theory (Part 2) 4. Number Theory (Part 2) Terence Sim Mathematics is the queen of the sciences and number theory is the queen of mathematics. Reading Sections 4.8, 5.2 5.4 of Epp. Carl Friedrich Gauss, 1777 1855 4.3.

More information

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya BBM 205 Discrete Mathematics Hacettepe University http://web.cs.hacettepe.edu.tr/ bbm205 Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya Resources: Kenneth Rosen,

More information

MATH 2400 LECTURE NOTES: POLYNOMIAL AND RATIONAL FUNCTIONS. Contents 1. Polynomial Functions 1 2. Rational Functions 6

MATH 2400 LECTURE NOTES: POLYNOMIAL AND RATIONAL FUNCTIONS. Contents 1. Polynomial Functions 1 2. Rational Functions 6 MATH 2400 LECTURE NOTES: POLYNOMIAL AND RATIONAL FUNCTIONS PETE L. CLARK Contents 1. Polynomial Functions 1 2. Rational Functions 6 1. Polynomial Functions Using the basic operations of addition, subtraction,

More information

COMPUTER ARITHMETIC. 13/05/2010 cryptography - math background pp. 1 / 162

COMPUTER ARITHMETIC. 13/05/2010 cryptography - math background pp. 1 / 162 COMPUTER ARITHMETIC 13/05/2010 cryptography - math background pp. 1 / 162 RECALL OF COMPUTER ARITHMETIC computers implement some types of arithmetic for instance, addition, subtratction, multiplication

More information

2. Prime and Maximal Ideals

2. Prime and Maximal Ideals 18 Andreas Gathmann 2. Prime and Maximal Ideals There are two special kinds of ideals that are of particular importance, both algebraically and geometrically: the so-called prime and maximal ideals. Let

More information

Lecture 6: Finite Fields

Lecture 6: Finite Fields CCS Discrete Math I Professor: Padraic Bartlett Lecture 6: Finite Fields Week 6 UCSB 2014 It ain t what they call you, it s what you answer to. W. C. Fields 1 Fields In the next two weeks, we re going

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

Chapter 2. Divisibility. 2.1 Common Divisors

Chapter 2. Divisibility. 2.1 Common Divisors Chapter 2 Divisibility 2.1 Common Divisors Definition 2.1.1. Let a and b be integers. A common divisor of a and b is any integer that divides both a and b. Suppose that a and b are not both zero. By Proposition

More information

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm April 11, 2010 1 Algebra We start by discussing algebraic structures and their properties. This is presented in more depth than what we

More information

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: Byte multiplication 1 Field arithmetic A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: F is an abelian group under addition, meaning - F is closed under

More information

Discrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set

Discrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set Discrete Logarithms Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set Z/mZ = {[0], [1],..., [m 1]} = {0, 1,..., m 1} of residue classes modulo m is called

More information

Math 109 HW 9 Solutions

Math 109 HW 9 Solutions Math 109 HW 9 Solutions Problems IV 18. Solve the linear diophantine equation 6m + 10n + 15p = 1 Solution: Let y = 10n + 15p. Since (10, 15) is 5, we must have that y = 5x for some integer x, and (as we

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

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