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

Size: px
Start display at page:

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

Transcription

1 Math 152, Problem Set 2 solutions ( ) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1 x 1 = y3 1 (1) and let us try to find all integral solutions (x, y). (When x = 1, we just realize the LHS as x 4 + x 3 + x 2 + x + 1, which is then 5.) (a) Prove that if a prime p divides x5 1, then either p = 5 or 5 p 1. x 1 (Hint: Q3(b) in Problem Set 1 might be useful.) Solution. Let p be a prime and x an integer. Suppose p divides x 4 +x 3 +x 2 +x+1 = (x 5 1)/(x 1). It follows that p divides x 5 1. Let k be the smallest positive integer such that p x k 1. We know p x 5 1, so certainly k 5. I claim that in fact k 5, i.e. either k = 5 or k = 1. To see this, note that p x 5 1 and p x k 1 together imply that p gcd(x 5 1, x k 1) = x gcd(5,k) 1, where the equality is from Q3(a) of Problem Set 1. Since gcd(5, k) k and we assumed k to be the smallest positive integer such that p x k 1, we must in fact have k = gcd(5, k). Since we also have k 5, this is equivalent to saying that k 5, as claimed. So we now have two cases: The first case is that k = 5 is the smallest positive integer such that p x k 1. Then Q3(b) of Problem Set 1 tells us that 5 p 1, which is one of the conditions we wanted to show. The second case is that k = 1, i.e. p x 1, or in other words x 1 (mod p). Then x 4 + x 3 + x 2 + x (mod p). But we assumed p x 4 + x 3 + x 2 + x + 1, i.e. x 4 + x 3 + x 2 + x (mod p). So we deduce that 5 0 (mod p), i.e. p 5. But then we must have p = 5, which is the other condition we wanted to show. (b) Show that (1) in fact has no integral solutions. (Hint: By part (a), any divisor of y 3 1 has to be (mod 5) to either 0 or 1.) Solution. Suppose given two integers x, y such that equation (1) holds. Let p be any prime dividing y 3 1 = (x 5 1)/(x 1). By part (a), either p 0 (mod 5) or p 1 (mod 5). More generally, let d be any divisor of y 3 1. Then d is the product of powers of primes that divide y 3 1, so it follows from the above that either d 0 (mod 5) or d 1 (mod 5). Writing y 3 1 = (y 1)(y 2 + y + 1), we can apply the above fact for d = y 1 and d = y 2 + y + 1: 1

2 Suppose d = y 1 0 (mod 5). Then y 1 (mod 5). But then d = y 2 +y (mod 5), which is not equivalent to 0 or 1 mod 5. Contradiction. Suppose d = y 1 1 (mod 5). Then y 2 (mod 5). But then d = y 2 +y (mod 5), which is not equivalent to 0 or 1 mod 5. Contradiction. In either case we have a contradiction, so we conclude there are no pairs of integers x, y satisfying equation (1). 2. Prove that for any integer m with gcd(m, 6) = 1, there exists a natural number n such that 2 n + 3 n + 6 n 1 is a multiple of m. Solution. (We follow the strategy discussed for Problem 2.4 in the lecture notes ( ).) Let m be an integer such that gcd(m, 6) = 1. Note that this also implies gcd(m, 2) = 1 and gcd(m, 3) = 1. Let n := φ(m) 1. I claim that 2 n + 3 n + 6 n 1 (mod 15) for this choice of n (solving the problem). Since gcd(m, 6) = 1, it suffices to check this after multiplying both sides by 6, i.e. we want to show that We have 6 2 n n n 6 (mod 15). 6 2 n n n = 3 2 φ(m) φ(m) + 6 φ(m), and by Euler s theorem this is equivalent to = 6 mod m, as desired. On the other hand, show that this is impossible with m = 15. Solution. We first note the periodicities in the sequences 2 n, 3 n, 6 n mod 15: (mod 15), so 2 4+n 2 n (mod 15) for all n (mod 15), so 3 4+n 3 n (mod 15) for all n (mod 15), so 6 n = 6 (mod 15) for all n 1. It follows that all possible values of 2 n + 3 n + 6 n (mod 15) occur in the range 0 n 4. Computing the values in this range gives the following results: n 2 n + 3 n + 6 n (mod 15) We conclude that there is no n such that 2 n + 3 n + 6 n 1 (mod 15). 3. Find the minimal positive integer t such that whenever gcd(x, 63) = 1. Prove your result. x t 1 (mod 63) Solution. We factorize 63 = Computing (p 1)p s 1 for these two factors, we get (3 1) 3 = 6, (7 1) 1 = 6. 2

3 Thus by Corollary 4.2 of the lecture notes ( ), for t = 6 we have x t 1 (mod 63) whenever gcd(x, 63) = 1. I claim t = 6 is minimal. Suppose we have another such t. Then, taking x = 10 (which is coprime to 63), we have 10 t 1 (mod 63). This in particular implies 10 t 1 (mod 7), and since 10 3 (mod 7) this is equivalent to saying that 3 t 1 (mod 7). One easily checks that the minimal t for which this holds is t = Find the least natural number t, for which there exists some 1 s < t, such that n s and n t have the same last 3 digits for any natural number n. (Note: The last 3 digits of 18 (for example) is considered 018, and thus the same as that of 2018.) Solution. The first observation is that two natural numbers x, y have the same last 3 digits if and only if x y (mod 1000). Let 1 s < t be two natural numbers. We will show that the following two conditions on (s, t) are equivalent: n s n t (mod 1000) for all natural numbers n; s 3 and 100 t s. It follows immediately from this equivalence that the minimal t asked for in the problem is t = 103 (with corresponding s = 3). So let s prove the claimed equivalence. For n a natural number, n s n t (mod 1000) if and only if 1000 n s n t. Then factoring 1000 = , we see that 1000 n s n t if and only if both 2 3 n s n t and 5 3 n s n t. Let s characterize when 5 3 n s n t for all natural numbers n. Write n s n t = n s (1 n t s ). (Note that t s > 0.) We consider two cases for n: First consider the case that n 0 (mod 5). Then 1 n t s 1 (mod 5), so 5 3 n s (1 n t s ) if and only if 5 3 n s. This condition holds for all n divisible by 5 (in particular n = 5) if and only if s 3. The other case is that gcd(n, 5) = 1. Then gcd(n s, 5) = 1 too, so 5 3 n s (1 n t s ) if and only if n t s, i.e. if and only if n t s 1 (mod 5 3 ). The generalization of Fermat s little theorem to prime power modulus tells us that this holds if t s is divisible by (5 1) 5 2 = 100. In fact, n t s 1 (mod 5 3 ) for all n coprime to 5 if and only if 100 t s. This follows from the fact that this value (p 1) p s 1 in Fermat s little theorem is the minimal exponent e such that n e 1 (mod p s ) for all n coprime to p. This fact will be proved later in the course. We conclude that 5 3 n s n t for all natural numbers n (both divisible by 5 and coprime to 5) if and only if both s 3 and 100 t s. Going through the same analysis with 5 3 replaced by 2 3, one see that 2 3 n s n t for all natural numbers n if and only if both s 3 and (2 1) 2 2 = 4 t s. These conditions are implied by the conditions coming from the analysis of 5 3. So finally we deduce that 1000 n s n t for all natural numbers n if and only if s 3 and 100 t s, as we desired to show. 5. Let us look at the equation 3 x = 2 y + 1 (2) 3

4 (a) Show that if y 3, we have 2 y 2 x. Solution. First observe that 2 3 = 8 = 3 2 1, so in particular By Lemma 3.3 of the lecture notes ( ), it follows inductively that for y 3 we have 2 y 3 2y 2 1. It might be psychologically helpful for the next paragraph to note that we can equivalently write this as 2 k+2 3 2k 1 for k 1. Now let x, y be positive integers with y 3, and suppose that 2 y 3 x 1. We will show that this implies 2 y 2 x (solving the problem). We have 2 y 3 x 1 and 2 y 3 2y 2 1, so we deduce 2 y gcd(3 x 1, 3 2y 2 1) = 3 gcd(x,2y 2) 1, where the equality is by Q3(a) of Problem Set 1. Now, gcd(x, 2 y 2 ) = 2 k for some 0 k y 2. If we had k < y 2, then we would have 2 y > 2 k+2 and 2 y 3 2k 1, contradicting the fact 2 k+2 3 2k 1 from the previous paragraph. Therefore we must have k = y 2. It follows that 2 y 2 x, as desired. (b) Prove that (2) has only 2 solutions in natural numbers. Solution. When y = 0 or y = 2 there is clearly no solution. When y = 1 there is a (unique) solution given by x = 1. When y = 3 there is a (unique) solution given by x = 2. It only remains to show that there can be no solution with y 4. By part (a), if y 4 and 3 x = 2 y + 1, then 2 y 2 x, so in particular x 2 y 2. But then 3 x 3 2y 2, and it is easy to see that 3 2y 2 > 2 y + 1: we compute this to be true for y = 4, and the left-hand side grows much faster than the right-hand side so it is also true for y > 4. Thus there can be no such solution (x, y). 6. ( ) Find all solutions in natural numbers to the equation 2 x = 7 y + 9. Solution. I claim the only solution is (x, y) = (4, 1). By inspection this is the only solution with x 4, so it suffices to prove that there are no solutions with x 5. Suppose (for the sake of contradiction) that (x, y) is a solution with x 5. Then 32 = x so we get 7 y = 2 x (mod 32). We have (mod 32) and (mod 32) so we deduce that y 3 (mod 4). We also have (mod 5), and (mod 5). Thus the condition y 3 (mod 4) implies that 2 x = 7 y (mod 5). Since (mod 5) but (mod 5), this implies that x 1 (mod 4). Next observe that 2 x = 7 y (mod 7). Since (mod 9), this implies x 1 (mod 3). Together with x 1 (mod 4) this implies that in fact x 1 (mod 12). Next we use that (mod 13). Since x 1 (mod 12) we have 2 x 2 (mod 13). And since y 3 (mod 4), we must have that y is equivalent to 3, 7, or 11 mod 12. Using that 2 x = 7 y + 9 (mod 13), we deduce that in fact we must have y 7 (mod 12). 4

5 Finally, we use that (mod 37) and (mod 37). Since x 1 (mod 12), we must have that x is equivalent to 1, 13, or 25 mod 36. Then 2 x is equivalent to 2, 15, or 20 mod 37. Similarly, since y 7 (mod 12), we must have that y is equivalent to 7, 19, or 31 mod 36. Then 7 y + 9 is equivalent to 6, 16, or 5 mod 37. Thus we cannot have 2 x 7 y + 9 (mod 37), a contradiction. 5

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

Discrete Mathematics with Applications MATH236

Discrete Mathematics with Applications MATH236 Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet

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

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

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

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

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1 4. Primality testing 4.1. Introduction. Factorisation is concerned with the problem of developing efficient algorithms to express a given positive integer n > 1 as a product of powers of distinct primes.

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

Lecture 4: Number theory

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

More information

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

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

The Chinese Remainder Theorem

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

More information

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

Cyclic Group Supplement. g = g k : k Z.

Cyclic Group Supplement. g = g k : k Z. Theorem 1. Let g be an element of a group G and write { } g = g k : k Z. Then g is a subgroup of G. Proof. Since 1 = g 0, 1 g. Suppose a, b g. Then a = g k, b = g m and ab = g k g m = g k+m. Hence ab g

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

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

Notes on Primitive Roots Dan Klain

Notes on Primitive Roots Dan Klain Notes on Primitive Roots Dan Klain last updated March 22, 2013 Comments and corrections are welcome These supplementary notes summarize the presentation on primitive roots given in class, which differed

More information

SOLUTIONS Math 345 Homework 6 10/11/2017. Exercise 23. (a) Solve the following congruences: (i) x (mod 12) Answer. We have

SOLUTIONS Math 345 Homework 6 10/11/2017. Exercise 23. (a) Solve the following congruences: (i) x (mod 12) Answer. We have Exercise 23. (a) Solve the following congruences: (i) x 101 7 (mod 12) Answer. We have φ(12) = #{1, 5, 7, 11}. Since gcd(7, 12) = 1, we must have gcd(x, 12) = 1. So 1 12 x φ(12) = x 4. Therefore 7 12 x

More information

Rings and modular arithmetic

Rings and modular arithmetic Chapter 8 Rings and modular arithmetic So far, we have been working with just one operation at a time. But standard number systems, such as Z, have two operations + and which interact. It is useful to

More information

Number Theory Solutions Packet

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

More information

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

CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor

CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor Consider any two integers, a,b, at least one non-zero. If we list the positive divisors in numeric order from smallest to largest, we would get two

More information

Greatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730

Greatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730 MATH 2730 Greatest Common Divisor Benjamin V.C. Collins James A. Swenson The world s least necessary definition Definition Let a, b Z, not both zero. The largest integer d such that d a and d b is called

More information

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6 CS 70 Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6 1 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes

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

PRACTICE PROBLEMS: SET 1

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

More information

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

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

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

18. Cyclotomic polynomials II

18. Cyclotomic polynomials II 18. Cyclotomic polynomials II 18.1 Cyclotomic polynomials over Z 18.2 Worked examples Now that we have Gauss lemma in hand we can look at cyclotomic polynomials again, not as polynomials with coefficients

More information

The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers:

The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers: Divisibility Euclid s algorithm The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers: Divide the smaller number into the larger, and

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

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

Inverses. Today: finding inverses quickly. Euclid s Algorithm. Runtime. Euclid s Extended Algorithm.

Inverses. Today: finding inverses quickly. Euclid s Algorithm. Runtime. Euclid s Extended Algorithm. Inverses Today: finding inverses quickly. Euclid s Algorithm. Runtime. Euclid s Extended Algorithm. Refresh Does 2 have an inverse mod 8? No. Does 2 have an inverse mod 9? Yes. 5 2(5) = 10 = 1 mod 9. Does

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

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

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

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

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

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

More information

Outline. Number Theory and Modular Arithmetic. p-1. Definition: Modular equivalence a b [mod n] (a mod n) = (b mod n) n (a-b)

Outline. Number Theory and Modular Arithmetic. p-1. Definition: Modular equivalence a b [mod n] (a mod n) = (b mod n) n (a-b) Great Theoretical Ideas In CS Victor Adamchik CS - Lecture Carnegie Mellon University Outline Number Theory and Modular Arithmetic p- p Working modulo integer n Definitions of Z n, Z n Fundamental lemmas

More information

1 Structure of Finite Fields

1 Structure of Finite Fields T-79.5501 Cryptology Additional material September 27, 2005 1 Structure of Finite Fields This section contains complementary material to Section 5.2.3 of the text-book. It is not entirely self-contained

More information

ECE596C: Handout #11

ECE596C: Handout #11 ECE596C: Handout #11 Public Key Cryptosystems Electrical and Computer Engineering, University of Arizona, Loukas Lazos Abstract In this lecture we introduce necessary mathematical background for studying

More information

Solutions to Practice Final

Solutions to Practice Final s to Practice Final 1. (a) What is φ(0 100 ) where φ is Euler s φ-function? (b) Find an integer x such that 140x 1 (mod 01). Hint: gcd(140, 01) = 7. (a) φ(0 100 ) = φ(4 100 5 100 ) = φ( 00 5 100 ) = (

More information

Olympiad Number Theory Through Challenging Problems

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

More information

Sums of Squares. Bianca Homberg and Minna Liu

Sums of Squares. Bianca Homberg and Minna Liu Sums of Squares Bianca Homberg and Minna Liu June 24, 2010 Abstract For our exploration topic, we researched the sums of squares. Certain properties of numbers that can be written as the sum of two squares

More information

Math 430 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS

Math 430 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS Math 40 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS WARNING: Remember, it s best to rely as little as possible on my solutions. Therefore, I urge you to try the problems on your

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

The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem.

The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem. CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 10 The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem.

More information

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2,

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2, MATH 4400 roblems. Math 4400/6400 Homework # solutions 1. Let P be an odd integer not necessarily rime. Show that modulo, { P 1 0 if P 1, 7 mod, 1 if P 3, mod. Proof. Suose that P 1 mod. Then we can write

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

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

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

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

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

A Readable Introduction to Real Mathematics

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

More information

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

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

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

Mathematical Foundations of Public-Key Cryptography

Mathematical Foundations of Public-Key Cryptography Mathematical Foundations of Public-Key Cryptography Adam C. Champion and Dong Xuan CSE 4471: Information Security Material based on (Stallings, 2006) and (Paar and Pelzl, 2010) Outline Review: Basic Mathematical

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

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

MATH10040 Chapter 1: Integers and divisibility

MATH10040 Chapter 1: Integers and divisibility MATH10040 Chapter 1: Integers and divisibility Recall the basic definition: 1. Divisibilty Definition 1.1. If a, b Z, we say that b divides a, or that a is a multiple of b and we write b a if there is

More information

CS2800 Questions selected for fall 2017

CS2800 Questions selected for fall 2017 Discrete Structures Final exam sample questions Solutions CS2800 Questions selected for fall 2017 1. Determine the prime factorizations, greatest common divisor, and least common multiple of the following

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

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

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test Introduction to Algorithms (CS 482) Cornell University Instructor: Bobby Kleinberg Lecture Notes, 25 April 2008 The Miller-Rabin Randomized Primality Test 1 Introduction Primality testing is an important

More information

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

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

More information

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

Some Own Problems In Number Theory

Some Own Problems In Number Theory Some Own Problems In Number Theory Mathmdmb April 16, 2011 Here are some problems proposed by me, and the problems or their solutions have not been approved by someone else. So if any fault occurs, I shall

More information

2.2 Inverses and GCDs

2.2 Inverses and GCDs 34 CHAPTER 2. CRYPTOGRAPHY AND NUMBER THEORY 2.2 Inverses and GCDs 2.2.1 Inverses mod p In the last section we explored the multiplication in Z n. We saw in the special case with n =12 and a = 4 that if

More information

Divisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006

Divisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006 Divisibility in the Fibonacci Numbers Stefan Erickson Colorado College January 27, 2006 Fibonacci Numbers F n+2 = F n+1 + F n n 1 2 3 4 6 7 8 9 10 11 12 F n 1 1 2 3 8 13 21 34 89 144 n 13 14 1 16 17 18

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

= 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

Proof by Contradiction

Proof by Contradiction Proof by Contradiction MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Proof by Contradiction Fall 2014 1 / 12 Outline 1 Proving Statements with Contradiction 2 Proving

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

MATH 310: Homework 7

MATH 310: Homework 7 1 MATH 310: Homework 7 Due Thursday, 12/1 in class Reading: Davenport III.1, III.2, III.3, III.4, III.5 1. Show that x is a root of unity modulo m if and only if (x, m 1. (Hint: Use Euler s theorem and

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 420 FINAL EXAM J. Beachy, 5/7/97

MATH 420 FINAL EXAM J. Beachy, 5/7/97 MATH 420 FINAL EXAM J. Beachy, 5/7/97 1. (a) For positive integers a and b, define gcd(a, b). (b) Compute gcd(1776, 1492). (c) Show that if a, b, c are positive integers, then gcd(a, bc) = 1 if and only

More information

Winter Camp 2009 Number Theory Tips and Tricks

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

More information

8 Primes and Modular Arithmetic

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

More information

CHAPTER 3. Congruences. Congruence: definitions and properties

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

More information

Chuck Garner, Ph.D. May 25, 2009 / Georgia ARML Practice

Chuck Garner, Ph.D. May 25, 2009 / Georgia ARML Practice Some Chuck, Ph.D. Department of Mathematics Rockdale Magnet School for Science Technology May 25, 2009 / Georgia ARML Practice Outline 1 2 3 4 Outline 1 2 3 4 Warm-Up Problem Problem Find all positive

More information

1. Algebra 1.7. Prime numbers

1. Algebra 1.7. Prime numbers 1. ALGEBRA 30 1. Algebra 1.7. Prime numbers Definition Let n Z, with n 2. If n is not a prime number, then n is called a composite number. We look for a way to test if a given positive integer is prime

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

Number theory. Myrto Arapinis School of Informatics University of Edinburgh. October 9, /29

Number theory. Myrto Arapinis School of Informatics University of Edinburgh. October 9, /29 Number theory Myrto Arapinis School of Informatics University of Edinburgh October 9, 2014 1/29 Division Definition If a and b are integers with a 6= 0, then a divides b if there exists an integer c such

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

(a) 14 and 42 (b) 33 and 18 (c) 45 and 108 (d) 24 and 2039, given that 2039 is a prime number

(a) 14 and 42 (b) 33 and 18 (c) 45 and 108 (d) 24 and 2039, given that 2039 is a prime number Math 236: Discrete Mathematics with Applications Tutorial 2: 23 February 2012 1. Determine which of the following pairs of integers are relatively prime (give reasons for your answers): (a) 14 and 42 (b)

More information

Senior Math Circles Cryptography and Number Theory Week 2

Senior Math Circles Cryptography and Number Theory Week 2 Senior Math Circles Cryptography and Number Theory Week 2 Dale Brydon Feb. 9, 2014 1 Divisibility and Inverses At the end of last time, we saw that not all numbers have inverses mod n, but some do. We

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

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems Cryptography Introduction to Number Theory 1 Preview Integers Prime Numbers Modular Arithmetic Totient Function Euler's Theorem Fermat's Little Theorem Euclid's Algorithm 2 Introduction to Number Theory

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

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

inv lve a journal of mathematics 2009 Vol. 2, No. 2 Bounds for Fibonacci period growth mathematical sciences publishers Chuya Guo and Alan Koch

inv lve a journal of mathematics 2009 Vol. 2, No. 2 Bounds for Fibonacci period growth mathematical sciences publishers Chuya Guo and Alan Koch inv lve a journal of mathematics Bounds for Fibonacci period growth Chuya Guo and Alan Koch mathematical sciences publishers 2009 Vol. 2, No. 2 INVOLVE 2:2(2009) Bounds for Fibonacci period growth Chuya

More information

Outline. Some Review: Divisors. Common Divisors. Primes and Factors. b divides a (or b is a divisor of a) if a = mb for some m

Outline. Some Review: Divisors. Common Divisors. Primes and Factors. b divides a (or b is a divisor of a) if a = mb for some m Outline GCD and Euclid s Algorithm AIT 682: Network and Systems Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography Modulo Arithmetic Modular Exponentiation Discrete Logarithms

More information

Outline. AIT 682: Network and Systems Security. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms

Outline. AIT 682: Network and Systems Security. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms AIT 682: Network and Systems Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography Instructor: Dr. Kun Sun Outline GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation

More information

Simultaneous Linear, and Non-linear Congruences

Simultaneous Linear, and Non-linear Congruences Simultaneous Linear, and Non-linear Congruences CIS002-2 Computational Alegrba and Number Theory David Goodwin david.goodwin@perisic.com 09:00, Friday 18 th November 2011 Outline 1 Polynomials 2 Linear

More information

Perfect Power Riesel Numbers

Perfect Power Riesel Numbers Perfect Power Riesel Numbers Carrie Finch a, Lenny Jones b a Mathematics Department, Washington and Lee University, Lexington, VA 24450 b Department of Mathematics, Shippensburg University, Shippensburg,

More information

LECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS

LECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS LECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS 1. The Chinese Remainder Theorem We now seek to analyse the solubility of congruences by reinterpreting their solutions modulo a composite

More information