Fundamental Theorem of Arithmetic Euclid's Lemma • If p is a prime that divides ab, then p divides a or p divides b. Examples • 17 is a prime divisor of 6,052*9,872 Check that 17 | 59,745,344 By Euclid's Lemma 17|6052 or 17|9872. • 6 divides 4*3 = 12 6 does not divide either 4 or 3. How can this be? • 6 is not prime! Proof of Euclid's Lemma • Suppose p does not divide a. • Since p is prime, p and a must be relatively prime • So there must be integers s,t such that 1 = ps + at. • But then b = psb + abt • Since p divides both terms on the right, p | b. Fundamental Theorem of Arithmetic • Every integer greater than 1 is a prime or a product of primes. This product is unique, except for the order in which the factors appear. • That is, if n = p1p2…pr and n = q1q2…qs, where the p's and q's are primes, then • r = s and, after renumbering the q's, we have pi = qi for all i. Sketch of Proof • Suppose wlog, r ≤ s. • Since p1 is prime, and p1|q1q2…qs, then by Euclid's lemma, p1|qi for some i. • Since qi is prime, p1 = qi. • Renumber so that p1= q1. • Repeat: p2 = q2 … pr=qr. • There can be no q's left over, so s = r!