Department of Mathematical Sciences Instructor: Daiva Pucinskaite Discrete Mathematics Factoring Recall. Fundamental Theorem of Arithmetic. Let n be a positive integer n > 1. Then n can be represented in (up to order) exactly one way as a product of prime numbers. Remark: If p1 , p2 , . . . , pr , q1 , q2 , . . . , qm are primes, and n = p1 · p2 · · · · p r = q1 · q 2 · · · · qm , then r = m (i.e. the number of primes in any prime decomposition is the same) and the only difference of (p1 , p2 , . . . , pr ) and (q1 , q2 , . . . , qr ) is the order. This product is the prime factorization of n. 39.2. Factor the following positive integers into primes. a. 25 = 5 · 5 b. 4200 = 2 · 2 · 2 · 3 · 5 · 5 · 7 c. 1010 = (2·5)10 = (2 · 5) · (2 · 5) · · · (2 · 5) = |2 · 2{z· · · 2} · 5| · 5{z· · · 5} . | {z } 10-times 10-times 10-times d. 19 = 19. 1. 1 equals to the empty product. 39.3. Let x be an integer. Prove that 2|x and 3|x if and only is 6|x. We have to prove two statements: I. If 2|x and 3|x, then 6|x II. If 6|x, then 2|x and 3|x Proof of I. By the assumption 2|x and 3|x: 2|x and 3|x =⇒ x = 2 · c and x = 3 · z for certain c , z ∈ Z =⇒ 2 appears in the prime factorization of x and 3 appears in the prime factorization of x =⇒ the prime factorization of x is of the form x = 2 · 3 · further prime factors =⇒ x = 6 · further prime factors =⇒ 6 is a factor of x =⇒ 6|x (this is what we had to show) Proof of II. By the assumption 6|x 6|x =⇒ x = 6 · c for certain c ∈ Z, =⇒ x = 2 · 3 · c ( because 6 = 2 · 3), =⇒ x = 2 · 3 · c and x = 3 · 2 · c , | {z } | {z } ∈Z ∈Z =⇒ 2 is a factor of x and 3 is a factor of x, =⇒ 2|x and 3|x (this is what we had to show). Generalisation: Let p and q be unequal primes. Then p|x and q|x if and only if (pq)|x. 39.4. Let a be an positive integer, and p a prime. Prove that p|a if and only if the prime factorization of a contains p (or in other words: p|a if and only if p appears in the prime factorization of a). We have to prove two statements: I. If p|x, then p appears in the prime factorization of a II. If p appears in the prime factorization of a, then p|x. Proof of I. By the assumption p|x: 2 p|x =⇒ x = p · n for some n ∈ N, ( n is positive, because a is positive by the assumption) n ∈ N =⇒ n = p1 · p2 · · · pr is the prime factorization of n . (this follows form the ”Fundamental Theorem of Arithmetic”) =⇒ x = p · p1 · p2 · · · pr is the prime factorization of x | {z } n (all numbers in this multiplication are prime, thus ”Fundamental Theorem of Arithmetic” provides, x = p · p1 · p2 · · · pr is the (one and only) prime factorization of x) =⇒ p appears in the prime factorization of a ( this is what we had to show). Proof of II. If p appears in the prime factorization a = p1 · · · pi−1 · pi · pi+1 · · · pr of a, then p = pi for some 1 ≤ i ≤ r. Therefore x = pi (p1 · · · pi−1 · pi+1 · pr ) |{z} p implies p|x. (Example. The prime p = 47 appears in the prime factorization of a = |{z} 2 · |{z} 7 · |{z} 7 · |{z} 47 · |{z} 61 , p1 p2 p3 because p = p4 . Therefore a = |{z} 47 (|{z} 2 · |{z} 7 · |{z} 7 · |{z} 61 ) implies that 47 is a divisor p p1 p2 p3 p5 of a) 39.5. Let a, b ∈ N, and p is a prime. If p|(a · b), then p|a or p|b. Proof. Since a, b ∈ N, by the ”Fundamental Theorem of Arithmetic” there is (up to order) unique list of primes (p1 , p2 , . . . , pr ) such that a = p1 · p2 · · · pr , and unique list of primes (t1 , t2 , . . . , tm ) such that b = t1 · t2 · · · tm . Therefore a · b = p1 · p2 · · · pr · t1 · t2 · · · tm is the prime factorization of a·b (because all numbers in this product are primes). The assumption p|(a · b) implies that p appears in the prime factorization of a · b. We have 3 p4 p5 a · b = p1 · p2 · · · pr · t1 · t2 · · · tm = p · further prime factors . Since the the prime factorization of a · b is (up to order) unique, we have p = pi for some i ∈ {1, . . . , r} or p = tj for some j ∈ {1, . . . , m}. If p = pi , i.e. p appears in the prime factorization of a , then p|a (statement 39.4). If p 6= pi for all i ∈ {1, . . . , r}, then p = tj for some j. In this case p|b, because p appears in the prime factorization of b. 1. Let n ∈ N, and let p be a prime. Show that the following statements are true (1) p appears an even number (or zero) of times in the prime factorization of n2 . Proof. Let n = p1 · p1 · · · p1 · p2 · p2 · · · p2 · · · pm · pm · · · pm | {z } | {z } | {z } n1 -times n2 -times be nm -times the prime factorization of n, where p1 , p2 , . . . , pr are pairwise different (i.e. pi 6= pj if i 6= j). Example: In the prime factorization of n = 117721856575942 117721856575942 = 2 · 2 · 2 · 7 · 7 · 7 · 7 · 23 · 23 · 41 · 41 · 41 · 41 · 41 we have m = 4, because p1 = 2, p2 = 7, p3 = 23, p4 = 41 are pairwise different primes, and n1 = 3, n2 = 4, n3 = 2, n4 = 5, because • p1 = 2 appears n1 = 3 times in the prime factorization of n, • p2 = 7 appears n2 = 4 times in the prime factorization of n, • p3 = 23 appears n3 = 2 times in the prime factorization of n, • p4 = 41 appears n4 = 5 times in the prime factorization of n. Then n2 = p1 · · · p1 · p2 · · · p2 · · · pm · · · pm · p1 · · · p1 · p 2 · · · p2 · · · pm · · · pm | {z } | {z } | {z } | {z } | {z } | {z } n1 -times n2 -times nm -times n1 -times n2 -times nm -times = p1 · · · p1 · p2 · · · p2 · · · pm · · · pm | {z } | {z } | {z } 2·n1 -times 2·n2 -times 2·nm -times is the prime factorization of n2 . If p 6= pi for all i ∈ {1, 2, . . . , r}, then p appears 0 times in the prime factorization of n2 . If p = pi , then p appears 2 · ni times 4 in the prime factorization of n. Since 2 · ni is even, we showed what we had to show. (2) p appears an odd number of times in the prime factorization of m = p · n2 . Proof. From (1) we know that p appears even number (or zero) of times in the prime factorization of n2 . If p appears 0 times in the prime factorization of n2 (i.e. p don’t appears in the prime factorization of n2 ), then p appears 1 time in the prime factorization of m = p · n2 . If p appears 2 · k times in the prime factorization of n2 , then p appears 2 · k + 1 times in the prime factorization of m = p · n2 . Since 1 as well as 2 · k + 1 are odd, we showed what we had to show. Let n = 17 · 19 · 19 · 47 · 47 · 47, then n2 = 17 · 17 · 19 · 19 · 19 · 19 · 47 · 47 · 47 · 47 · 47 · 47 the prime factorization of n2 , because all numbers in this product are prime. Thus • 17 appears 3 times in the prime factorization of 17 · n2 , • 19 appears 5 times in the prime factorization of 19 · n2 , • 47 appears 7 times in the prime factorization of 47 · n2 , • p appears 1 time in the prime factorization of p · n2 if p 6= 17, 19, 47. 2. Prove the following statements. a √ = 7. b a √ This is: For all numbers a, b, we have 6= 7. b (1) There are no numbers a, b such that This statement is logically equivalent to the statement a √ = 7, then a 6∈ N or b 6∈ N”. b a √ We will show that if = 7, then a2 has two prime factorizab tions. In the first prime factorization of a2 the prime 7 appears an even number of times, and in the second prime factorization ”If 5 of a2 the prime 7 appears an odd number of times. By the ”Fundamental Theorem of Arithmetic” this is not possible if a2 is a number. This implies that a2 6∈ N and therefore a 6∈ N (because if a ∈ N, then a2 ∈ N). Proof. Assume a √ = 7, we have b a √ a2 = 7 =⇒ 2 = 7 b b =⇒ a2 = 7 · b2 =⇒ 7 appears an even number of times in the prime factorization of a2 (Statement 1(1)) and 7 appears an odd number of times in the prime factorization of 7 · b2 = a2 (Statement 1(2)) =⇒ a2 can’t be a number by the ”Fundamental Theorem of Arithmetic”. =⇒ a can’t be a number a √ = 23. b a √ This is: For all numbers a, b, we have 6= 23. b √ a Proof. Assume = 23, we have b (2) There are no numbers a, b such that a √ a2 = 23 =⇒ 2 = 23 b b =⇒ a2 = 23 · b2 =⇒ the prime 23 appears an even number of times in the prime factorization of a2 (Statement 1(1)) and the prime 23 appears an odd number of times in the prime factorization of 23 · b2 = a2 (Statement 1(2)) =⇒ a2 can’t be a number by the ”Fundamental Theorem of Arithmetic”. =⇒ a can’t be a number (3) Let p be a prime. There are no numbers a, b such that 6 a √ = p. b 7