Ch 4.2 Divisibility Properties - Prime numbers and composite numbers - Procedure for determining whether or not a positive integer is a prime - GCF: procedure for finding gcf (Euclidean Algorithm) - Definition: Relatively prime integers H9: 1-13 odds, 14, 15-19 odds, 25-42 all Definition: An integer b divides a (or b is a factor of a, or we say that a is divisible by b) if there exists an integer q such that a = bq, i.e. if q Z a = bq. If b divides a, we denote this by b a. Definition: A positive integer greater than 1 is a prime number (or simply a prime) if its only positive factors are 1 and itself. A positive integer greater than 1 is a composite number if it is not a prime (that is if it has positive factors other than 1 and itself.) Exercise 1: 1. True or False: 5 15. 2. True or False: 15 5. 3. True or False: The number 1 is a prime number. 4. True or False: The number 39 is a prime number. 5. True or False: The number -39 is a composite number. 6. True or False: The first 9 prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23. Theorem (The Fundamental Theorem of Arithmetic) Every positive integer n 2 either is a prime or can be written as a product of primes. We will prove this later. (Ch 4.4.) One procedure for determining if a number is prime is as follows: Question: is 117 prime? Step 1: if 323 is divisible by 2, then 323 is not prime otherwise go to next Step 2: if 323 is divisible by 3, then 323 is not prime otherwise go to next Step 3: if 323 is divisible by 5, then 323 is not prime otherwise go to next
Step 4: if 323 is divisible by 7, then 323 is not prime otherwise go to next. (how long must we continue?) Theorem 4.2 An composite number n has a prime factor less than or equal to n Proof: Let n be a composite number. By definition of composite, there exist two positive integers a and b such that n = ab where 1 < a < n and 1 < b < n. Suppose a > n and b > n. Then n = ab > n n = n, which is not possible. Therefore, either a n or b n. Since both a and b are integers, it follows that either a n or b By the fundamental theorem of arithmetic, every positive integer has a prime factor. Any such factor of a or of b is also a factor or n, so must have a prime factor less than or equal to n. n. Exercise 2: The statement of the previous theorem is that if n is composite, then n has a prime factor less than or equal to n. What is the contrapositive of the statement? Exercise 3: True or False: If a and b are integers such that a b and b a, then a = b. Theorem 4.3 If a and b are positive integers such that a b and b a, then a = b. Proof: Assume that a and b are positive integers such that a b and b a. By definition of divisibility and. By substitution,
Theorem If a, b and c are any integers. Then (1) If a b and b c, then a c (transitivity property) (2) If a b and a c, then a (b+c) (3) If a b and a c, then a (b - c) (3) If a b, then a (bc). Proof: of (2) Assume a b and a c. By there exist q 1 and q 2 integers such that b = q 1 a and c = q 2 a. By substitution, b + c = Since q 1 and q 2 are integers and, q 1 + q 2 is an integer from which is follows by definition of divisibility that. Definition: A positive integer can be a factor (or divisor) of two positive integers a and b. Such a positive integer is a common factor of a and b. The largest common factor is the greatest common divisor (gcd) of a and b, denoted by gcd{a, b}. Alternate definition of gcd: A positive integer d is the gcd of a and b if and only if i) d a and d b AND ii) (d a and d b) d d. Theorem 4.5 Let a and b be any positive integers, and r the remainder when a is divided by b. Then gcd{a,b} = gcd{b,r}. Proof: Let gcd{a,b} = d and gcd{b,r} = d. By Theorem 4.3, we can prove that d = d by showing that d d and d d. By the Division Algorithm, a unique quotient and remainder q and r exist such that 0 < r < b, such that a = bq +r (1) By definition of gcd, that d = gcd{a,b} means that d a and d b, which by Theorem 4.4 implies that d qb. Using Theorem 4.4 again d a and d qb imply d (a - bq), which by (1) implies that d r. Thus, d b and d r, which by definition of gcd imply that d d. The proof of d d is similar see exercise 33 (homework). Thus, d = d.
Example 4: Illustrate Theorem 4.5, using a = 108 and b = 20. Euclidean Algorithm: Find gcd{1976, 1776} Step 1: apply the division algorithm with the smaller as the divisor 1976 = 1776 + Step 2: if the remainder is not zero, then apply the division algorithm with divisor and remainder of step 1 as the dividend and divisor, respectively. 1776 = + Step 3: if the remainder is not zero, then apply the division algorithm with divisor and remainder of step 2 as the dividend and divisor, respectively. = + repeat step 3 until you reach a zero remainder. The last nonzero remainder is gcd{1876, 1776} which in our example is.
Theorem 4.6: Let a and b be any positive integers, and d = gcd{a, b}. Then there exist integers s and t such that d = sa + tb (i.e. a linear combination of a and b). We won t prove it in this class, but let us see how to find them for the previous example. Definition. Two positive integers a and b are relatively prime if their gcd is 1. Exercise 5: True or False: The integers 4 and 9 are relatively prime. True or False: The integers 24 and 25 are relatively prime. True or False: The integers 11 and 99 are relatively prime. True or False: If a bc, then a b or a c. Theorem 4.7: Let a and b be relatively prime numbers. If a bc, then a c. Proof: Assume a and b are relatively prime, and that a bc. By definition of relatively prime. By Theorem 4.6, there exist integers s and t such that (1) (multiply through by c) By Theorem 4.4., since a sa, a sac, and since a bc, a tbc. Therefore, by Theorem 4.4. a (sac + tbc), which by substitution implies that a c.