<<

Math 3336 Section 4.3 Primes and Greatest Common

• Prime and their Properties • Greatest Common Divisors and • Conjectures and Open Problems Least Common Multiples About Primes • The Euclidian • gcds as Linear Combinations

Definition: A positive greater than 1 is called prime if the only positive factors of are 1 and . A positive integer that is greater than 1 and is not prime is called composite. 𝑝𝑝 𝑝𝑝 𝑝𝑝 Example: The integer 11 is prime because its only positive factors are 1 and 11, but 12 is composite because it is divisible by 3, 4, and 6. The Fundamental Theorem of : Every positive integer greater than 1 can be written uniquely as a prime or as the product of two or more primes where the prime factors are written in of nondecreasing size. Examples: a. 50 = 2 5 b. 121 = 11 2 c. 256 = 2⋅ 2 8 Theorem: If is a composite integer, then has a prime less than or equal to . Proof: 𝑛𝑛 𝑛𝑛 √𝑛𝑛

Page 1 of 9

Example: Show that 97 is prime.

Example: Find the prime of each of these a. 143 b. 81

Theorem: There are infinitely many primes. Proof:

Page 2 of 9

Questions: 1. The proof of the previous theorem by A. Contrapositive C. Direct B. Contradiction

2. Is the proof constructive OR nonconstructive?

3. Have we shown that Q is prime?

The Sieve of can be used to find all primes not exceeding a specified positive integer. For example, begin with the list of integers between 1 and 100. a. Delete all the integers, other than 2, divisible by 2. b. Delete all the integers, other than 3, divisible by 3. c. Next, delete all the integers, other than 5, divisible by 5. d. Next, delete all the integers, other than 7, divisible by 7. e. Since all the remaining integers are not divisible by any of the previous integers, other than 1, the primes are: {2,3,5,7,11,15,1719,23,29,31,37,41,43,47,53, 59,61,67,71,73,79,83,89, 97}

Page 3 of 9

Mersenne primes (French monk Marin Mersenne):2 1 2 1 = 3 𝑝𝑝 − 22 1 = 7 − 23 1 = 31 − etc. 25 1 = 2047 = 23 89 − 211, , 1 − ⋅ 42 643 801 −

Conjectures and open problems about primes. Example: ( ) = + 41 (12 ) = 41, (2) = 43, (3) = 47, (4) = 53 𝑓𝑓 𝑛𝑛 𝑛𝑛 − 𝑛𝑛 ( ) Is prime for 𝑓𝑓all positive integers𝑓𝑓 ? 𝑓𝑓 𝑓𝑓 𝑓𝑓 𝑛𝑛 𝑛𝑛

For every polynomial with integer coefficients, there is a positive integer such that ( ) is composite. 𝑦𝑦 𝑓𝑓 𝑦𝑦

Goldbach’s Conjecture: Every even integer n, > 2, is the sum of two primes. 4 = 𝑛𝑛 6 = 8 = 10 = 12 =

The conjecture has been checked for all positive even integers up to 1.6 10 , BUT there is NO proof. 18 ⋅

The Twin Prime Conjecture: There are infinitely many twin primes. Twin primes are a pair of primes that differ by 2: 3 & 5, 11 & 13, 5 & 7, 17 & 19, 4967 & 4969

Page 4 of 9

Greatest Common Divisors and Least Common Multiples Definition: Let and be integers, not both zero. The largest integer such that | and | is called the of and . 𝑎𝑎 𝑏𝑏 𝑑𝑑 𝑑𝑑 𝑎𝑎 𝑑𝑑 𝑏𝑏 ( , ) Notation: 𝑎𝑎 𝑏𝑏 One way to𝑔𝑔𝑔𝑔 find𝑔𝑔 𝑎𝑎 the𝑏𝑏 greatest common divisor is to find all positive common divisors of both integers and then take the largest divisor. Example: What is the greatest common divisor of 12 and 24?

Example: What is the greatest common divisor of 11 and 25?

Definition: The integers and are relatively prime if their greatest common divisor is 1.

Definition: The integers 𝑎𝑎 , ,𝑏𝑏… , are pairwise relatively prime if gcd , = 1, whenever 1 < . 𝑎𝑎1 𝑎𝑎2 𝑎𝑎𝑛𝑛 �𝑎𝑎𝑖𝑖 𝑎𝑎𝑗𝑗� ≤ 𝑖𝑖 𝑗𝑗 ≤ 𝑛𝑛 Example: Determine whether the integers in each of these sets are pairwise relatively prime. a. 21, 34, and 55 b. 14, 17, 85

Page 5 of 9

Another way to find the greatest common divisor of two integers is to use their prime factorization.

Let = … and = … . 1 2 𝑛𝑛 1 2 𝑛𝑛 𝑎𝑎 𝑎𝑎 ( 𝑎𝑎, ) ( 𝑏𝑏, ) 𝑏𝑏 𝑏𝑏 ( , ) Then𝑎𝑎 gcd𝑝𝑝(1 , ⋅)𝑝𝑝2= ⋅ ⋅ 𝑝𝑝𝑛𝑛 𝑏𝑏 𝑝𝑝1 ⋅ 𝑝𝑝2…⋅ ⋅ 𝑝𝑝𝑛𝑛 1 1 2 2 𝑛𝑛 𝑛𝑛 min 𝑎𝑎 𝑏𝑏 min 𝑎𝑎 𝑏𝑏 min 𝑎𝑎 𝑏𝑏 𝑎𝑎 𝑏𝑏 𝑝𝑝1 ⋅ 𝑝𝑝2 ⋅ ⋅ 𝑝𝑝𝑛𝑛 Example: Find the greatest common divisor of 30030 and 2244.

Prime factorization can also be used to find the of two numbers. Definition: The least common multiple of the positive integers and is the smallest positive integer that is divisible by both and . 𝑎𝑎 𝑏𝑏 ( , ) Notation: 𝑎𝑎 𝑏𝑏 Let = 𝑙𝑙𝑙𝑙𝑙𝑙 𝑎𝑎 𝑏𝑏 … and = … . 1 2 𝑛𝑛 1 2 𝑛𝑛 𝑎𝑎 𝑎𝑎 ( 𝑎𝑎 , ) ( 𝑏𝑏 , ) 𝑏𝑏 𝑏𝑏 ( , ) Then𝑎𝑎 lcm𝑝𝑝(1 , ⋅)𝑝𝑝2= ⋅ ⋅ 𝑝𝑝𝑛𝑛 𝑏𝑏 𝑝𝑝1 ⋅ 𝑝𝑝2 …⋅ ⋅ 𝑝𝑝𝑛𝑛 max 𝑎𝑎1 𝑏𝑏1 max 𝑎𝑎2 𝑏𝑏2 max 𝑎𝑎𝑛𝑛 𝑏𝑏𝑛𝑛 Example: Find the least common multiple of 2 3 5 and 2 3 5 1 2 𝑛𝑛 𝑎𝑎 𝑏𝑏 𝑝𝑝 ⋅ 𝑝𝑝 2 3 ⋅5 ⋅ 𝑝𝑝5 3 2 ⋅ ⋅ ⋅ ⋅

Page 6 of 9

Theorem: Let a and b be positive integers. Then = gcd ( , ) ( , )

𝑎𝑎𝑎𝑎 𝑎𝑎 𝑏𝑏 ⋅ 𝑙𝑙𝑙𝑙𝑙𝑙 𝑎𝑎 𝑏𝑏

Finding the gcd of two positive integers using their prime is not efficient because there is no efficient algorithm for finding the prime factorization of a positive integer.

Euclidean Algorithm Example: Find the greatest common divisor of 91 and 287.

Lemma: Let = + , where , , , and are integers. Then ( , ) = ( , ). = = The algorithm𝑎𝑎 can 𝑏𝑏𝑏𝑏be written𝑟𝑟 as a𝑎𝑎 sequence𝑏𝑏 𝑞𝑞 of𝑟𝑟 equations. Let 𝑔𝑔𝑔𝑔 𝑔𝑔and𝑎𝑎 𝑏𝑏 𝑔𝑔𝑔𝑔. 𝑔𝑔 𝑏𝑏 𝑟𝑟 = + 0 𝑟𝑟0 𝑎𝑎 𝑟𝑟1 𝑏𝑏 = + 0 𝑟𝑟0 𝑟𝑟1𝑞𝑞1 𝑟𝑟2 ≤ 𝑟𝑟2 ≤ 𝑟𝑟1 𝑟𝑟1 𝑟𝑟2𝑞𝑞. 2 𝑟𝑟3 ≤ 𝑟𝑟3 ≤ 𝑟𝑟2 . . = + 0 = 𝑟𝑟𝑛𝑛−2 𝑟𝑟𝑛𝑛−1𝑞𝑞 𝑛𝑛−1 𝑟𝑟𝑛𝑛 ≤ 𝑟𝑟𝑛𝑛 ≤ 𝑟𝑟𝑛𝑛−1 𝑛𝑛−1• 𝑛𝑛 𝑛𝑛 𝑟𝑟 If𝑟𝑟 𝑞𝑞 is smaller than , the first step of the algorithm swaps the numbers. • The remainders decrease with every step but can never be negative. A remainder must eventually𝑎𝑎 equal zero.𝑏𝑏 Then the algorithm stops. 𝑟𝑟𝑛𝑛

( , ) = ( , ) = gcd( , ) = = gcd( , ) = gcd ( , 0)

𝑔𝑔𝑔𝑔𝑔𝑔 𝑎𝑎 𝑏𝑏 𝑔𝑔𝑔𝑔𝑔𝑔 𝑟𝑟0 𝑟𝑟1 𝑟𝑟1 𝑟𝑟2 ⋯ 𝑟𝑟𝑛𝑛−1 𝑟𝑟𝑛𝑛 𝑟𝑟𝑛𝑛

Page 7 of 9

Example: Find the greatest common divisor of 123 and 277.

gcd as a Linear Combinations Bezout’s Theorem: If and are positive integers, then there exists integers and such that ( , ) = + . 𝑎𝑎 𝑏𝑏 𝑠𝑠 𝑡𝑡 𝑔𝑔𝑔𝑔 𝑔𝑔 𝑎𝑎 𝑏𝑏 𝑠𝑠𝑠𝑠 𝑡𝑡𝑡𝑡 Example: Express gcd(252, 198) =18 as a linear combination of 252 and 198.

Page 8 of 9

Example: Express (35, 78) as a linear combination of 35 and 78.

𝑔𝑔𝑔𝑔𝑔𝑔

Page 9 of 9