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

Size: px
Start display at page:

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

Transcription

1 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, which are associative (a + (b + c) = (a + b) + c, a(bc) = (ab)c for a, b, c Z) and commutative (a + b = b + a, ab = ba). Moreover, these operations interact via the distributive law (a(b + c) = ab + ac) and have neutral elements 0 and 1 respectively (a+0 = a and a 1 = a). Notice also that each integer can be negated (a+( a) = 0). In modern algebra language, a set having the aforementioned properties is called a commutative ring. The two operations in Z are not, however, created equal, for while every integer can be negated (for example, 3 + ( 3) = 0), not every integer can be inverted (there is no integer b such that 3b = 1). Indeed, the only integers whose reciprocals are also integers are 1 and 1. In general, an element a of a commutative ring is called a unit if there is an element b of the ring such that ab = 1. The rational numbers, denoted by Q, are all the ratios of integers: { a } Q = b : a, b Z and b 0 (of course, we consider 4 and 2, for example, to be the same element of 6 3 Q). Like Z, Q is a commutative ring, but in contrast any nonzero element of Q is a unit (if a Q and a 0, then b Q also); commutative b a rings having this additional property are called fields. Another field you are familiar with is the real numbers, denoted by R. Notice that Z Q R. We know how Z sits in R (imagine a number line with the integers marked off); you may have thought less about how Q sits in R. Proposition 1. Between any two real numbers, there is a rational number. Proof. Suppose a, b R with a < b. Let n be a positive integer large enough that 1 < b a. Since the rational numbers n {..., 2/n, 1/n, 0, 1/n, 2/n,... } are spaced 1 apart, at least one of them lies between a and b. n Because of Proposition 1, we say that Q is dense in R. However, not every real number is rational; a real number which is not rational is called irrational.

2 Proposition 2. e is irrational. Proof. Suppose that e were rational. Then e = a/b for some positive integers a and b. It follows that the number α defined by ( α = b! e 1 1 1! 1 2! 1 3! 1 ) b! is an integer (imagine multiplying the b! through). Moreover, since e is defined by 1 e = n!, n=0 we also have that α is positive. Next note that the definition of e, along with the formula for the sum of a convergent geometric series, implies that ( ) 1 α = b! (b + 1)! + 1 (b + 2)! + = 1 b (b + 1)(b + 2) + < 1 b (b + 1) 2 + = 1 b b+1 = 1 b 1. We conclude that α < 1, which is a contradiction since α is a positive integer. Note that e is an infinite sum of positive rational numbers - as such, it is the limit of an increasing sequence of rational numbers (namely, the sequence of partial sums) - yet e itself is not rational. The set of real numbers R has the remarkable property that every increasing sequence of rational numbers is either unbounded or converges to an element of R. In fact, R is the smallest such field, in the sense that any other field which contains Q and has this property also contains R as a subfield. We will see more irrational numbers later; in fact, it turns out that the irrationals are much more numerous than the rationals. Another field that you may have worked with is the field of complex numbers C: C = {a + bi a, b R}, where i 2 = 1. Many of the commutative rings that we study in these notes (for example, Z, Q and R) are contained in C.

3 DIVISIBILITY Let us first focus on the multiplicative structure of Z. We begin by discussing how integers break down into simpler multiplicative parts. Definition 3. If a, b Z, we say that b divides a, and write b a, if there is an integer c such that a = bc. Synonyms for b divides a that you may be familiar with are b is a divisor of a, b is a factor of a, a is a multiple of b and a is divisible by b. If b is not a divisor of a, we write b a. Example , 7 16 Example 5. The positive divisors of 30 are 1, 2, 3, 5, 6, 10, 15 and 30. Notice that any integer a is a divisor of 0 (0 = a 0) and is divisible by 1 (a = 1 a). A direct consequence of the former statement is the following surprisingly useful result. Corollary 6. If a is an integer and there is a positive integer b such that b a, then a 0. We have thus far only discussed divisibility in Z. The analogous notion of divisibility in Q is trivial in the following sense: if r is a nonzero rational number, then r divides every rational number (this follows from the fact that we can invert any nonzero element of Q). In fact, the same is true in every field; for this reason, when we discuss divisibility we will mean it in the context of the integers unless otherwise stated. Proposition 7. Let a, b, c Z. (1) If a b and b c, then a c. (2) If a b and a c, then for any integers x and y, a (xb + yc). Proof. (1) Since a b and b c, there are integers m and n such that b = am and c = bn. Then c = (am)n = a(mn). Since mn is an integer, it follows that a c. (2) Since a b and a c, there are integers m and n such that b = am and c = an. Then and so a (xb + yc). xb + yc = x(am) + y(an) = a(xm + yn),

4 THE PRIMES Notice that every integer n > 1 has at least two positive divisors, namely 1 and n (these are sometimes called the trivial divisors of n). If d n and 1 < d < n, d is called a proper divisor of n. Definition 8. An integer p > 1 is called prime if its only positive divisors are 1 and p (i.e., if it has no proper divisors). An integer n > 1 that is not prime is called composite. Example 9. The first five primes are 2, 3, 5, 7 and 11. Primes can therefore be thought of as multiplicatively the simplest positive integers. We now establish their central place in multiplicative number theory. Proposition 10. If an integer n > 1 is composite, then the smallest proper divisor of n is prime. Proof. Let d be the smallest proper divisor of n. If d had a proper divisor m, then m would be a divisor of n by Proposition 7 (1), and since 1 < m < d < n, m would be a proper divisor of n. Since m < d, this contradicts that d is the smallest proper divisor of n. Therefore d has no proper divisors, i.e., d is prime. Theorem 11. Every integer n > 1 is a product of primes. Proof. By induction. Since 2 is prime, it is the product of a single prime, so the statement holds for n = 2. Now suppose it holds for all the integers from 2 up to n. If n + 1 is prime, the statement holds for n + 1. If n + 1 is composite, then by Proposition 10 it has a proper prime divisor p. Write n + 1 = pm. Since 1 < p < n + 1, it follows that 1 < m < n + 1, i.e. 2 m n. By the induction hypothesis m is a product of primes, and therefore so is pm = n + 1. Example = 2 42 = = We see that the primes are the multiplicative building blocks of Z, and therefore it is natural to study them as a distinguished set. One natural question to ask is how many primes are there? Theorem 13. (Euclid) There are infinitely many primes. Proof. Let S be any nonempty finite set of primes. Consider the integer n = 1 + p S p.

5 If n is prime, then since n is larger than any element of S, we have that n / S. If n is composite, then by Proposition 10 it has a prime divisor q. Notice that q / S, for if q were an element of S, then it would divide p S p = n 1, and then by Proposition 7 (2) it would divide 1 n + ( 1) (n 1) = 1, a contradiction. We see that in all cases, there is a prime that lies outside S. It follows that no finite set of primes contains every prime, and thus the set of primes is infinite. Let us now consider the problem of identifying the primes among the positive integers. Suppose we start from the very definition of a prime: an integer p > 1 with no proper divisor. We can immediately see a way to determine whether an integer n > 1 is prime: search for proper divisors of n. If we find one then n is composite, and if we do not then n is prime. Since a proper divisor d of n satisfies 1 < d < n, we know that this algorithm will involve no more than n 2 steps. Now that we have an algorithm, let us consider how to make it more efficient. First of all, note the obvious fact that the algorithm need not involve n 2 steps for every n; indeed, if we find a proper divisor of n we may stop immediately and conclude that n is not prime. In general, then, the efficiency of our algorithm will depend partly upon our testing the integers that are most likely to be divisors of n first. Since one half of the positive integers are divisible by 2, one third of the positive integers are divisible by 3 and so on, it therefore makes sense to test the integers in increasing order. Next note that if n is composite and we search in this way, we will automatically find the smallest proper divisor d of n first. Recall that d is prime by Proposition 10; it also has the following important property. Proposition 14. If n is composite and d is the smallest proper divisor of n, then d n. Proof. Consider the alternative. Combining Propositions 10 and 14 and our discussion above, we obtain the following primality test. Algorithm 15. (for determining whether n > 1 is prime) Search for divisors of n among the primes n, in increasing order beginning with 2. If a divisor is found, we conclude that n is composite and stop the search. If a divisor is not found, we conclude that n is prime. Example is prime since 113 = and 113 is not divisible by 2, 3, 5 or 7.

6 Not a bad test; we don t need to check all the integers from 2 up to n 1 for divisors, only the primes up to n. However, there is something about our primality test that may bother you: to use it to test the primality of n, we need to have a list of the primes n. How does one find such a list? It turns out that we have an efficient way to do so for values of n that are not too large, and for this we may thank the ancient Greek Eratosthenes. Algorithm 17. (Sieve of Eratosthenes, for finding the primes m) List the integers from 2 up to m, then apply the following iterative procedure to this list. The integers not eliminated in this process are the primes m. (1) Determine the smallest integer p in the list that is not circled. (2) If p > m, stop. If p m, circle it and eliminate all other multiples of p from the list, then go back to step (1). Proof that Algorithm 17 works. First, it is clear that in the algorithm only composite numbers are eliminated. Let us now show that the circled numbers are primes. We do this by induction. If there is a circled integer, then clearly 2 is the smallest such, and it is prime. Now suppose that the first k circled integers are primes. The sieve eliminated all of the multiples of these k primes (except themselves); hence the (k+1)st circled integer (if it exists) is not divisible by any of the primes that are smaller than it, and is therefore prime by Proposition 10. Finally, what about the remaining uncircled numbers? They remain because they are not multiples of any of the circled numbers, which as we have seen are the primes m; by Propositions 10 and 14, then, the remaining uncircled numbers are also prime.

7 COMMON DIVISORS Consider the following problem: we wish to tile a rectangular floor that is 12 feet by 18 feet. For ease of cutting we wish to use tiles that are square, of uniform size, and have integral side length s (in feet). As we would like to minimize the amount of cutting, we wish to minimize the number of tiles used. How shall we do this? Since we are using tiles of uniform size, it is clear that this is equivalent to finding the largest usable tile. If we use a rows and b columns of tiles, we have the following relationships: sa = 18 and sb = 12. These imply that s is a divisor of both 18 and 12, so the maximal s is the largest integer that is a divisor of both 18 and 12, namely 6. Definition 18. If a, b and d are integers, we say that d is a common divisor of a and b if d a and d b. If a and b are not both zero, the greatest common divisor (gcd) of a and b is denoted by (a, b). Example 19. The set of positive divisors of 20 is {1, 2, 4, 5, 10, 20} and the set of positive divisors of 35 is {1, 5, 7, 35}. The set of positive common divisors of 20 and 35 is {1, 5}, and so (20, 35) = 5. Example 20. If r is a positive integer, then (r, 0) = r since r is the greatest divisor of r and every integer is a divisor of zero. Computing the gcd of two positive integers can always be done in a straightforward way: find the positive divisors of each, then identify the largest integer that appears in both lists. For large numbers, however, this procedure can become quite unwieldy - for example, 2310 has 32 positive divisors and 1092 has 24. We might hope for a quicker way to find (2310, 1092), and indeed, Euclid discovered a method for finding (a, b) which has not been significantly improved to this date. The basis of this method is the following familiar fact. Algorithm 21. (Division Algorithm) Let a and b be integers with a > 0. Then there exist unique integers q and r such that and 0 r < a. b = qa + r Proof. Let q = b/a (recall that if t R, t denotes the largest integer that is less than or equal to t). Since (b/a) 1 < b/a b/a,

8 it follows that b a < qa b, and hence b b b qa < b (b a), i.e. 0 b qa < a. Letting r = b qa, we have established existence. For uniqueness, suppose b = q 1 a + r 1 = q 2 a + r 2 with 0 r 1, r 2 < a. Without loss we may assume that r 1 r 2. The equality of our two expressions for b yields a(q 1 q 2 ) = r 2 r 1, which implies that a (r 2 r 1 ). Since 0 r 2 r 1 < a, it follows that r 2 r 1 = 0. Then our last displayed equation gives a(q 1 q 2 ) = 0, and since a 0, it must be that q 1 q 2 = 0. Example 22. If we divide a = 7 into b = 38, we get a quotient of q = 5 and a remainder of r = 3. Euclid s algorithm combines the Division Algorithm and the following result. Proposition 23. Let a, b and r be as in the Division Algorithm. Then (a, b) = (a, r). Proof. By definition (a, b) divides a and b. Since r = 1 b + ( q) a, Proposition 7 (2) tells us that (a, b) divides r. Hence (a, b) is a common divisor of a and r, and thus (a, b) (a, r). On the other hand, (a, r) divides a and r, and since b = q a+1 r, (a, r) divides b by Proposition 7 (2). Hence (a, r) is a common divisor of a and b, and therefore (a, r) (a, b). We conclude that (a, b) = (a, r). Algorithm 24. (Euclidean Algorithm) Let a and b be positive integers with a < b. By the Division Algorithm we have b = q 1 a + r 1 with 0 r 1 < a. If r 1 0, we find by the Division Algorithm a = q 2 r 1 + r 2 with 0 r 2 < r 1. For i 2, if r i 0 the Division Algorithm gives r i 1 = q i+1 r i + r i+1 with 0 r i+1 < r i. Since the r i form a decreasing sequence of nonnegative integers, it must be that r k = 0 for some k 1. If k = 1 Proposition 23 yields (a, b) = (a, r 1 ) = (a, 0) = a,

9 while if k > 1 it yields (a, b) = (a, r 1 ) = (r 1, r 2 ) = = (r k 1, r k ) = (r k 1, 0) = r k 1. Example 25. (1092, 2310) = (1092, 126) = (126, 84) = (84, 42) = (42, 0) = 42 Notice that the Euclidean Algorithm allows us to find the gcd of two integers without first finding any divisors of either one. Moreover, as a byproduct of the algorithm we can write (a, b) as a linear combination of a and b. Proposition 26. If a and b are positive integers, then there exist integers m and n such that (a, b) = ma + nb. Example 27. Referring to Example 25, the division that produced the gcd of 42 as remainder tells us that 42 = , while the preceding divisions gave us Then 84 = and 126 = = 126 ( ) = = 9( ) 1092 = Proposition 28. Given positive integers a and b, let S = {xa + yb x, y Z} and T = {(a, b)c c Z}. Then S = T, i.e., the set of linear combinations of a and b is equal to the set of multiples of (a, b). Proof. Let s S. Then s = xa + yb for some x, y Z. Since (a, b) is a divisor of a and b, s is divisible by (a, b) by Proposition 7 (2), and thus s T. Now let t T. Then t = (a, b)c for some c Z. By Proposition 26 there exist m, n Z such that (a, b) = ma + nb. Hence and thus t S. t = (a, b)c = (ma + nb)c = (mc)a + (nc)b,

10 UNIQUE FACTORIZATION We proved earlier (Theorem 11) that every integer n > 1 can be written as a product of primes. Our aim now is to show that this expression is unique - that is, one always obtains the same prime factors no matter what path one takes to a prime factorization of a number. For example, 90 = 3 30 = = and 90 = 5 18 = = We require one preliminary result. Proposition 29. Let a, b Z. If p is prime and p ab, then p a or p b. Proof. Since p ab, ab = pq for some q Z. Suppose p a. Then (a, p) = 1, so by Proposition 26 we can find integers m and n such that ma + np = 1. Then b = b 1 = b(ma + np) = (ab)m + bnp = (pq)m + bnp = p(qm + bn), and therefore p b. Theorem 30. The prime factorization of an integer n > 1 is unique up to ordering of the prime factors. Proof. Suppose n = p 1 p 2 p k = q 1 q 2 q l with p 1,..., p k and q 1,..., q l prime. We may assume without loss of generality that k l. Then p 1 q 1 (q 2 q l ) (note that the product q 2 q l could be empty, and thus equal to 1), so by Proposition 29, p 1 q 1 (in which case p 1 = q 1 ) or p 1 q 2 q l. Assuming the latter holds, it must be that l 2, and by the same argument as above we then conclude that p 1 = q 2, or l 3 and p 1 q 3 q l. By exhaustion we find that p 1 = q i for some 1 i l. Canceling these, we obtain l p 2 p k = j=1, j i If k 2, we may repeat our argument to show that p 2 = q j for some j i; canceling these and continuing in this fashion we eventually eliminate all the ps, leaving the left hand product as 1. It follows that at this point all of the qs must have been canceled as well (else the product of the remaining qs would be > 1). Thus the two factorizations are the same up to ordering of the prime factors. q j

11 Definition 31. If m is a positive integer and p is a prime, define v p (m) to be the highest power of p that divides m (this is a well-defined notion by Theorem 30). Notice that m = p prime p vp(m), and that v p (m) = 0 for all but finitely many primes p. We worked hard to prove the uniqueness of prime factorizations, a result that is probably quite familiar to you. In fact, it may be so familiar as to seem trivial. Is it? The answer to this question is no, in the following sense: there are number systems very similar to the integers in which factorization into primes is not unique. Example 32. Consider the commutative ring Z[ 6] = {a + b 6 : a, b Z} (note that this is a subset of C since we may set 6 = 6i). In this number system 2 and 5 are primes in the sense that they have no nontrivial divisors (for example, the only divisors of 2 are ±1 and ±2), and so are and 2 6. The fact that 2 5 = 10 = (2 + 6)(2 6) shows that we do not have unique factorization in Z[ 6]. Thinking back to our proof of Theorem 30, if we tried to use the same argument to prove that Z[ 6] has unique factorization, the part that would fail is the one involving Proposition 29. The analog of this result does not hold in Z[ 6], as our example shows - note that despite the fact that 2 has no nontrivial divisors in Z[ 6] and is a divisor of the product (2 6)(2+ 6), it is clearly not a divisor of either factor. Unique factorization allows us to prove the irrationality of many real numbers. Proposition is an irrational number. Proof. Suppose 7 were rational. Then 7 = a b for some integers a and b. It follows that a 2 = 7b 2, and so v 7 (a 2 ) = v 7 (7b 2 ). Since v 7 (a 2 ) = 2v 7 (a) is even and v 7 (7b 2 ) = 1 + 2v 7 (b) is odd, we have a contradiction.

12 The proof of the preceding proposition generalizes easily to yield the following result. Theorem 34. Suppose b and m are positive integers with m > 1. If b is not the mth power of an integer, then the positive real mth root of b is irrational. Example /3 and 27 are irrational.

13 CONGRUENCES We develop here the language of congruences, which is extremely useful when discussing number theoretic questions. Definition 36. Let a, b and m be integers with m > 0. We say that a is congruent to b modulo m if m (a b), and in this case we write a b (mod m). Example (mod 5) since 23 8 = 15 and 15 = (mod 8) since 53 ( 3) = 56 and 56 = (mod 7) since 7 28 Note that the integers congruent to 0 modulo m are those that are multiples of m. More generally, suppose a is a positive integer and we get a remainder of r upon dividing m into a (i.e., a = qm + r in the notation of the Division Algorithm). Then since a r = qm, we have that m a r, and thus a r (mod m). For example, since dividing 497 by 5 gives a remainder of 2, (mod 5). Example 38. The integers that are congruent to 0 modulo 3 are those congruent to 1 modulo 3 are {..., 6, 3, 0, 3, 6,... }, {..., 5, 2, 1, 4, 7,... }, and those congruent to 2 modulo 3 are {..., 4, 1, 2, 5, 8,... }. The sets shown above are sometimes called the congruence classes (or residue classes) modulo 3; note that every integer is congruent to 0, 1 or 2 modulo 3. In general, modulo m every integer is congruent to exactly one element of the set {0, 1, 2,..., m 1} (as per our discussion above, this is a consequence of the Division Algorithm since these are the possible remainders on dividing by m). We often choose these m numbers, which are called the least residues, as representatives of the congruence classes modulo m (of course, we could also choose other sets, such as {1, 2,..., m}). When we work modulo m we consider integers a and b to be the same if a b (mod m), and as a result we end up dealing with a finite set. For example, with hours in standard time we work modulo 12 and use the representatives {1, 2, 3,..., 12}, while with minutes we work modulo 60 and use the representatives {0, 1, 2,..., 59}. We now show that one can perform arithmetic modulo m, and that this is consistent with the usual arithmetic in Z.

14 Proposition 39. Suppose a, b, c, d and m are integers with m > 0. If a c (mod m) and b d (mod m), then a + b c + d (mod m) and ab cd (mod m). Proof. Since a c (mod m) and b d (mod m), we know that m (a c) and m (b d). Then by Proposition 7 (2), m is a divisor of 1 (a c) + 1 (b d) = (a + b) (c + d), and so a + b c + d (mod m). Moreover, Proposition 7 (2) also tells us that m is a divisor of and therefore ab cd (mod m). b (a c) + c (b d) = ab cd, Proposition 39 implies that the congruence classes modulo m form a commutative ring under the addition and multiplication induced from Z. This ring is denoted Z/mZ. Example 40. Suppose we wish to know what the least residue of is modulo 10. One way to do this is to multiply these numbers together and find the least residue of the result. Another way is to find the least residues of the factors first, then use Proposition 39: (mod 10) and (mod 10), so (mod 10). Example 41. Suppose we wish to calculate the least residue of modulo 7. Rather than actually computing (which has hundreds of digits), we can simply note that and then by Proposition 39, 4 3 = 64 1 (mod 7), = = (4 3 ) (mod 7). We see that modular arithmetic is often easier than the usual arithmetic in Z since there are only m congruence classes modulo m and we may choose a small representative of each class (for example, one lying in {0, 1,..., m 1}). Another way that modular arithmetic differs is that while there are only two units in Z (namely 1 and 1), there can be many more units in Z/mZ. For example, there is no

15 integer a such that 5a = 1, but modulo 7 we have that 5 3 = 15 1 (mod 7). Proposition 42. Let a and m be integers with m > 0. There exists an integer b such that ab 1 (mod m) if and only if (a, m) = 1. Proof. Suppose that (a, m) = 1. By Proposition 26 there exist integers b and n such that ab + mn = 1. Then ab = 1 mn 1 0 n 1 (mod m). Now suppose there exists an integer b such that ab 1 (mod m). Then m ab 1, so ab 1 = km for some integer k. Since (a, m) is a common divisor of a and m, by Proposition 7 (2), (a, m) is a divisor of Thus (a, m) = 1. b a + ( k) m = 1. Corollary 43. If ax ay (mod m) and (a, m) = 1, then x y (mod m). Proof. Since (a, m) = 1, by Proposition 42 there is an integer b such that ab 1 (mod m). Then x = 1 x (ab)x b(ax) b(ay) (ab)y 1 y y (mod m). Thus we may cancel a common factor a from a congruence modulo m if (a, m) = 1. Notice that we may NOT necessarily cancel if (a, m) > 1; for example, (mod 15) even though 8 3 (mod 15). Definition 44. If a and m are integers, we say that a and m are coprime, or relatively prime, if (a, m) = 1. We have seen that there are exactly m distinct congruence classes modulo m. Let us now study the commutative ring Z/mZ further. Definition 45. For m > 1, let U(m) = {0 a m 1 : (a, m) = 1}. The Euler phi function φ is defined by φ(m) = #U(m). Example 46. U(6) = {1, 5}, U(11) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} and U(12) = {1, 5, 7, 11}, so φ(6) = 2, φ(11) = 10 and φ(12) = 4. Proposition 47. If p is prime, then φ(p) = p 1.

16 Proof. Since the only positive divisors of p are 1 and p, { 1 if p a, (a, p) = p if p a. Thus U(p) = {1, 2,..., p 1}. We will now focus on the structure of the units in Z/mZ. We begin by proving two preliminary propositions. Proposition 48. Let a, b and m be integers with m > 0. If a b (mod m), then (a, m) = (b, m). Proof. Since a b (mod m), a b = km for some integer k. By definition (b, m) divides b and m, so by Proposition 7 (2), (b, m) divides b+km = a. Hence (b, m) is a common divisor of m and a, and therefore (b, m) (a, m). On the other hand, (a, m) is a divisor of a and m, and so Proposition 7 (2) tells us that (a, m) divides a km = b. Since (a, m) is a common divisor of m and b, it follows that (a, m) (b, m). Notice that by Propositions 42 and 48, the elements of U(m) are representatives for the units in Z/mZ. Proposition 49. Let a, b and c be positive integers. (1) If (a, b) = (a, c) = 1, then (a, bc) = 1. (2) If a c, b c and (a, b) = 1, then ab c. (3) If a bc and (a, b) = 1, then a c. Proof. (1) By contrapositive. Suppose (a, bc) = d > 1. Then d has a prime divisor p by Theorem 11. Since p d and d a and d bc, we have that p a and p bc by Proposition 7 (1). The latter yields that p b or p c by Proposition 29, and combining this with p a we conclude that (a, b) p > 1 or (a, c) p > 1. (2) Since a c, c = ka for some integer k. Moreover, by Proposition 26 there exist integers m and n such that ma + nb = 1. Then k = k 1 = k(ma + nb) = (ka)m + knb = cm + knb. Clearly b b, and since b c, it follows by Proposition 7 (2) that b k. Then k = bl for some integer l, which yields c = ka = (bl)a = l(ab). (3) Since a bc and (a, b) = 1, there exist integers k, m and n such that bc = ak and ma + nb = 1. Then c = c(ma + nb) = cma + nbc = cma + nak = a(cm + nk).

17 Proposition 50. If a and m are integers with m > 1 and (a, m) = 1, then there is a positive integer s φ(m) such that a s 1 (mod m). Proof. Consider the integers a, a 2, a 3,..., a φ(m)+1. Since (a, m) = 1, (a n, m) = 1 for any n 1 by Proposition 49 (1). Hence the list above consists of φ(m) + 1 integers, each coprime to m. By Proposition 48 the least residues of these are in the set U(m), and since U(m) has φ(m) elements, these powers of a cannot all be distinct modulo m. So a j a i (mod m) for some 1 i < j φ(m) + 1. By Corollary 43, then, a j i 1 (mod m). Definition 51. If a and m are coprime integers with m > 1, we call the smallest positive integer t such that a t 1 (mod m) the order of a modulo m. Example 52. The order of 3 modulo 11 is 5 since (mod 11), (mod 11), (mod 11), (mod 11), (mod 11). Proposition 53. Suppose a and m are integers with m > 1 and (a, m) = 1. If s is a positive integer such that a s 1 (mod m), then the order of a modulo m divides s. Proof. Denote by t the order of a modulo m. By the Division Algorithm we obtain s = qt + r with 0 r < t. Then 1 a s a qt+r (a t ) q a r 1 q a r a r (mod m). Since r < t, by the definition of order we conclude that r = 0, and therefore t s. Theorem 54. (Fermat) If m > 1 and (a, m) = 1, then a φ(m) 1 (mod m). Proof. Consider the set of φ(m) congruence classes modulo m represented by the elements of U(m). By Corollary 43 the φ(m) integers {an n U(m)} also represent φ(m) distinct congruence classes modulo m, and since (an, m) = 1 for n U(m) by Proposition 49 (1), it follows that they

18 represent the same congruence classes as the elements of U(m). Therefore n an a φ(m) n (mod m), n U(m) n U(m) n U(m) and upon canceling the common factors (via Corollary 43) we find that a φ(m) 1 (mod m). Corollary 55. If m > 1 and (a, m) = 1, then the order of a modulo m divides φ(m). Example 56. Suppose we want to know the order of 5 modulo 257. Since 5 and 257 are prime and 5 257, we know that this order exists and is a divisor of φ(257) = 256 = 2 8. Since the positive divisors of 2 8 are 1, 2, 2 2,..., 2 8, to find the order of 5 we need only compute (mod 257), 5 4 = (5 2 ) 2 = (mod 257), (mod 257), (mod 257), (mod 257), (mod 257), (mod 257), from which we conclude that 5 has order 256 modulo 257. Corollary 57. If p is prime and p a, then a p 1 1 (mod p). Corollary 58. If p is prime and a is any integer, then a p a (mod p). We end this section by considering the question of simultaneous congruences. Theorem 59. (Chinese Remainder Theorem) Suppose m 1, m 2,..., m r are positive integers such that (m i, m j ) = 1 if i j. Let a 1, a 2,..., a r be any integers, and write m = m 1 m 2 m r. Then there exists an integer x such that x a i (mod m i ) for every 1 i r. Moreover, for any integer y satisfying these congruences, y x (mod m). Proof. For each 1 j r, m/m j is an integer, and by Proposition 49 (1), (m/m j, m j ) = 1. Then by Proposition 42 there is an integer b j such that (m/m j )b j 1 (mod m j ). Let r x = (m/m j )b j a j. j=1

19 Since m/m j is divisible by m i if i j, we have that (m/m j )b j a j 0 b j a j 0 (mod m i ). It follows that for every 1 i r, x (m/m i )b i a i + j i (m/m j )b j a j 1 a i + j i 0 a i (mod m i ). Finally, if y is any solution of the stated congruences, then y x (mod m j ), and hence m j (y x), for all 1 j r. By Proposition 49 (1) and (2) it follows that m (y x), and thus y x (mod m).

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 oerations defined on them, addition and multilication,

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

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

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

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

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

7.2 Applications of Euler s and Fermat s Theorem.

7.2 Applications of Euler s and Fermat s Theorem. 7.2 Applications of Euler s and Fermat s Theorem. i) Finding and using inverses. From Fermat s Little Theorem we see that if p is prime and p a then a p 1 1 mod p, or equivalently a p 2 a 1 mod p. This

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

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

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

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

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

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

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

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

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

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

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

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

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

Notes on Systems of Linear Congruences

Notes on Systems of Linear Congruences MATH 324 Summer 2012 Elementary Number Theory Notes on Systems of Linear Congruences In this note we will discuss systems of linear congruences where the moduli are all different. Definition. Given the

More information

7. Prime Numbers Part VI of PJE

7. Prime Numbers Part VI of PJE 7. Prime Numbers Part VI of PJE 7.1 Definition (p.277) A positive integer n is prime when n > 1 and the only divisors are ±1 and +n. That is D (n) = { n 1 1 n}. Otherwise n > 1 is said to be composite.

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

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

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

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

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

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

Divisibility = 16, = 9, = 2, = 5. (Negative!)

Divisibility = 16, = 9, = 2, = 5. (Negative!) Divisibility 1-17-2018 You probably know that division can be defined in terms of multiplication. If m and n are integers, m divides n if n = mk for some integer k. In this section, I ll look at properties

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

Chapter 5. Modular arithmetic. 5.1 The modular ring

Chapter 5. Modular arithmetic. 5.1 The modular ring Chapter 5 Modular arithmetic 5.1 The modular ring Definition 5.1. Suppose n N and x, y Z. Then we say that x, y are equivalent modulo n, and we write x y mod n if n x y. It is evident that equivalence

More information

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9.1 Chapter 9 Objectives

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

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

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

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

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

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

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

The Fundamental Theorem of Arithmetic

The Fundamental Theorem of Arithmetic Chapter 1 The Fundamental Theorem of Arithmetic 1.1 Primes Definition 1.1. We say that p N is prime if it has just two factors in N, 1 and p itself. Number theory might be described as the study of the

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

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

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

32 Divisibility Theory in Integral Domains

32 Divisibility Theory in Integral Domains 3 Divisibility Theory in Integral Domains As we have already mentioned, the ring of integers is the prototype of integral domains. There is a divisibility relation on * : an integer b is said to be divisible

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

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

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

Number Theory and Group Theoryfor Public-Key Cryptography

Number Theory and Group Theoryfor Public-Key Cryptography Number Theory and Group Theory for Public-Key Cryptography TDA352, DIT250 Wissam Aoudi Chalmers University of Technology November 21, 2017 Wissam Aoudi Number Theory and Group Theoryfor Public-Key Cryptography

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

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

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

= 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

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

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

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

RMT 2013 Power Round Solutions February 2, 2013

RMT 2013 Power Round Solutions February 2, 2013 RMT 013 Power Round Solutions February, 013 1. (a) (i) {0, 5, 7, 10, 11, 1, 14} {n N 0 : n 15}. (ii) Yes, 5, 7, 11, 16 can be generated by a set of fewer than 4 elements. Specifically, it is generated

More information

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

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

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

(e) Commutativity: a b = b a. (f) Distributivity of times over plus: a (b + c) = a b + a c and (b + c) a = b a + c a.

(e) Commutativity: a b = b a. (f) Distributivity of times over plus: a (b + c) = a b + a c and (b + c) a = b a + c a. Math 299 Midterm 2 Review Nov 4, 2013 Midterm Exam 2: Thu Nov 7, in Recitation class 5:00 6:20pm, Wells A-201. Topics 1. Methods of proof (can be combined) (a) Direct proof (b) Proof by cases (c) Proof

More information

FERMAT S TEST KEITH CONRAD

FERMAT S TEST KEITH CONRAD FERMAT S TEST KEITH CONRAD 1. Introduction Fermat s little theorem says for prime p that a p 1 1 mod p for all a 0 mod p. A naive extension of this to a composite modulus n 2 would be: for all a 0 mod

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

SMT 2013 Power Round Solutions February 2, 2013

SMT 2013 Power Round Solutions February 2, 2013 Introduction This Power Round is an exploration of numerical semigroups, mathematical structures which appear very naturally out of answers to simple questions. For example, suppose McDonald s sells Chicken

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

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

Some Facts from Number Theory

Some Facts from Number Theory Computer Science 52 Some Facts from Number Theory Fall Semester, 2014 These notes are adapted from a document that was prepared for a different course several years ago. They may be helpful as a summary

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

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

Algebra for error control codes

Algebra for error control codes Algebra for error control codes EE 387, Notes 5, Handout #7 EE 387 concentrates on block codes that are linear: Codewords components are linear combinations of message symbols. g 11 g 12 g 1n g 21 g 22

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

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

. 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

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

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

MATH 2200 Final Review

MATH 2200 Final Review MATH 00 Final Review Thomas Goller December 7, 01 1 Exam Format The final exam will consist of 8-10 proofs It will take place on Tuesday, December 11, from 10:30 AM - 1:30 PM, in the usual room Topics

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

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

NOTES ON INTEGERS. 1. Integers

NOTES ON INTEGERS. 1. Integers NOTES ON INTEGERS STEVEN DALE CUTKOSKY The integers 1. Integers Z = {, 3, 2, 1, 0, 1, 2, 3, } have addition and multiplication which satisfy familar rules. They are ordered (m < n if m is less than n).

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

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 Number Theory and Cryptography

4 Number Theory and Cryptography 4 Number Theory and Cryptography 4.1 Divisibility and Modular Arithmetic This section introduces the basics of number theory number theory is the part of mathematics involving integers and their properties.

More information

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions MATH 11/CSCI 11, Discrete Structures I Winter 007 Toby Kenney Homework Sheet 5 Hints & Model Solutions Sheet 4 5 Define the repeat of a positive integer as the number obtained by writing it twice in a

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

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

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

Four Basic Sets. Divisors

Four Basic Sets. Divisors Four Basic Sets Z = the integers Q = the rationals R = the real numbers C = the complex numbers Divisors Definition. Suppose a 0 and b = ax, where a, b, and x are integers. Then we say a divides b (or

More information

Review Sheet for the Final Exam of MATH Fall 2009

Review Sheet for the Final Exam of MATH Fall 2009 Review Sheet for the Final Exam of MATH 1600 - Fall 2009 All of Chapter 1. 1. Sets and Proofs Elements and subsets of a set. The notion of implication and the way you can use it to build a proof. Logical

More information

Solution Sheet (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = (i) gcd (97, 157) = 1 = ,

Solution Sheet (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = (i) gcd (97, 157) = 1 = , Solution Sheet 2 1. (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = 3. 2. (i) gcd (97, 157) = 1 = 34 97 21 157, (ii) gcd (527, 697) = 17 = 4 527 3 697, (iii) gcd (2323, 1679) =

More information

Part I, Number Systems. CS131 Mathematics for Computer Scientists II Note 1 INTEGERS

Part I, Number Systems. CS131 Mathematics for Computer Scientists II Note 1 INTEGERS CS131 Part I, Number Systems CS131 Mathematics for Computer Scientists II Note 1 INTEGERS The set of all integers will be denoted by Z. So Z = {..., 2, 1, 0, 1, 2,...}. The decimal number system uses the

More information

Applied Cryptography and Computer Security CSE 664 Spring 2017

Applied Cryptography and Computer Security CSE 664 Spring 2017 Applied Cryptography and Computer Security Lecture 11: Introduction to Number Theory Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline What we ve covered so far: symmetric

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

Factoring Algorithms Pollard s p 1 Method. This method discovers a prime factor p of an integer n whenever p 1 has only small prime factors.

Factoring Algorithms Pollard s p 1 Method. This method discovers a prime factor p of an integer n whenever p 1 has only small prime factors. Factoring Algorithms Pollard s p 1 Method This method discovers a prime factor p of an integer n whenever p 1 has only small prime factors. Input: n (to factor) and a limit B Output: a proper factor of

More information

a = qb + r where 0 r < b. Proof. We first prove this result under the additional assumption that b > 0 is a natural number. Let

a = qb + r where 0 r < b. Proof. We first prove this result under the additional assumption that b > 0 is a natural number. Let 2. Induction and the division algorithm The main method to prove results about the natural numbers is to use induction. We recall some of the details and at the same time present the material in a different

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

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

An Introduction to Proof-based Mathematics Harvard/MIT ESP: Summer HSSP Isabel Vogt

An Introduction to Proof-based Mathematics Harvard/MIT ESP: Summer HSSP Isabel Vogt An Introduction to Proof-based Mathematics Harvard/MIT ESP: Summer HSSP Isabel Vogt Class Objectives Field Axioms Finite Fields Field Extensions Class 5: Fields and Field Extensions 1 1. Axioms for a field

More information

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006 Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 2.4 2.6 of Rosen Introduction I When talking

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