ACHS Math Team Notes on Factoring and Prime Numbers Peter S. Simon 1 November 2007

Similar documents
Prime Factorization, Greatest Common Factor (GCF), and Least Common Multiple (LCM)

6.1 The Greatest Common Factor; Factoring by Grouping

15 Prime and Composite Numbers

Today s Topics. Primes & Greatest Common Divisors

Session 6 Number Theory

CISC - Curriculum & Instruction Steering Committee. California County Superintendents Educational Services Association

Greatest Common Factor and Least Common Multiple

Prime Time: Homework Examples from ACE

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

1. When the least common multiple of 8 and 20 is multiplied by the greatest common factor of 8 and 20, what is the result?

Chapter 11 Number Theory

17 Greatest Common Factors and Least Common Multiples

Day One: Least Common Multiple

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

Lowest Common Multiple and Highest Common Factor

The Euclidean Algorithm

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

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

Greatest Common Factors and Least Common Multiples with Venn Diagrams

Prime Factorization 0.1. Overcoming Math Anxiety

Lesson 4. Factors and Multiples. Objectives

FACTORS, PRIME NUMBERS, H.C.F. AND L.C.M.

MATH10040 Chapter 2: Prime and relatively prime numbers

An Introduction to Number Theory Prime Numbers and Their Applications.

The Greatest Common Factor; Factoring by Grouping

Introduction to Fractions

Previously, you learned the names of the parts of a multiplication problem. 1. a. 6 2 = 12 6 and 2 are the. b. 12 is the


Calculate Highest Common Factors(HCFs) & Least Common Multiples(LCMs) NA1

Factoring - Greatest Common Factor

1.5 Greatest Common Factor and Least Common Multiple

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

Homework until Test #2

Factoring Whole Numbers

Chapter 5. Rational Expressions

2.6 Exponents and Order of Operations

In the above, the number 19 is an example of a number because its only positive factors are one and itself.

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Section 4.1 Rules of Exponents

Factorizations: Searching for Factor Strings

When factoring, we look for greatest common factor of each term and reverse the distributive property and take out the GCF.

Prime Numbers A prime number is a whole number, greater than 1, that has only 1 an itself as factors.

26 Integers: Multiplication, Division, and Order

Tests for Divisibility, Theorems for Divisibility, the Prime Factor Test

5-1 NUMBER THEORY: DIVISIBILITY; PRIME & COMPOSITE NUMBERS 210 f8

Factoring Polynomials

Just the Factors, Ma am

Integer Factorization using the Quadratic Sieve

3.1. RATIONAL EXPRESSIONS

The last three chapters introduced three major proof techniques: direct,

CONTENTS. Please note:

Multiplying and Dividing Fractions

SIMPLIFYING ALGEBRAIC FRACTIONS

Math 319 Problem Set #3 Solution 21 February 2002

Math 10C. Course: Polynomial Products and Factors. Unit of Study: Step 1: Identify the Outcomes to Address. Guiding Questions:

Factoring. Factoring 1

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

MATH 289 PROBLEM SET 4: NUMBER THEORY

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

Common Multiples. List the multiples of 3. The multiples of 3 are 3 1, 3 2, 3 3, 3 4,...

Not for resale. 4.1 Divisibility of Natural Numbers 4.2 Tests for Divisibility 4.3 Greatest Common Divisors and Least Common Multiples

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

Grade 7/8 Math Circles Fall 2012 Factors and Primes

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

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

This is Factoring and Solving by Factoring, chapter 6 from the book Beginning Algebra (index.html) (v. 1.0).

NF5-12 Flexibility with Equivalent Fractions and Pages

1. There are two semi trucks that come past my house. The first one comes past every 80

FINDING THE LEAST COMMON DENOMINATOR

Working with whole numbers

Math 25 Activity 6: Factoring Advanced

Student Outcomes. Lesson Notes. Classwork. Discussion (10 minutes)

Notes on Factoring. MA 206 Kurt Bryan

SAT Math Facts & Formulas Review Quiz

MATH Fundamental Mathematics IV

Test1. Due Friday, March 13, 2015.

Scientific Notation. Section 7-1 Part 2

Factoring Algorithms

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

The GMAT Guru. Prime Factorization: Theory and Practice

Handout NUMBER THEORY

1.3 Polynomials and Factoring

Factor Trees. Objective To provide experiences with finding the greatest common factor and the least common multiple of two numbers.

Students will be able to simplify and evaluate numerical and variable expressions using appropriate properties and order of operations.

The application of prime numbers to RSA encryption

RSA Encryption. Tom Davis October 10, 2003

Grade 6 Math Circles. Binary and Beyond

Factoring Algebra- Chapter 8B Assignment Sheet

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

MATH 22. THE FUNDAMENTAL THEOREM of ARITHMETIC. Lecture R: 10/30/2003

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

Factoring Polynomials

Category 3 Number Theory Meet #1, October, 2000

How do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left.

CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen

Math 10C: Numbers, Radicals, and Exponents PRACTICE EXAM

8 Primes and Modular Arithmetic

Chapter 7 - Roots, Radicals, and Complex Numbers

Factoring and Applications

Negative Integer Exponents

Transcription:

ACHS Math Team Notes on Factoring and Prime Numbers Peter S. Simon 1 November 2007

Prime Numbers The Sieve of Eratosthenes Recall that the prime numbers are natural numbers having exactly two distinct factors (the number itself and 1). The most efficient way to find all of the small primes (say all those less than 10,000,000) is by using the Sieve of Eratosthenes (ca 240 BC): 1. Start with a list of natural numbers from 2 to, say, 37. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

Prime Numbers The Sieve of Eratosthenes Recall that the prime numbers are natural numbers having exactly two distinct factors (the number itself and 1). The most efficient way to find all of the small primes (say all those less than 10,000,000) is by using the Sieve of Eratosthenes (ca 240 BC): 1. Start with a list of natural numbers from 2 to, say, 37. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 2. The first number 2 is prime. Retain it, but cross out all multiples of 2 in the list. 2 3 4/ 5 6/ 7 8/ 9 10/ 11 12/ 13 14/ 15 16/ 17 18/ 19 20/ 21 22/ 23 24/ 25 26/ 27 28/ 29 30/ 31 32/ 33 34/ 35 36/ 37

Prime Numbers The Sieve of Eratosthenes Recall that the prime numbers are natural numbers having exactly two distinct factors (the number itself and 1). The most efficient way to find all of the small primes (say all those less than 10,000,000) is by using the Sieve of Eratosthenes (ca 240 BC): 1. Start with a list of natural numbers from 2 to, say, 37. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 2. The first number 2 is prime. Retain it, but cross out all multiples of 2 in the list. 2 3 4/ 5 6/ 7 8/ 9 10/ 11 12/ 13 14/ 15 16/ 17 18/ 19 20/ 21 22/ 23 24/ 25 26/ 27 28/ 29 30/ 31 32/ 33 34/ 35 36/ 37 3. The first remaining number 3 is prime. Retain it, but cross out all multiples of 3 in the list. 2 3 4/ 5 6/ 7 8 / 9 / 10/ 11 12/ 13 14 / 15 / 16/ 17 18/ 19 20 / 21 / 22/ 23 24/ 25 26 / 27 / 28/ 29 30/ 31 32 / 33 / 34/ 35 36/ 37

3 Prime Numbers The Sieve of Eratosthenes (Cont.) 4. The first remaining number 5 is prime. Retain it, but cross out all multiples of 5 in the list. 2 3 4/ 5 6/ 7 8 / 9 / 10/ 11 12/ 13 14 / 15 / 16/ 17 18/ 19 20 / 21 / 22/ 23 24/ 25 / 26 / 27 / 28/ 29 30/ 31 32 / 33 / 34 / 35 / 36/ 37

Prime Numbers The Sieve of Eratosthenes (Cont.) 4. The first remaining number 5 is prime. Retain it, but cross out all multiples of 5 in the list. 2 3 4/ 5 6/ 7 8 / 9 / 10/ 11 12/ 13 14 / 15 / 16/ 17 18/ 19 20 / 21 / 22/ 23 24/ 25 / 26 / 27 / 28/ 29 30/ 31 32 / 33 / 34 / 35 / 36/ 37 5. The first remaining number 7 is prime. Retain it, but cross out all multiples of 7 in the list. 2 3 4/ 5 6 / 7 / 8 / 9 / 10/ 11 12/ 13 14 / 15 / 16/ 17 18/ 19 20 / 21 / 22/ 23 24/ 25 / 26 / 27 / 28/ 29 30/ 31 32 / 33 / 34 / 35 / 36/ 37

Prime Numbers The Sieve of Eratosthenes (Cont.) 4. The first remaining number 5 is prime. Retain it, but cross out all multiples of 5 in the list. 2 3 4/ 5 6/ 7 8 / 9 / 10/ 11 12/ 13 14 / 15 / 16/ 17 18/ 19 20 / 21 / 22/ 23 24/ 25 / 26 / 27 / 28/ 29 30/ 31 32 / 33 / 34 / 35 / 36/ 37 5. The first remaining number 7 is prime. Retain it, but cross out all multiples of 7 in the list. 2 3 4/ 5 6 / 7 / 8 / 9 / 10/ 11 12/ 13 14 / 15 / 16/ 17 18/ 19 20 / 21 / 22/ 23 24/ 25 / 26 / 27 / 28/ 29 30/ 31 32 / 33 / 34 / 35 / 36/ 37 6. The first remaining number is 11 > 37 so we do not need to check for multiples of it or any of the other remaining numbers in the list (why?). All the remaining numbers in the list are primes: 2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37

GCF: Greatest Common Factor The greatest common factor (GCF) of two natural numbers is the greatest factor that divides both of the numbers. Examples: GCF(2, 3) = 1, GCF(2, 4) = 2, GCF(10, 15) = 5.

GCF: Greatest Common Factor The greatest common factor (GCF) of two natural numbers is the greatest factor that divides both of the numbers. Examples: GCF(2, 3) = 1, GCF(2, 4) = 2, GCF(10, 15) = 5. To find the GCF of two numbers:

GCF: Greatest Common Factor The greatest common factor (GCF) of two natural numbers is the greatest factor that divides both of the numbers. Examples: GCF(2, 3) = 1, GCF(2, 4) = 2, GCF(10, 15) = 5. To find the GCF of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may require a zero exponent).

GCF: Greatest Common Factor The greatest common factor (GCF) of two natural numbers is the greatest factor that divides both of the numbers. Examples: GCF(2, 3) = 1, GCF(2, 4) = 2, GCF(10, 15) = 5. To find the GCF of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may require a zero exponent). 2. Multiply each factor the lesser number of times that it occurs in either factor.

GCF: Greatest Common Factor The greatest common factor (GCF) of two natural numbers is the greatest factor that divides both of the numbers. Examples: GCF(2, 3) = 1, GCF(2, 4) = 2, GCF(10, 15) = 5. To find the GCF of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may require a zero exponent). 2. Multiply each factor the lesser number of times that it occurs in either factor. Example: Find GCF(90, 24)

GCF: Greatest Common Factor The greatest common factor (GCF) of two natural numbers is the greatest factor that divides both of the numbers. Examples: GCF(2, 3) = 1, GCF(2, 4) = 2, GCF(10, 15) = 5. To find the GCF of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may require a zero exponent). 2. Multiply each factor the lesser number of times that it occurs in either factor. Example: Find GCF(90, 24) Prime factors of 90: 2 1 3 2 5 1

GCF: Greatest Common Factor The greatest common factor (GCF) of two natural numbers is the greatest factor that divides both of the numbers. Examples: GCF(2, 3) = 1, GCF(2, 4) = 2, GCF(10, 15) = 5. To find the GCF of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may require a zero exponent). 2. Multiply each factor the lesser number of times that it occurs in either factor. Example: Find GCF(90, 24) Prime factors of 90: 2 1 3 2 5 1 Prime factors of 24: 2 3 3 1 5 0

GCF: Greatest Common Factor The greatest common factor (GCF) of two natural numbers is the greatest factor that divides both of the numbers. Examples: GCF(2, 3) = 1, GCF(2, 4) = 2, GCF(10, 15) = 5. To find the GCF of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may require a zero exponent). 2. Multiply each factor the lesser number of times that it occurs in either factor. Example: Find GCF(90, 24) Prime factors of 90: 2 1 3 2 5 1 Prime factors of 24: 2 3 3 1 5 0 Therefore, GCF(90, 24) = 2 1 3 1 5 0 = 6.

5 LCM: Least Common Multiple A common multiple is a number that is a multiple of two or more numbers. The common multiples of 3 and 4 are 0, 12, 24,... The least common multiple (LCM) of two numbers is the smallest number (not zero) that is a multiple of both. So LCM(3, 4) = 12. To find the LCM of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may reqire a zero exponent).

5 LCM: Least Common Multiple A common multiple is a number that is a multiple of two or more numbers. The common multiples of 3 and 4 are 0, 12, 24,... The least common multiple (LCM) of two numbers is the smallest number (not zero) that is a multiple of both. So LCM(3, 4) = 12. To find the LCM of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may reqire a zero exponent). 2. Multiply each factor the greater number of times that it occurs in either factor.

LCM: Least Common Multiple A common multiple is a number that is a multiple of two or more numbers. The common multiples of 3 and 4 are 0, 12, 24,... The least common multiple (LCM) of two numbers is the smallest number (not zero) that is a multiple of both. So LCM(3, 4) = 12. To find the LCM of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may reqire a zero exponent). 2. Multiply each factor the greater number of times that it occurs in either factor. Example: Find LCM(90, 24)

5 LCM: Least Common Multiple A common multiple is a number that is a multiple of two or more numbers. The common multiples of 3 and 4 are 0, 12, 24,... The least common multiple (LCM) of two numbers is the smallest number (not zero) that is a multiple of both. So LCM(3, 4) = 12. To find the LCM of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may reqire a zero exponent). 2. Multiply each factor the greater number of times that it occurs in either factor. Example: Find LCM(90, 24) Prime factors of 90: 2 1 3 2 5 1

5 LCM: Least Common Multiple A common multiple is a number that is a multiple of two or more numbers. The common multiples of 3 and 4 are 0, 12, 24,... The least common multiple (LCM) of two numbers is the smallest number (not zero) that is a multiple of both. So LCM(3, 4) = 12. To find the LCM of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may reqire a zero exponent). 2. Multiply each factor the greater number of times that it occurs in either factor. Example: Find LCM(90, 24) Prime factors of 90: 2 1 3 2 5 1 Prime factors of 24: 2 3 3 1 5 0

LCM: Least Common Multiple A common multiple is a number that is a multiple of two or more numbers. The common multiples of 3 and 4 are 0, 12, 24,... The least common multiple (LCM) of two numbers is the smallest number (not zero) that is a multiple of both. So LCM(3, 4) = 12. To find the LCM of two numbers: 1. List the prime factors of each number. Include all prime factors in both lists (may reqire a zero exponent). 2. Multiply each factor the greater number of times that it occurs in either factor. Example: Find LCM(90, 24) Prime factors of 90: 2 1 3 2 5 1 Prime factors of 24: 2 3 3 1 5 0 Therefore, LCM(90, 24) = 2 3 3 2 5 1 = 360.

6 Product of GCF and LCM Note that GCF(90, 24) LCM(90, 24) = 6 360 = 2160 = 90 24 This is true in general: GCF(a, b) LCM(a, b) = a b The product of the GCF and LCM of two natural numbers is equal to the product of the numbers themselves.

Proof that GCF(M, N) LCM(M, N) = MN Let M and N be positive integers, and let {P 1, P 2,...,P k } be the set of all prime factors of either M or N. Then M and N can be factored as

Proof that GCF(M, N) LCM(M, N) = MN Let M and N be positive integers, and let {P 1, P 2,...,P k } be the set of all prime factors of either M or N. Then M and N can be factored as M = P m 1 1 P m 2 2 P m k k N = P n 1 1 Pn 2 2 Pn k k

Proof that GCF(M, N) LCM(M, N) = MN Let M and N be positive integers, and let {P 1, P 2,...,P k } be the set of all prime factors of either M or N. Then M and N can be factored as M = P m 1 1 P m 2 2 P m k k N = P n 1 1 Pn 2 2 Pn k k The GCF and LCM are GCF(M, N) = P min(m 1,n 1) P min(m 2,n 2) P min(m k,n k) 1 2 k LCM(M, N) = P max(m 1,n 1) P max(m 2,n 2) P max(m k,n k) 1 2 k

Proof that GCF(M, N) LCM(M, N) = MN Let M and N be positive integers, and let {P 1, P 2,...,P k } be the set of all prime factors of either M or N. Then M and N can be factored as M = P m 1 1 P m 2 2 P m k k N = P n 1 1 Pn 2 2 Pn k k The GCF and LCM are GCF(M, N) = P min(m 1,n 1) P min(m 2,n 2) P min(m k,n k) 1 2 k LCM(M, N) = P max(m 1,n 1) P max(m 2,n 2) P max(m k,n k) 1 2 k Since for any pair of integers m and n, min(m, n) + max(m, n) = m + n, then

Proof that GCF(M, N) LCM(M, N) = MN Let M and N be positive integers, and let {P 1, P 2,...,P k } be the set of all prime factors of either M or N. Then M and N can be factored as M = P m 1 1 P m 2 2 P m k k N = P n 1 1 Pn 2 2 Pn k k The GCF and LCM are GCF(M, N) = P min(m 1,n 1) P min(m 2,n 2) P min(m k,n k) 1 2 k LCM(M, N) = P max(m 1,n 1) P max(m 2,n 2) P max(m k,n k) 1 2 k Since for any pair of integers m and n, min(m, n) + max(m, n) = m + n, then GCF(M, N) LCM(M, N) = P m 1+n 1 1 P m 2+n 2 2 P m k+n k k = MN

8 Finding the Prime Decomposition of an Integer For large integers this is a very hard problem. In fact, the difficulty of this problem is at the heart of several important cryptographic systems. For example, the record for factoring a 200-digit number is held by a team at the German Federal Agency for Information Technology Security. It took them several months on a supercomputer to factor this semiprime (a product of two primes) number. Larger semiprime numbers are beyond the capability of the foreseeable state of the art.

8 Finding the Prime Decomposition of an Integer For large integers this is a very hard problem. In fact, the difficulty of this problem is at the heart of several important cryptographic systems. For example, the record for factoring a 200-digit number is held by a team at the German Federal Agency for Information Technology Security. It took them several months on a supercomputer to factor this semiprime (a product of two primes) number. Larger semiprime numbers are beyond the capability of the foreseeable state of the art. For a smaller integer n, such as those you are likely to encounter in math competitions, trial division is a simple algorithm. Simply try dividing the integer by all prime numbers less than or equal to n. Of course, this technique is faster when you have memorized the first few primes, say, those under 100.