MATH 13150: Freshman Seminar Unit 10



Similar documents
The Euclidean Algorithm

5544 = = = Now we have to find a divisor of 693. We can try 3, and 693 = 3 231,and we keep dividing by 3 to get: 1

1. The RSA algorithm In this chapter, we ll learn how the RSA algorithm works.

15 Prime and Composite Numbers

8 Primes and Modular Arithmetic

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

Lesson 4. Factors and Multiples. Objectives

Intermediate Math Circles March 7, 2012 Linear Diophantine Equations II

FRACTIONS COMMON MISTAKES

MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS

An Introduction to the RSA Encryption Method

Math Workshop October 2010 Fractions and Repeating Decimals

Solving Rational Equations

Chapter 11 Number Theory

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Introduction to Fractions

Pre-Algebra Lecture 6

Homework until Test #2

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

Grade 7 & 8 Math Circles October 19, 2011 Prime Numbers

1. The Fly In The Ointment

If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C?

0.8 Rational Expressions and Equations

Grade 7/8 Math Circles Fall 2012 Factors and Primes

Ummmm! Definitely interested. She took the pen and pad out of my hand and constructed a third one for herself:

SAT Math Facts & Formulas Review Quiz

Grade 6 Math Circles March 10/11, 2015 Prime Time Solutions

Today s Topics. Primes & Greatest Common Divisors

Introduction to Fractions, Equivalent and Simplifying (1-2 days)

GCDs and Relatively Prime Numbers! CSCI 2824, Fall 2014!

Prime Factorization 0.1. Overcoming Math Anxiety

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Adding and Subtracting Fractions. 1. The denominator of a fraction names the fraction. It tells you how many equal parts something is divided into.

JUMP Math: Teacher's Manual for the Fractions Unit

8 Divisibility and prime numbers

Decimals and other fractions

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Math Matters: Why Do I Need To Know This? 1 Probability and counting Lottery likelihoods

Public Key Cryptography: RSA and Lots of Number Theory

s = s = s =

Vieta s Formulas and the Identity Theorem

Math 319 Problem Set #3 Solution 21 February 2002

Kenken For Teachers. Tom Davis June 27, Abstract

Determine If An Equation Represents a Function

MATHEMATICS. Y5 Multiplication and Division 5330 Square numbers, prime numbers, factors and multiples. Equipment. MathSphere

Primes in Sequences. Lee 1. By: Jae Young Lee. Project for MA 341 (Number Theory) Boston University Summer Term I 2009 Instructor: Kalin Kostadinov

DIVISIBILITY AND GREATEST COMMON DIVISORS

No Solution Equations Let s look at the following equation: 2 +3=2 +7

CONTENTS 1. Peter Kahn. Spring 2007

RSA Encryption. Tom Davis October 10, 2003

Greatest Common Factor and Least Common Multiple

Factorizations: Searching for Factor Strings

An Introduction to Number Theory Prime Numbers and Their Applications.

Session 7 Fractions and Decimals

Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

2.5 Zeros of a Polynomial Functions

Unit 6 Number and Operations in Base Ten: Decimals

SECTION 0.6: POLYNOMIAL, RATIONAL, AND ALGEBRAIC EXPRESSIONS

Part 1 Expressions, Equations, and Inequalities: Simplifying and Solving

Session 6 Number Theory

Computing exponents modulo a number: Repeated squaring

Quick Tricks for Multiplication

Some practice problems for midterm 2

Grade 7/8 Math Circles Sequences and Series

of Nebraska - Lincoln

Section 4.1 Rules of Exponents

Solution Guide Chapter 14 Mixing Fractions, Decimals, and Percents Together

Theorem3.1.1 Thedivisionalgorithm;theorem2.2.1insection2.2 If m, n Z and n is a positive

POLYNOMIAL FUNCTIONS

FRACTIONS MODULE Part I

HFCC Math Lab Arithmetic - 4. Addition, Subtraction, Multiplication and Division of Mixed Numbers

Basic numerical skills: EQUATIONS AND HOW TO SOLVE THEM. x + 5 = = (2-2) = = 5. x = 7-5. x + 0 = 20.

Hooray for the Hundreds Chart!!

INTRODUCTION TO FRACTIONS

The Chinese Remainder Theorem

Activity 1: Using base ten blocks to model operations on decimals

MATH 289 PROBLEM SET 4: NUMBER THEORY

Factoring Trinomials of the Form x 2 bx c

for the Bill Hanlon

Solution to Exercise 2.2. Both m and n are divisible by d, som = dk and n = dk. Thus m ± n = dk ± dk = d(k ± k ),som + n and m n are divisible by d.

Welcome to Basic Math Skills!

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Stupid Divisibility Tricks

Maths Workshop for Parents 2. Fractions and Algebra

Solution to Homework 2

Working with whole numbers

4.2 Euclid s Classification of Pythagorean Triples

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

Exponents and Radicals

Decimal Notations for Fractions Number and Operations Fractions /4.NF

Factoring Whole Numbers

CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen

8 Square matrices continued: Determinants

MATHS ACTIVITIES FOR REGISTRATION TIME

Math Circle Beginners Group October 18, 2015

SUM OF TWO SQUARES JAHNAVI BHASKAR

CONTENTS. Please note:

3. Mathematical Induction

Math 25 Activity 6: Factoring Advanced

Transcription:

MATH 13150: Freshman Seminar Unit 10 1. Relatively prime numbers and Euler s function In this chapter, we are going to discuss when two numbers are relatively prime, and learn how to count the numbers from 1 to n that share no common prime factors with n. This will be needed later for the RSA algorithm. 1.1. Relatively prime. We will say two numbers a and b are relatively prime if their greatest common divisor is 1. Remark 1.1. Two numbers a and b are relatively prime 1. No number bigger than 1 divides a and b 2. No prime number divides a and b 3. There is no prime number that appears in the prime factorizations of both a and b. For example, 28 and 15 are relatively prime. There are many ways we can see this. The easiest is to note that 28 = 2 2 7 and 15 = 3 5 are the prime factorizations of 28 and 15, and there is no prime appearing in both prime factorizations. If you really enjoy the Euclidean algorithm, you could work out the steps to get: 28 = 15 + 13 15 = 13 + 2 13 = 6 2 + 1 Since we found that 1 was a remainder, we know 1 = gcd(15, 28), so 28 and 15 are relatively prime. It is reassuring to know that we get the same answer whichever way we decide the question of whether 15 and 28 are relatively prime. In practice, we just use the easiest way. Since we can find the prime factorizations of 28 and 15 in a moment, there is no need to use the Euclidean algorithm here. The Euclidean algorithm is useful if we want to know whether 2091 and 2143 are relatively prime. You probably can t factor these numbers quickly, but the Euclidean algorithm is easy to work out: 2143 = 2091 + 52 2091 = 40 52 + 11 52 = 4 11 + 8 11 = 8 + 3 8 = 2 3 + 2 3 = 2 + 1 so gcd(2091, 2143) = 1. You could actually skip the last few steps by noting that gcd(2091, 2143) = gcd(2091, 52) = gcd(52, 11), and you can probably see that gcd(52, 11) = 1 since 11 is prime and doesn t divide 52. MORAL: If you can find prime factorizations of a and b, then you can decide if a and b are relatively prime easily. If not, the Euclidean algorithm is a reliable method. 1

2 EXAMPLE: Are 30 and 38 relatively prime? The answer is no. To see this, note that 2 divides 30 and 2 divides 38, so using condition 2. above, we see that 30 and 38 are not relatively prime. EXAMPLE: Are 55 and 90 relatively prime? Again, no. 5 divides both 55 and 90. EXAMPLE: Are 201 and 4329 relatively prime? No. 3 divides 201 since it divides 2+0+1 = 3, and 3 also divides 4329 since it divides 4 + 3 + 2 + 9 = 18. EXAMPLE: Are 32 and 2431 relatively prime? Yes (finally). 32 = 2 5 has 2 as its only prime factor. 2 does not divide 2431 since 2431 is odd. It follows that no prime can divide both 32 and 2431, so they are relatively prime. Note that prime and relatively prime are different conditions. We can say that a number is prime, but two numbers can be relatively prime whether or not either is prime. For example, 10 = 2 5 and 33 = 3 11 are relatively prime. To see that these different criteria for determining whether two numbers are relatively prime coincide is pretty easy. Let s see why two numbers a and b are relatively prime no prime appears in both of their prime factorizations. Certainly, if gcd(a, b) = 1, then by the criterion for computing gcd(a, b) at the bottom of page 8 from Unit 9, then no prime could appear in the prime factorizations of a and b. On the other hand, if no prime appears in the prime factorizations of a and b, then it is clear by the method of computing gcd(a, b) at the bottom of page 8 from Unit 9 that gcd(a, b) = 1. Similar arguments show that the other criteria in Remark 1.1 are equivalent. 1.2. The Euler φ-function. In this section, we ll think about the problem: PROBLEM: Pick a number n. How many numbers from 1 to n are relatively prime to n? Remark 1.2. We denote the number of numbers from 1 to n by φ(n). The symbol φ is a Greek letter usually pronounced fee (at least by me. You can check with a friend fluent in Greek). This symbol φ(n) was found by the Swiss mathematician Leonhard Euler. The name Euler is pronounced more or less the same as oiler. Let s try out some examples. COMPUTE φ(4). To solve this, list the numbers up to 4: 1, 2, 3, 4. Since 4 = 2 2, 1 and 3 are relatively prime to 4, but 2 and 4 are not. So the numbers from 1 to 4 relatively prime to 4 are 1, 3. Since there are two numbers on the list, the answer is φ(4) = 2. COMPUTE φ(12). The answer is φ(12) = 4. To see this, note that 12 = 2 2 3, so a number is relatively prime to 12 neither 2 nor 3 divide 12. The numbers from 1 to 12 not divisible by 2 or 3 are 1, 5, 7, 11, and there are 4 numbers on this list. So φ(12) = 4.

COMPUTE φ(11). The answer is φ(11) = 10. Since 11 is prime, none of the numbers from 1, 2, 3,..., 10 share a prime factor with 11, while 11 does share a prime factor with 11. So φ(11) = 10 since there are 10 numbers from 1 through 10. The same argument works with any prime number p. The numbers from 1 to p relatively prime to p are 1,..., p 1. Since there are p 1 numbers on this list, φ(p) = p 1. Remark 1.3. If p is a prime number, than φ(p) = p 1. For example, φ(23) = 22 since 23 is prime, and φ(103) = 102 since 103 is prime. Let s try computing φ(21). The prime factorization of 21 is 21 = 3 7. We can compute φ(21) by listing the numbers from 1 to 21 and counting the numbers that are not multiples of 3 or 7. An easy way to do that is to first cross out multiples of 3: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 and then crossing out also multiples of 7: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 There are 12 numbers left on the list, so φ(21) = 12. You could do the same thing for any number, but computing φ(200) by this method would take awhile. In the next section, we ll learn a simple formula for computing φ(n). 1.3. Formula for computing φ(n). TO COMPUTE φ(n) (due to Euler): Step 1: Find the prime factorization of n and make a list of the different primes dividing n. Step 2: Start with n and for each of the primes p on your list, multiply by p 1 p. The result is φ(n). More formally: e1 e2 e THEOREM: Let p 1 p 2 p k k be the prime factorization of n. Then φ(n) = n (p 1 1) (p 2 1) (p k 1). p 1 p 2 p k EXAMPLE: Compute φ(2 3 3 5 5 6 ). To do this, note that if n = 2 3 3 5 5 6, then (2 1) (3 1) (5 1) φ(n) = n 2 3 5 so after cancelling some fractions, we conclude: = 2 3 3 5 5 6 1 2 2 3 4 5, 3 φ(n) = 23 3 5 5 6 4 3 5 EXAMPLE: Compute φ(200). = 2 5 3 4 5 5.

4 Factor 200 = 2 3 5 2 into a product of primes. The primes dividing 200 are 2 and 5. Now apply Step 2 to get: φ(200) = 200 2 1 5 1 = 200 1 2 5 2 4 5 = 80. EXAMPLE: Compute φ(420). To solve this, factor 420 = 2 2 3 5 7, so the primes dividing 420 are 2, 3, 5, 7. Now apply Step 2 to get: φ(420) = 420 1 2 2 3 4 5 6 7 = 96, so φ(420) = 96. EXAMPLE: Compute φ(15750). Since 15750 = 2 3 2 5 3 7, the primes dividing 15750 are 2, 3, 5, 7. It follows that φ(15750) = 15750 1 2 2 3 4 5 6 7 = 3600. As you can see, we can easily compute φ(n) even when n is really big, provided we know the prime factorization of n. This formula of Euler s is a major labor-saving device. In the next section, we ll give an argument explaining why this formula for computing φ(n) works. For now, let s check that the formula works in some of the examples we worked out in the last section. EXAMPLE: Compute φ(11) using the formula. The prime factorization of 11 is 11 = 11 1, so 11 is the only prime dividing 11. By the formula for computing φ(n), we get φ(11) = 11 10 11 = 10, which agrees with the answer we found in the last section. EXAMPLE: Compute φ(12). Since 4 = 2 2, 2 is the only prime dividing 4, so φ(4) = 2 2 1 2 = 2, which agrees with our previous answer. EXAMPLE: Compute φ(21). Since 21 = 3 7, 3 and 7 are the primes dividing 7, so φ(21) = 21 2 3 6 7 = 12, which again agrees with the answer we got in the last section. The formula seems to work in examples, which is reassuring. I ll close this section with two comments:

(1) Never forget that φ(n) counts the numbers from 1 to n relatively prime to n. (2) A really common mistake for students to make is to forget to factor the numbers completely as a product of primes. Do NOT make the mistake of writing 20 = 4 5 and saying that φ(20) should then be 20 3 4 4 = 12. This gives the wrong answer, 5 because we know the right answer is 8. The point is we have to factor 20 completely, as 20 = 2 2 5, so φ(20) = 20 1 2 4 5 = 8. CONSEQUENCE: Let n = p 1 e1 p 2 e2 p k e k φ(n) = φ(p 1 e 1 ) φ(p 2 e 2 ) φ(p k e k ). be the prime factorization of n. Then This follows from the observation that for p prime and e any positive number, φ(p e ) = p e (p 1). Let s see how it works in an example. Take n = 2 3 7 2 11 3. The Theorem p computing φ(n) tells us that φ(n) = n 2 1 7 1 11 1 = 2 3 7 2 11 3 2 1 7 1 11 1 2 7 11 2 7 11. We can rearrange the factors to see that: φ(n) = 2 3 2 1 7 2 7 1 11 3 11 1 2 7 11. But φ(2 3 ) = 2 3 2 1 2, and φ(72 ) = 7 2 7 1 7, and φ(113 ) = 11 3 11 1, so from 11 this, we see that φ(n) = φ(2 3 ) φ(7 2 ) φ(11 3 ). 1.4. Why this works. Let s see how to compute φ(175) in two different ways. Since 175 = 5 2 7, we can see in a flash that φ(175) = 175 4 5 6 7 = 120. Now let s try to compute it without using the formula. We should list the numbers from 1 to 175 and cross out all multiples of 5 or 7. But we know how to do this already!! We re trying to count the numbers from 1 to 175 that are multiples of 5 or 7. Let s say this number is N. Then by the subtraction principle, the number of numbers left should be 175 N. Let s see if this equals 120. We certainly know that the # of numbers from 1 to 175 that are multiples of 5 or 7 is: # of numbers that are multiples of 5 + # of numbers that are multiples of 7 - # of numbers that are multiples of 5 and 7 Since joint multiples of 5 and 7 are multiples of 35, we can rewrite this as: # of numbers that are multiples of 5 + # of numbers that are multiples of 7 - # of numbers that are multiples of 35 5

6 There are 175 = 35 numbers from 1 to 175 that are multiples of 5 (as we learned to 5 do in Unit 1). There are 175 = 25 numbers from 1 to 175 that are multiples of 7. 7 There are 175 = 5 numbers from 1 to 175 that are multiples of 35. 35 Putting this together, we see that there are: 35 + 25 5 = 55 numbers from 1 to 175 that are multiples of 5 or 7, so there are: 175 55 = 120 numbers from 1 to 175 that are not divisible by 5 or 7. This means that we have shown that φ(175) = 120 without actually listing all numbers and crossing out some of them. At the beginning of this section, we found that φ(175) = 120 using the formula from the last section. This means that we have verified that the formula is correct in this case. For any number n that is a product of only two primes, the same kind of argument will show that our formula for φ(n) is correct. Arguments along these lines can show that for any n, our formula for φ(n) is correct. I ll spare you, but if you re really interested, you can take the graduate level math course I ll teach in the fall:) EXERCISES: Explain your answer. (1) Determine whether each of the following pairs of numbers is relatively prime? (hint: you should only need the Euclidean algorithm for two of these) (a) 24 and 68 (i.e., are 24 and 68 relatively prime?). (b) 309 and 471 (c) 405 and 1235 (d) 1031 and 1097 (e) 527 and 697 (f) 13 and 1411 (g) 13 and 2639 (h) 32 and 2035 (i) 32 and 2034 (2) Compute the following: (a) φ(69) (b) φ(256) (c) φ(205) (d) φ(729) (e) φ(77) (f) φ(2) (g) φ(1, 000, 000, 000)

(3) List the numbers from 1 to 36 that are relatively prime to 36. Count them. Does your answer agree with the formula for φ(36). (4) Compute the following. You may want to use the first few to guess the answer for the last part: (a) φ(2 2 ) (b) φ(2 3 ) (c) φ(2 4 ) (d) φ(2 5 ) (e) φ(2 123 ) (f) φ(2 k ) for any number k. (5) Look at all the computed values of φ(n) in this section besides φ(2) = 1. How many of them are odd? Make a guess as to how many numbers n there are greater than 2 so that φ(n) is odd. Try to explain why your guess is correct using the formula for computing φ(n). (6) (a) How many numbers are there from 1 to 90 relatively prime to 90? (hint: this is very easy using what we did in this section). (b) How many numbers are there from 1 to 180 that are relatively prime to 90? (hint: what s the relation between being relatively prime to 90 and relatively prime to 180?) (c) How many numbers are there from 1 to 270 that are relatively prime to 90? (7) Find a number n so that φ(n) = 24 (hint: this may require some playing around. If you don t have a better idea, just compute φ(n) for a bunch of numbers until you get 24 as your answer). 7