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

Similar documents
Math 109 HW 9 Solutions

Discrete Mathematics with Applications MATH236

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

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

Homework #2 solutions Due: June 15, 2012

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

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

Math 324, Fall 2011 Assignment 7 Solutions. 1 (ab) γ = a γ b γ mod n.

Lecture 4: Number theory

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

7.2 Applications of Euler s and Fermat s Theorem.

The Chinese Remainder Theorem

Number Theory Proof Portfolio

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

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

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

Notes on Primitive Roots Dan Klain

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

Rings and modular arithmetic

Number Theory Solutions Packet

The Fundamental Theorem of Arithmetic

CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor

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

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

Chapter 5. Number Theory. 5.1 Base b representations

PRACTICE PROBLEMS: SET 1

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

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

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

18. Cyclotomic polynomials II

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

Notes on Systems of Linear Congruences

MATH 145 Algebra, Solutions to Assignment 4

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

CISC-102 Fall 2017 Week 6

4 Powers of an Element; Cyclic Groups

Wilson s Theorem and Fermat s Little Theorem

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

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?

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

1 Structure of Finite Fields

ECE596C: Handout #11

Solutions to Practice Final

Olympiad Number Theory Through Challenging Problems

Sums of Squares. Bianca Homberg and Minna Liu

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

3.2 Solving linear congruences. v3

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.

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

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

1 Overview and revision

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

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

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

A Readable Introduction to Real Mathematics

NOTES ON INTEGERS. 1. Integers

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

Number theory (Chapter 4)

Mathematical Foundations of Public-Key Cryptography

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

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,

MATH10040 Chapter 1: Integers and divisibility

CS2800 Questions selected for fall 2017

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

7. Prime Numbers Part VI of PJE

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

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

1. multiplication is commutative and associative;

A SURVEY OF PRIMALITY TESTS

Some Own Problems In Number Theory

2.2 Inverses and GCDs

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

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

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

Proof by Contradiction

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

Chapter 5: The Integers

MATH 310: Homework 7

5: The Integers (An introduction to Number Theory)

MATH 420 FINAL EXAM J. Beachy, 5/7/97

Winter Camp 2009 Number Theory Tips and Tricks

8 Primes and Modular Arithmetic

CHAPTER 3. Congruences. Congruence: definitions and properties

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

1. Algebra 1.7. Prime numbers

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.

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

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?

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

Senior Math Circles Cryptography and Number Theory Week 2

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

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems

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

NOTES ON SIMPLE NUMBER THEORY

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

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. AIT 682: Network and Systems Security. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms

Simultaneous Linear, and Non-linear Congruences

Perfect Power Riesel Numbers

LECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS

Transcription:

Math 152, Problem Set 2 solutions (2018-01-24) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1 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 + 1 1 + 1 + 1 + 1 + 1 5 (mod p). But we assumed p x 4 + x 3 + x 2 + x + 1, i.e. x 4 + x 3 + x 2 + x + 1 0 (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

Suppose d = y 1 0 (mod 5). Then y 1 (mod 5). But then d = y 2 +y+1 1 + 1 + 1 3 (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+1 4 + 2 + 1 2 (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 (2018-01-12).) 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 + 6 3 n + 6 6 n 6 (mod 15). 6 2 n + 6 3 n + 6 6 n = 3 2 φ(m) + 2 3 φ(m) + 6 φ(m), and by Euler s theorem this is equivalent to 3 + 2 + 1 = 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: 2 4 1 (mod 15), so 2 4+n 2 n (mod 15) for all n 0. 3 5 3 (mod 15), so 3 4+n 3 n (mod 15) for all n 1. 6 2 6 (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) 0 3 1 11 2 4 3 11 4 13 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 = 3 2 7. Computing (p 1)p s 1 for these two factors, we get (3 1) 3 = 6, (7 1) 1 = 6. 2

Thus by Corollary 4.2 of the lecture notes (2018-01-19), 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 = 6. 4. 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 = 2 3 5 3, 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 5 3 1 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

(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 2 3 3 2 1. By Lemma 3.3 of the lecture notes (2018-01-17), 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 = 2 5 2 x so we get 7 y = 2 x 9 9 23 (mod 32). We have 7 3 23 (mod 32) and 7 4 1 (mod 32) so we deduce that y 3 (mod 4). We also have 7 4 1 (mod 5), and 7 3 3 (mod 5). Thus the condition y 3 (mod 4) implies that 2 x = 7 y +9 3+9 2 (mod 5). Since 2 4 1 (mod 5) but 2 2 1 (mod 5), this implies that x 1 (mod 4). Next observe that 2 x = 7 y + 9 2 (mod 7). Since 2 3 1 (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 2 12 7 12 1 (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

Finally, we use that 2 36 1 (mod 37) and 7 9 1 (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