Chapter 3 Basic Number Theory

Size: px
Start display at page:

Download "Chapter 3 Basic Number Theory"

Transcription

1 Chapter 3 Basic Number Theory

2 What is Number Theory? Well...

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

4 What is Number Theory? Well... Number Theory The study of the natural numbers (Z + ), especially the relationship between different sorts of numbers. Divisibility Suppose n, m Z, m 0, we say m divides n if n is a multiple of m. That is, k Z n = mk. If m divides n, we write m n. If not, m n.

5 Greatest Common Factors Basic Examples gcd(12,20)=

6 Greatest Common Factors Basic Examples gcd(12,20)= 4 gcd(18,30)=

7 Greatest Common Factors Basic Examples gcd(12,20)= 4 gcd(18,30)= 6 gcd(225,120)=

8 Greatest Common Factors Basic Examples gcd(12,20)= 4 gcd(18,30)= 6 gcd(225,120)= 15

9 Greatest Common Factors Basic Examples gcd(12,20)= 4 gcd(18,30)= 6 gcd(225,120)= 15 For the last one, we cant just look at it and know the answer - we need some technique, and prime factorization works here. 120 = , 225 = This is not practical for large numbers.

10 The Euclidean Algorithm Example Find (132, 36)

11 The Euclidean Algorithm Example Find (132, 36) 132 =

12 The Euclidean Algorithm Example Find (132, 36) 132 = =

13 The Euclidean Algorithm Example Find (132, 36) 132 = = =

14 The Euclidean Algorithm Example Find (132, 36) 132 = = = So, (132, 36) = 12.

15 Another Example Example Find ( , )

16 Another Example Example Find ( , ) The answer we seek is 1078.

17 Another Example Example Find ( , ) The answer we seek is Can you generalize this? (a, b) =

18 Another Example Example Find ( , ) The answer we seek is Can you generalize this? (a, b) = (b, r)

19 The Division Algorithm Before we analyze, where does this equation come from? The division algorithm, which states

20 The Division Algorithm Before we analyze, where does this equation come from? The division algorithm, which states The Division Algorithm a = bq + r, 0 r < b There are two parts to this proof, the existence of q and r, and uniqueness.

21 The Division Algorithm Before we analyze, where does this equation come from? The division algorithm, which states The Division Algorithm a = bq + r, 0 r < b There are two parts to this proof, the existence of q and r, and uniqueness. Proof Existence Consider the set S = {a nd n Z}. We claim S contains a non-negative integer. There are two cases to consider: 1 If a 0, choose n = 0 2 If a < 0, choose n = ad

22 The Division Algorithm Proof Proof In both cases, a nd is non-negative and thus S always contains at least one non-negative integer. This means we can apply the well-ordering principle.

23 The Division Algorithm Proof Proof In both cases, a nd is non-negative and thus S always contains at least one non-negative integer. This means we can apply the well-ordering principle. Every non-empty set of positive integers contains a smallest element.

24 The Division Algorithm Proof Proof In both cases, a nd is non-negative and thus S always contains at least one non-negative integer. This means we can apply the well-ordering principle. Every non-empty set of positive integers contains a smallest element. and we can deduce that S contains a least non-negative integer r. By definition, r = a nd for some n. Let q be this n. Then, by rearranging, a = qd + r.

25 The Division Algorithm Proof Proof It remains to show 0 r < d. The first inequality holds as r was chosen to be non-negative. To show r < d, suppose r d. Since d 0, r > 0 but d > 0 or d < 0.

26 The Division Algorithm Proof Proof It remains to show 0 r < d. The first inequality holds as r was chosen to be non-negative. To show r < d, suppose r d. Since d 0, r > 0 but d > 0 or d < 0. If d > 0 then r d implies a qd d, further implying a qd d 0 a (q + 1)d 0. Therefore, a (q + 1)d S, and since a (q + 1)d = r d with d > 0, we know a (q + 1)d < r, contradicting that r was the least non-negative element in S.

27 The Division Algorithm Proof Proof It remains to show 0 r < d. The first inequality holds as r was chosen to be non-negative. To show r < d, suppose r d. Since d 0, r > 0 but d > 0 or d < 0. If d > 0 then r d implies a qd d, further implying a qd d 0 a (q + 1)d 0. Therefore, a (q + 1)d S, and since a (q + 1)d = r d with d > 0, we know a (q + 1)d < r, contradicting that r was the least non-negative element in S. If d < 0, then r d implies that a qd d. This implies that a qd + d 0 a (q 1)d 0. Therefore, a (q 1)d S and, since a (q 1)d = r + d with d < 0, we know a (q 1)d < r. So, r < d, completing the existence proof.

28 The Division Algorithm Proof Proof. Uniqueness Suppose there exists q, q, r, r with 0 r, r < d a = dq + r and a = dq + r. Without loss of generality, assume q q. Subtracting the two equations yields d(q q) = r r.

29 The Division Algorithm Proof Proof. Uniqueness Suppose there exists q, q, r, r with 0 r, r < d a = dq + r and a = dq + r. Without loss of generality, assume q q. Subtracting the two equations yields d(q q) = r r. If d > 0 then r r and r < d d + r, so (r r ) < d. Similarly, if d < 0 then r r and r < d d + r, so (r r ) < d. Combining these yields r r < d.

30 The Division Algorithm Proof Proof. Uniqueness Suppose there exists q, q, r, r with 0 r, r < d a = dq + r and a = dq + r. Without loss of generality, assume q q. Subtracting the two equations yields d(q q) = r r. If d > 0 then r r and r < d d + r, so (r r ) < d. Similarly, if d < 0 then r r and r < d d + r, so (r r ) < d. Combining these yields r r < d. The original equation implies d divides r r. So, d r r or r r = 0. But, we established that r r < d, so r = r. Substituting into the original equation yields dq = dq and since d 0, q = q, proving uniqueness.

31 The Division Algorithm Back to the Euclidean Algorithm. The general method looks like: a = q 1 b + r 1 b = q 2 r 1 + r 2 r 1 = q 3 r 2 + r 3 r 2 = q 4 r 3 + r 4 r n 2 = q n r n 1 + r n r n 1 = q n+1 r n + 0.

32 The Division Algorithm Back to the Euclidean Algorithm. The general method looks like: a = q 1 b + r 1 b = q 2 r 1 + r 2 r 1 = q 3 r 2 + r 3 r 2 = q 4 r 3 + r 4 r n 2 = q n r n 1 + r n r n 1 = q n+1 r n + 0 Why is this last nonzero remainder r n a common divisor of a and b?.

33 The Division Algorithm Back to the Euclidean Algorithm. The general method looks like: a = q 1 b + r 1 b = q 2 r 1 + r 2 r 1 = q 3 r 2 + r 3 r 2 = q 4 r 3 + r 4 r n 2 = q n r n 1 + r n r n 1 = q n+1 r n + 0 Why is this last nonzero remainder r n a common divisor of a and b? Start from the bottom and work upwards..

34 Justification The last line r n 1 = q n+1 r n shows that r n r n 1.

35 Justification The last line r n 1 = q n+1 r n shows that r n r n 1. The line above that r n 2 = q n r n 1 + r n shows that r n divides r n 2 since it divides r n and r n 1.

36 Justification The last line r n 1 = q n+1 r n shows that r n r n 1. The line above that r n 2 = q n r n 1 + r n shows that r n divides r n 2 since it divides r n and r n 1. By continuing in this fashion, we see it also divides r n 3, r n 4,, all the way through to a and b.

37 Justification But, why is r n the greatest common divisor of a and b?

38 Justification But, why is r n the greatest common divisor of a and b? Suppose d is any common divisor of a and b. We will work our way back down the list. Consider a = q 1 b + r 1. Since d divides a and b, it must also divide r 1. The second equation b = q 2 r 1 + r 2 shows d must divide r 2.

39 Justification But, why is r n the greatest common divisor of a and b? Suppose d is any common divisor of a and b. We will work our way back down the list. Consider a = q 1 b + r 1. Since d divides a and b, it must also divide r 1. The second equation b = q 2 r 1 + r 2 shows d must divide r 2. Continuing down the line, at each stage we know d divides the previous two remainders, r i 1 and r i, and the current line r i 1 = q i+1 r i + r i+1 will tell us d also divides r i+1.

40 Justification But, why is r n the greatest common divisor of a and b? Suppose d is any common divisor of a and b. We will work our way back down the list. Consider a = q 1 b + r 1. Since d divides a and b, it must also divide r 1. The second equation b = q 2 r 1 + r 2 shows d must divide r 2. Continuing down the line, at each stage we know d divides the previous two remainders, r i 1 and r i, and the current line r i 1 = q i+1 r i + r i+1 will tell us d also divides r i+1. Eventually, we reach r n 2 = q n r n 1 + r n, at which point we conclude d r n. So, if we have any common divisor of a and b in d then d r n. Therefore r n must be the greatest common divisor of a and b.

41 The Division Algorithm Statement of the Euclidean Algorithm To compute (a, b), let r 1 = a and r 0 = b and compute successive quotients and remainders of r i 1 = q i+1 r i + r i+1 until some remainder r n+1 = 0. Then r n is the greatest common divisor. Note: Although the notation may look odd, we let a = r 1 so that we have a mechanism to refer to all values in the algorithm in the form r i.

42 Primes Theorem There are infinitely many primes.

43 Primes Theorem There are infinitely many primes. Proof. Suppose we start with a list of all primes p 1, p 2,, p n. Let A = p 1 p 2 p n + 1. A is larger than any number on our list. So, if A is prime then we are done.

44 Primes Theorem There are infinitely many primes. Proof. Suppose we start with a list of all primes p 1, p 2,, p n. Let A = p 1 p 2 p n + 1. A is larger than any number on our list. So, if A is prime then we are done. If A is composite, then there must be a q 1 q 1 A where q 1 p i for all i = 1, n. Because q 1 1 we have a contradiction, So, it must be so that q 1 is a prime not on our original list.

45 Primes Theorem There are infinitely many primes. Proof. Suppose we start with a list of all primes p 1, p 2,, p n. Let A = p 1 p 2 p n + 1. A is larger than any number on our list. So, if A is prime then we are done. If A is composite, then there must be a q 1 q 1 A where q 1 p i for all i = 1, n. Because q 1 1 we have a contradiction, So, it must be so that q 1 is a prime not on our original list. Let B = q 1 p 1 p n + 1 and repeat this process.

46 Helpful Tools for Number Theory Theorem If x 0, y 0 is a solution of ax + by = c, then so is x 0 + bt, y 0 at. Proof. We know ax 0 + by 0 = c. Consider the following: a(x 0 + bt) + b(y 0 at) = ax 0 + abt + by 0 abt = ax 0 + by 0 = c

47 Helpful Tools for Number Theory Theorem If (a, b) c then ax + by = c has no solution and if (a, b) c then ax + by = c has a solution. Proof. Suppose x 0, y 0 Z ax 0 + by 0 = c. Since (a, b) ax 0 and (a, b) by 0, (a, b) c. Conversely, suppose (a, b) c. then c = m(a, b) for some m. We know ar + bs = (a, b) for some r, s Z. Then, and x = rm, y = sm is a solution. a(rm) + b(sm) = m(a, b) = c

48 One More Theorem Theorem Suppose (a, b) = 1 and x 0, y 0 is a solution of ax + by = c. Then all solutions are given by x = x 0 + bt, y = y 0 at for t Z.

49 Congruences Definition Let a, b, n be integers with n 0, We say a b(mod n) if a b is a multiple of n.

50 Congruences Definition Let a, b, n be integers with n 0, We say a b(mod n) if a b is a multiple of n. The Linear Congruence Theorem Suppose g = (a, m). a) If g b then ax b(mod m) has no solutions. b) If g b then ax b(mod m) has exactly g incongruent solutions.

51 Proof of (a) Proof. (by contrapositive) If ax b(mod m) has a solution then (a, m) b. Suppose r is a solution. Then ar b(mod m) by definition, and from the definition, m (ar b), or ar b = km for some k. Since (a, m) a and (a, m) km, it follows that (a, m) b.

52 Proof of (b) Proof. Since g = (a, m) and g b then we can rewrite our congruence as a g x b ( mod m ) g g

53 Proof of (b) Proof. Since g = (a, m) and g b then we can rewrite our congruence as a g x b ( mod m ) g g ( ) But, a g, m g =1, so the right hand side has a unique solution modulo ( ) m g, say x x m 1 g.

54 Proof of (b) Proof. Since g = (a, m) and g b then we can rewrite our congruence as a g x b ( mod m ) g g ( ) But, a g, m g =1, so the right hand side has a unique solution modulo ( ) m g, say x x m 1 g. So, the integers x which satisfy ax b(mod m) are exactly those of the form x = x 1 + k m g for some k.

55 Proof of (b) Proof. Consider the set of integers { x 1, x 1 + m g, x m g,, x 1 + (g 1) m } g

56 Proof of (b) Proof. Consider the set of integers { x 1, x 1 + m g, x m g,, x 1 + (g 1) m } g None of these are congruent modulo m and none differ by as much as m. further, for any k Z, we have that x 1 + k m g is congruent modulo m to one of them.

57 Proof of (b) Proof. To see this, write k = gq + r where 0 r < d from the Division Algorithm. then, x 1 + k m g = x 1 + (gq + r) m g = x 1 + mq + r m g x 1 + r m (mod m) g So, these are the g solutions of ax b(mod m).

58 Congruence Rules 1 a a(mod m)

59 Congruence Rules 1 a a(mod m) 2 a 0(mod m) iff m a

60 Congruence Rules 1 a a(mod m) 2 a 0(mod m) iff m a 3 a b(mod m) iff b a(mod m)

61 Congruence Rules 1 a a(mod m) 2 a 0(mod m) iff m a 3 a b(mod m) iff b a(mod m) 4 If a b(mod m) and c d(mod m) then 1 a + c b + d(mod m)

62 Congruence Rules 1 a a(mod m) 2 a 0(mod m) iff m a 3 a b(mod m) iff b a(mod m) 4 If a b(mod m) and c d(mod m) then 1 a + c b + d(mod m) 2 ac bd(mod m)

63 Congruence Rules 1 a a(mod m) 2 a 0(mod m) iff m a 3 a b(mod m) iff b a(mod m) 4 If a b(mod m) and c d(mod m) then 1 a + c b + d(mod m) 2 ac bd(mod m) 5 (a, n) = 1 then ab ac(mod n) implies that b c(mod n)

64 Congruence Rules 1 a a(mod m) 2 a 0(mod m) iff m a 3 a b(mod m) iff b a(mod m) 4 If a b(mod m) and c d(mod m) then 1 a + c b + d(mod m) 2 ac bd(mod m) 5 (a, n) = 1 then ab ac(mod n) implies that b c(mod n) 6 If (a, n) = d 1 then a b(mod n) implies a d b d (mod n d )

65 Congruence Rules 1 a a(mod m) 2 a 0(mod m) iff m a 3 a b(mod m) iff b a(mod m) 4 If a b(mod m) and c d(mod m) then 1 a + c b + d(mod m) 2 ac bd(mod m) 5 (a, n) = 1 then ab ac(mod n) implies that b c(mod n) 6 If (a, n) = d 1 then a b(mod n) implies a d b d (mod n d ) 7 If (a, m) = 1 then ax b(mod m) has one solution.

66 Using These Properties Example Solve for x in 4x 3(mod 19).

67 Using These Properties Example Solve for x in 4x 3(mod 19). Since (5, 19) = 1, we can multiply both sides by 5. This gives 4x 3(mod 19) 20x 15(mod 19) and since 20 1(mod 19), we have that x 15(mod 19).

68 And Another One Example Solve for x in 6x 15(mod 514)

69 And Another One Example Solve for x in 6x 15(mod 514) Since 6x 15 is always odd, it can never be divisible by 514. So, there is no solution.

70 Fermat s Little Theorem Theorem Let p be a prime which does not divide the integer a, then a p 1 1(mod p). Proof. Start by listing the first p 1 positive multiples of a: a, 2a, 3a,, (p 1)a.

71 Fermat s Little Theorem Theorem Let p be a prime which does not divide the integer a, then a p 1 1(mod p). Proof. Start by listing the first p 1 positive multiples of a: a, 2a, 3a,, (p 1)a. Suppose that ra and sa are the same modulo p, then we have r s(mod p), so the p 1 multiples of a above are distinct and nonzero; that is, they must be congruent to 1, 2, 3,, p 1 in some order.

72 Fermat s Little Theorem Theorem Let p be a prime which does not divide the integer a, then a p 1 1(mod p). Proof. Start by listing the first p 1 positive multiples of a: a, 2a, 3a,, (p 1)a. Suppose that ra and sa are the same modulo p, then we have r s(mod p), so the p 1 multiples of a above are distinct and nonzero; that is, they must be congruent to 1, 2, 3,, p 1 in some order. Multiply all these congruences together and we find a 2a 3a (p 1)a (p 1)(mod p) or better, a p 1 (p 1)! (p 1)!(mod p). Divide both sides by (p 1)! to complete the proof.

3 The fundamentals: Algorithms, the integers, and matrices

3 The fundamentals: Algorithms, the integers, and matrices 3 The fundamentals: Algorithms, the integers, and matrices 3.4 The integers and division This section introduces the basics of number theory number theory is the part of mathematics involving integers

More information

Definition: div Let n, d 0. We define ndiv d as the least integer quotient obtained when n is divided by d. That is if

Definition: div Let n, d 0. We define ndiv d as the least integer quotient obtained when n is divided by d. That is if Section 5. Congruence Arithmetic A number of computer languages have built-in functions that compute the quotient and remainder of division. Definition: div Let n, d 0. We define ndiv d as the least integer

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

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

ELEMENTS OF NUMBER THEORY

ELEMENTS OF NUMBER THEORY ELEMENTS OF NUMBER THEORY Examination corner 1 one mark question in part A 1 - two mark question in part B 1 five mark OR 3mark+2 mark question in part C 1 two or four mark question in part E concepts

More information

Ch 4.2 Divisibility Properties

Ch 4.2 Divisibility Properties Ch 4.2 Divisibility Properties - Prime numbers and composite numbers - Procedure for determining whether or not a positive integer is a prime - GCF: procedure for finding gcf (Euclidean Algorithm) - Definition:

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

3.2 Solving linear congruences. v3

3.2 Solving linear congruences. v3 3.2 Solving linear congruences. v3 Solving equations of the form ax b (mod m), where x is an unknown integer. Example (i) Find an integer x for which 56x 1 mod 93. Solution We have already solved this

More information

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635 COMP239: Mathematics for Computer Science II Prof. Chadi Assi assi@ciise.concordia.ca EV7.635 The Euclidean Algorithm The Euclidean Algorithm Finding the GCD of two numbers using prime factorization is

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem Sacred Heart University DigitalCommons@SHU Academic Festival Apr 20th, 9:30 AM - 10:45 AM The Chinese Remainder Theorem Nancirose Piazza Follow this and additional works at: http://digitalcommons.sacredheart.edu/acadfest

More information

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, }

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, } Integers and Division 1 The Integers and Division This area of discrete mathematics belongs to the area of Number Theory. Some applications of the concepts in this section include generating pseudorandom

More information

Number Theory Math 420 Silverman Exam #1 February 27, 2018

Number Theory Math 420 Silverman Exam #1 February 27, 2018 Name: Number Theory Math 420 Silverman Exam #1 February 27, 2018 INSTRUCTIONS Read Carefully Time: 50 minutes There are 5 problems. Write your name neatly at the top of this page. Write your final answer

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

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

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

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

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

Wilson s Theorem and Fermat s Little Theorem

Wilson s Theorem and Fermat s Little Theorem Wilson s Theorem and Fermat s Little Theorem Wilson stheorem THEOREM 1 (Wilson s Theorem): (p 1)! 1 (mod p) if and only if p is prime. EXAMPLE: We have (2 1)!+1 = 2 (3 1)!+1 = 3 (4 1)!+1 = 7 (5 1)!+1 =

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

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

Math 261 Spring 2014 Final Exam May 5, 2014

Math 261 Spring 2014 Final Exam May 5, 2014 Math 261 Spring 2014 Final Exam May 5, 2014 1. Give a statement or the definition for ONE of the following in each category. Circle the letter next to the one you want graded. For an extra good final impression,

More information

a the relation arb is defined if and only if = 2 k, k

a the relation arb is defined if and only if = 2 k, k DISCRETE MATHEMATICS Past Paper Questions in Number Theory 1. Prove that 3k + 2 and 5k + 3, k are relatively prime. (Total 6 marks) 2. (a) Given that the integers m and n are such that 3 (m 2 + n 2 ),

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

For your quiz in recitation this week, refer to these exercise generators:

For your quiz in recitation this week, refer to these exercise generators: Monday, Oct 29 Today we will talk about inverses in modular arithmetic, and the use of inverses to solve linear congruences. For your quiz in recitation this week, refer to these exercise generators: GCD

More information

The Euclidean Algorithm and Multiplicative Inverses

The Euclidean Algorithm and Multiplicative Inverses 1 The Euclidean Algorithm and Multiplicative Inverses Lecture notes for Access 2009 The Euclidean Algorithm is a set of instructions for finding the greatest common divisor of any two positive integers.

More information

Ma/CS 6a Class 2: Congruences

Ma/CS 6a Class 2: Congruences Ma/CS 6a Class 2: Congruences 1 + 1 5 (mod 3) By Adam Sheffer Reminder: Public Key Cryptography Idea. Use a public key which is used for encryption and a private key used for decryption. Alice encrypts

More information

Part V. Chapter 19. Congruence of integers

Part V. Chapter 19. Congruence of integers Part V. Chapter 19. Congruence of integers Congruence modulo m Let m be a positive integer. Definition. Integers a and b are congruent modulo m if and only if a b is divisible by m. For example, 1. 277

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

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

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

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

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

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION Recall that RSA works as follows. A wants B to communicate with A, but without E understanding the transmitted message. To do so: A broadcasts RSA method,

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

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

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

4.4 Solving Congruences using Inverses

4.4 Solving Congruences using Inverses 4.4 Solving Congruences using Inverses Solving linear congruences is analogous to solving linear equations in calculus. Our first goal is to solve the linear congruence ax b pmod mq for x. Unfortunately

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

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

Definition For a set F, a polynomial over F with variable x is of the form

Definition For a set F, a polynomial over F with variable x is of the form *6. Polynomials Definition For a set F, a polynomial over F with variable x is of the form a n x n + a n 1 x n 1 + a n 2 x n 2 +... + a 1 x + a 0, where a n, a n 1,..., a 1, a 0 F. The a i, 0 i n are the

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Today's learning goals Define and use the congruence modulo m equivalence relation Perform computations using modular arithmetic

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

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Today's learning goals Determine whether a relation is an equivalence relation by determining whether it is Reflexive Symmetric

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

MTH 346: The Chinese Remainder Theorem

MTH 346: The Chinese Remainder Theorem MTH 346: The Chinese Remainder Theorem March 3, 2014 1 Introduction In this lab we are studying the Chinese Remainder Theorem. We are going to study how to solve two congruences, find what conditions are

More information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3 CS 70 Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over a smaller

More information

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL NUMBER THEORY AND CODES Álvaro Pelayo WUSTL Talk Goal To develop codes of the sort can tell the world how to put messages in code (public key cryptography) only you can decode them Structure of Talk Part

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem Sacred Heart University piazzan@mail.sacredheart.edu March 29, 2018 Divisibility Divisibility We say a divides b, denoted as a b, if there exists k Z such that ak = b. Example: Consider 2 6. Then k = 3

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

Integers and Division

Integers and Division Integers and Division Notations Z: set of integers N : set of natural numbers R: set of real numbers Z + : set of positive integers Some elements of number theory are needed in: Data structures, Random

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

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

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z. Math 3, Fall 010 Assignment 3 Solutions Exercise 1. Find all the integral solutions of the following linear diophantine equations. Be sure to justify your answers. (i) 3x + y = 7. (ii) 1x + 18y = 50. (iii)

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

MATH 145 Algebra, Solutions to Assignment 4

MATH 145 Algebra, Solutions to Assignment 4 MATH 145 Algebra, Solutions to Assignment 4 1: a) Find the inverse of 178 in Z 365. Solution: We find s and t so that 178s + 365t = 1, and then 178 1 = s. The Euclidean Algorithm gives 365 = 178 + 9 178

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

Lecture 7: Number Theory Steven Skiena. skiena

Lecture 7: Number Theory Steven Skiena.   skiena Lecture 7: Number Theory Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Number Theory and Divisibility G-d created

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

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

LARGE PRIME NUMBERS (32, 42; 4) (32, 24; 2) (32, 20; 1) ( 105, 20; 0).

LARGE PRIME NUMBERS (32, 42; 4) (32, 24; 2) (32, 20; 1) ( 105, 20; 0). LARGE PRIME NUMBERS 1. Fast Modular Exponentiation Given positive integers a, e, and n, the following algorithm quickly computes the reduced power a e % n. (Here x % n denotes the element of {0,, n 1}

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

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

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

More information

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1 MATH 4400 SOLUTIONS TO SOME EXERCISES 1.1.3. If a b and b c show that a c. 1. Chapter 1 Solution: a b means that b = na and b c that c = mb. Substituting b = na gives c = (mn)a, that is, a c. 1.2.1. Find

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Determine whether a relation is an equivalence relation by determining whether it is Reflexive Symmetric

More information

Wednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory).

Wednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory). Wednesday, February 21 Today we will begin Course Notes Chapter 5 (Number Theory). 1 Return to Chapter 5 In discussing Methods of Proof (Chapter 3, Section 2) we introduced the divisibility relation from

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

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic (MATH 1190) Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Nov 13, 2014 Quiz announcement The second quiz will be held on Thursday,

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

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

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

Introduction to Cryptography CS 355 Lecture 3

Introduction to Cryptography CS 355 Lecture 3 Introduction to Cryptography CS 355 Lecture 3 Elementary Number Theory (1) CS 355 Fall 2005/Lecture 3 1 Review of Last Lecture Ciphertext-only attack: Known-plaintext attack: Chosen-plaintext: Chosen-ciphertext:

More information

Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook)

Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook) Proofs Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm Reading (Epp s textbook) 4.3 4.8 1 Divisibility The notation d n is read d divides n. Symbolically,

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

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

Signature: (In Ink) UNIVERSITY OF MANITOBA TEST 1 SOLUTIONS COURSE: MATH 2170 DATE & TIME: February 11, 2019, 16:30 17:15

Signature: (In Ink) UNIVERSITY OF MANITOBA TEST 1 SOLUTIONS COURSE: MATH 2170 DATE & TIME: February 11, 2019, 16:30 17:15 PAGE: 1 of 7 I understand that cheating is a serious offence: Signature: (In Ink) PAGE: 2 of 7 1. Let a, b, m, be integers, m > 1. [1] (a) Define a b. Solution: a b iff for some d, ad = b. [1] (b) Define

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

EXAMPLES OF MORDELL S EQUATION

EXAMPLES OF MORDELL S EQUATION EXAMPLES OF MORDELL S EQUATION KEITH CONRAD 1. Introduction The equation y 2 = x 3 +k, for k Z, is called Mordell s equation 1 on account of Mordell s long interest in it throughout his life. A natural

More information

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

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

More information

Chapter 3: The Euclidean Algorithm and Diophantine. Math 138 Burger California State University, Fresno

Chapter 3: The Euclidean Algorithm and Diophantine. Math 138 Burger California State University, Fresno Chapter 3: The Euclidean Algorithm and Diophantine Equations Math 138 Burger California State University, Fresno Greatest Common Divisor d is the greatest common divisor of integers a and b if d is the

More information

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z:

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z: Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some z Z Notation: b Fact: for all, b, c Z:, 1, and 0 0 = 0 b and b c = c b and c = (b + c) b and b = ±b 1

More information

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory. CSS322: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 29 December 2011 CSS322Y11S2L06, Steve/Courses/2011/S2/CSS322/Lectures/number.tex,

More information

The Impossibility of Certain Types of Carmichael Numbers

The Impossibility of Certain Types of Carmichael Numbers The Impossibility of Certain Types of Carmichael Numbers Thomas Wright Abstract This paper proves that if a Carmichael number is composed of primes p i, then the LCM of the p i 1 s can never be of the

More information

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is LARGE PRIME NUMBERS 1. Fermat Pseudoprimes Fermat s Little Theorem states that for any positive integer n, if n is prime then b n % n = b for b = 1,..., n 1. In the other direction, all we can say is that

More information

Chapter 8. Introduction to Number Theory

Chapter 8. Introduction to Number Theory Chapter 8 Introduction to Number Theory CRYPTOGRAPHY AND NETWORK SECURITY 1 Index 1. Prime Numbers 2. Fermat`s and Euler`s Theorems 3. Testing for Primality 4. Discrete Logarithms 2 Prime Numbers 3 Prime

More information

Ma/CS 6a Class 2: Congruences

Ma/CS 6a Class 2: Congruences Ma/CS 6a Class 2: Congruences 1 + 1 5 (mod 3) By Adam Sheffer Reminder: Public Key Cryptography Idea. Use a public key which is used for encryption and a private key used for decryption. Alice encrypts

More information

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

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

More information

Divisibility of Natural Numbers

Divisibility of Natural Numbers 10-19-2009 Divisibility of Natural Numbers We now return to our discussion of the natural numbers. We have built up much of the mathematical foundation for the natural numbers (N = 1, 2, 3,...). We used

More information

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4 Do the following exercises from the text: Chapter (Section 3):, 1, 17(a)-(b), 3 Prove that 1 3 + 3 + + n 3 n (n + 1) for all n N Proof The proof is by induction on n For n N, let S(n) be the statement

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

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

CS March 17, 2009

CS March 17, 2009 Discrete Mathematics CS 2610 March 17, 2009 Number Theory Elementary number theory, concerned with numbers, usually integers and their properties or rational numbers mainly divisibility among integers

More information

CISC-102 Fall 2017 Week 6

CISC-102 Fall 2017 Week 6 Week 6 page 1! of! 15 CISC-102 Fall 2017 Week 6 We will see two different, yet similar, proofs that there are infinitely many prime numbers. One proof would surely suffice. However, seeing two different

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

Discrete Structures Lecture Solving Congruences. mathematician of the eighteenth century). Also, the equation gggggg(aa, bb) =

Discrete Structures Lecture Solving Congruences. mathematician of the eighteenth century). Also, the equation gggggg(aa, bb) = First Introduction Our goal is to solve equations having the form aaaa bb (mmmmmm mm). However, first we must discuss the last part of the previous section titled gcds as Linear Combinations THEOREM 6

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

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 324, Fall 2011 Assignment 7 Solutions. 1 (ab) γ = a γ b γ mod n.

Math 324, Fall 2011 Assignment 7 Solutions. 1 (ab) γ = a γ b γ mod n. Math 324, Fall 2011 Assignment 7 Solutions Exercise 1. (a) Suppose a and b are both relatively prime to the positive integer n. If gcd(ord n a, ord n b) = 1, show ord n (ab) = ord n a ord n b. (b) Let

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