Homework 3, solutions

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

MATH10040: Numbers and Functions Homework 1: Solutions

5: The Integers (An introduction to Number Theory)

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

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

MATH FINAL EXAM REVIEW HINTS

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures

Number Theory and Graph Theory. Prime numbers and congruences.

CHAPTER 1 REAL NUMBERS KEY POINTS

Course: CS1050c (Fall '03) Homework2 Solutions Instructor: Prasad Tetali TAs: Kim, Woo Young: Deeparnab Chakrabarty:

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

Ch 4.2 Divisibility Properties

Arithmetic Algorithms, Part 1

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have

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

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

2. THE EUCLIDEAN ALGORITHM More ring essentials

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

NOTES ON SIMPLE NUMBER THEORY

Chapter 5.1: Induction

M381 Number Theory 2004 Page 1

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

CS250: Discrete Math for Computer Science

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

Chapter 5: The Integers

NOTES ON INTEGERS. 1. Integers

cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications

Lecture Notes. Advanced Discrete Structures COT S

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

PRACTICE PROBLEMS: SET 1

CSE 311: Foundations of Computing. Lecture 12: Two s Complement, Primes, GCD

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

Introduction Integers. Discrete Mathematics Andrei Bulatov

Number Theory Proof Portfolio

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

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

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

Section 4.1: Sequences and Series

. As the binomial coefficients are integers we have that. 2 n(n 1).

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

Lecture 7.5: Euclidean domains and algebraic integers

MATH 145 Algebra, Solutions to Assignment 4

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

7. Prime Numbers Part VI of PJE

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

God may not play dice with the universe, but something strange is going on with the prime numbers.

Lecture Notes Math 371: Algebra (Fall 2006) by Nathanael Leedom Ackerman

1 Overview and revision

Chapter 2. Divisibility. 2.1 Common Divisors

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Divisibility of Natural Numbers

The theory of numbers

Solutions to Practice Final

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

Discrete Structures Lecture Primes and Greatest Common Divisor

Chapter V. Theory of the Integers. Mathematics is the queen of the sciences and number theory is the queen of mathematics. Carl Friedrich Gauss

Solutions Math 308 Homework 9 11/20/2018. Throughout, let a, b, and c be non-zero integers.

Basic elements of number theory

Basic elements of number theory

4 Powers of an Element; Cyclic Groups

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

Math1a Set 1 Solutions

Chapter 14: Divisibility and factorization

MATH 361: NUMBER THEORY FOURTH LECTURE

Solutions to Assignment 1

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

and LCM (a, b, c) LCM ( a, b) LCM ( b, c) LCM ( a, c)

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

MATHEMATICS X l Let x = p q be a rational number, such l If p, q, r are any three positive integers, then, l that the prime factorisation of q is of t

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

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Math 110 HW 3 solutions

Discrete Mathematics. Spring 2017

Some Facts from Number Theory

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

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

Notes for Recitation 6

8 Primes and Modular Arithmetic

Chapter 5. Number Theory. 5.1 Base b representations

Chapter 1 A Survey of Divisibility 14

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

An Algorithm for Prime Factorization

Math 109 HW 9 Solutions

Math 3450 Homework Solutions

With Question/Answer Animations. Chapter 4

CSE20: Discrete Mathematics

Properties of the Integers

Algorithmic number theory. Questions/Complaints About Homework? The division algorithm. Division

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications

PROBLEM SET 1 SOLUTIONS 1287 = , 403 = , 78 = 13 6.

A number that can be written as, where p and q are integers and q Number.

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

Induction. Induction. Induction. Induction. Induction. Induction 2/22/2018

1. multiplication is commutative and associative;

Senior Math Circles Cryptography and Number Theory Week 2

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Discrete valuation rings. Suppose F is a field. A discrete valuation on F is a function v : F {0} Z such that:

Transcription:

Homework 3, solutions Problem 1. Read the proof of Proposition 1.22 (page 32) in the book. Using simialr method prove that there are infinitely many prime numbers of the form 3n 2. Solution. Note that every prime number different from 3 is either of the form 3k1 or of the form 3k 2. Note also that a product of any 2 numbers of the form 3k 1 is again of this form: (3a 1)(3b 1) = 3(3ab a b) 1. It follows that any positive integer n of the form 3k 2 must have a prime divisor of the form 3k 2. Indeed, otherwise all prime divisors of n would be of the form 3k 1 (note that 3 n) and n would be a product of these primes, hence it would again be of the form 3k 1. Now we can follow Euclid s proof that the set of all primes is infinite. Suppose that p 1,..., p m are odd primes of the form 3k 2. Consider the number N = 3p 1 p 2... p m 2. As we noticed above, N must have a prime divisor p of the form 3k 2 and this divisor must be odd, as N is odd. But none of the odd primes p 1,..., p m can divide N (as they all divide N 2) so p must be a new odd prime of the form 3k 2. Remark. Alternatively, one could look at n! 1, which is of the form 3k 2 for n 3, and conclude that it must have a prime divisor of the form 3k 2 and any such divisor is bigger than n. Problem 2. Let a > 1 and n > 1 be positive integers. a) Prove that if a n 1 is a prime then a = 2 and n is a prime. b) Prove that if a n 1 is a prime then a is even and n = 2 k for some k (Hint: if n is not a power of 2 then n has an odd divisor). Hint. The identity a n b n = (a b)(a n 1 a n 2 b a n 3 b 2... ab n 2 b n 1 ) should be helpful. Prove this identity. Solution. a) Recall that we proved that a n 1 = (a 1)(1 a a 2... a n 1 ). 1

If a > 2 then this identity provides a factorization of a n 1 into two factors bigger than 1, hence a n 1 cannot be a prime number. Suppose now that a = 2. If n is not a prime, then n = kl for some integers k > 1, l > 1. Note that a n = (a l ) k and our identity yields a n 1 = (a l ) k 1 = (a l 1)(1 a l (a l ) 2... (a l ) n 1 ) so a n 1 is not a prime. Thus when a n 1 is a prime we must have a = 2 and n has to be a prime. b) The resoning here is similar to the one in a) but it is based on the identity a n 1 = (a 1)(1 a a 2... a n 1 ), which holds for all odd natural numbers n. This identity follows from the identity used in a) by observing that for n odd we have a n 1 = (( a) n 1) = (( a) 1)(1 ( a) ( a) 2... ( a) n 1 ) = (a 1)(1 a a 2... a n 1. Suppose now that n is not a power of 2. Then n = kl for some odd k > 1. Thus a n 1 = (a l ) k 1 = (a l 1)(1 a l (a l ) 2... (a l ) k 1 ) i.e. a n 1 factors into a product of two integers bigger than 1. Thus a n 1 cannot be a prime. In other words, if a n 1 is a prime, then n must be a power of 2. Moreover, as a n 1 > 2, a n 1 must be odd, hence a must be even. Remark. The identity in the hint follows from the identity used in a). We have ( a ) n ( a ) ( ( a ) ( a ) 2 ( a ) ) n 1 1 = b b 1 1.... b b b Multiply both sides by b n to get the identity in the hint. Problem 3. Recall that when p is a prime number and n 0 an integer then e p (n) is the largest integer a such that p a n. a) Prove that if n > 1 and p > n is a prime then e p (n!) = 0 2

b) Recall thal x denotes the largest integer not exceeding x. Prove that if n, k are positive integers then n 1 n = k k 1 n k if k (n 1). if k (n 1) c) Prove that if n > 1 and p n is a prime then n n n e p (n!) =... p p 2 p 3 (note that the sum is actually finite since n/p k = 0 when p k > n. Hint. There are several ways to prove this, but I suggest a proof by induction on n. Note that e p ((n 1)!) = e p (n!) e p (n 1) and use part b) (this is why b) is part of this problem). d) Use c) to write the prime factorization of 20!. e) Find the number of zeros with which the decimal representation of 99! terminates. Solution. a) Note that if p > k > 0 then e p (k) = 0. Recall that e p (ab) = e p (a) e p (b). It follows that when p > n. e p (n!) = e p (2) e p (3)... e p (n) = 0 b) Let m = n/k. Then m n/k < (m1), so km n < k(m1). It follows that km < n 1 k(m 1) (we are using here a simple but very useful observation that if a < b are integers then a 1 b). If k (n 1), then we cannot have equality on the right, i.e. km < n1 < k(m1). This means that m < (n1)/k < (m1), i.e m = (n 1)/k. On the other hand, if k (n 1) then from km < n 1 k(m 1) we conclude that n 1 = k(m 1), so m 1 = (n 1)/k = (n 1)/k. c) First note that we do not need to assume that p n as for p > n the right hand side of the formula is clearly 0 and the left hand side is also 0 by part a). We use induction on n. For n = 2 we already now that the formula works when p > 2 and for p = 2 it clearly works as well. 3

Suppose that the formula works for all primes and numbers n = 2, 3,... N. We want to show that it works when n = N 1. Consider a prime number p. So we know that e p (N!) = N p N N.... Let e p (N 1) = k. Then p i N 1 for i k and p i N 1 for i > k. By part b) we have N 1 N = p i 1 p 2 p i N p i It follows that N 1 N 1 N 1... = k p p 2 p 3 p 3 if i > k. if i k N p e P (N 1) e p (N!) = e p ((N 1)!). N N... = Thus the formula indeed works for N 1. By the method of induction, the formula is true for all prime numbers p and all integers n 2. d) By a), we know that only primes smaller than 20 will contribute to 20!. Now we use our formula from c) to compute the contributions of the primes up to 20: 20 20 20 20 e 2 (20!) = = 10 2 1 = 18. 2 4 8 16 20 e 3 (20!) = = 6 2 = 8. 3 9 e (20!) = = 4. e 7 (20!) = = 2. 7 e 11 (20!) = = 1. 11 e 13 (20!) = = 1. 13 e 17 (20!) = = 1. 17 p 2 p 3 4

e 19 (20!) = Thus 20! = 2 18 3 8 4 7 2 11 13 17 19. = 1. 19 e) Note that the number of zeros with which the decimal representation of some nunber n terminates is euqal to the highest power of 10 which divides n. Since 10 = 2, the highest power of 10 dividing n is equal to the smaller of the numbers e 2 (n) and e (n). Now, by part c), we have 99 99 99 2 4 8 e 2 (99!) = and e (99!) = Thus 99! ends with 22 zeros. 16 32 = 492412631 = 9 64 = 19 3 = 22. 2 Problem 4. a) Suppose that a prime p divides both ab and c. Then, by Euclid s Lemma, p divides either a or b. This however is not possible, as both gcd(a, c) = 1 and gcd(b, c) = 1. Thus ab and c cannot have any common prime divisors, hence gcd(ab, c) = 1. b) Suppose that a prime p divides both a n and b m. By Euclid s Lemma, p divides a and p divides b. This however contradicts our assumption that gcd(a, b) = 1. Thus a n, b m cannot have any common prime divisors, hence gcd(a n, b m ) = 1. c) If d a and d b then d a n and d b m so d = 1, as gcd(a n, b m ) = 1. Thus gcd(a, b) = 1. d) Let d = gcd(a, b) so a = da 1, b = db 1 and gcd(a 1, b 1 ) = 1. Since (da 1 ) n (db 1 ) n then a n 1 b n 1. However, gcd(a n 1, b n 1) = 1 by part b). Thus a n 1 = 1, so a 1 = 1 and d = a. It follows that a b.