Congruences (Part 2) & Fundamental Theorem of Arithmetic Original Notes adopted fromOctober 2, 2001 (Week 4) © P. Rosenthal , MAT246Y1, University of Toronto, Department of Mathematics typed by A. Ku Ong Fundamental Theorem of Arithmetic Every natural number other than 1 can be represented as a product of primes and that representation is unique up to the order of factors. Eg. = 5 * 30 = 5 * 3 * 10 = 5 * 3* 5* 2 = 2 * 3* 5* 5 Given n, write n = p1α1, p2α2… pαk where each pi is prime and each αi is a natural number. Eg. 7249 ≠ 3568 Eg. 12|36 (12 is not prime) 36 = 4 * 9, 12 doesn’t divide into 4, 12 doesn’t divide into 9. Theorem: If p is prime & a, b ∈ N, and if p | (ab) then p|a or p|b Proof: If a or b = 1, done. If not a = p1α1….psα s b = q1β1… qtβt ab = p1α1…. psαs q1β1….qtβt Given ab = pk, some k ∴ p occurs in factorization of ab into primes p = pi some i, or p = qj, some j If p = pi, then p|a If p = qj, then p |a Recall for m > 1 a Ab (mod m) if m | a-b Eg. m = 5 (remainders of 0,1,2,34) Any a is congruent to 1 of {0,1,2,3,4} mod 5. [0], [1], [2], [3], [4] [0] + [2] = [2] [2] + [3] = [0] Integers mod 5 is a “field” with 5 elements. [2] * [3] = [1] [4] * [4] = [1] Not if ax = any (mod 5) & !(5|a) then x A y (mod 5) ax A ay (mod 5) 5 | (ax – ay) or 5 | a (x- y) 5 is prime ⇒ 5 |a, or 5 | (x- y) 5 doesn’t divide a ⇒ 5 | (x-y) ie) x A y (mod 5) Theorem: If p is prime and p doesn’t divide a, then ax A ay (mod p) ⇒ x A y (mod p) Proof: If ax A ay (mod p) Then p | (ax – ay) so p | a(x-y) So p | a or p | (x – y) But p doesn’t divide a, so p | (x – y) Ie) x A y (mod p) Eg. mod 5 Suppose 5 doesn’t divide a. Consider { a*1, a*2, a*3, a*4} For x ! A y (mod 5), ax ! A ay (mod 5 ) {a*1, a*2, a*3, a*4} A (in some order : 1,2,3,4) (mod 5 ) ∴ (a*1)(a*2)(a*3)(a*4) A 1 ) ( 2 ) ( 3 ) ( 4 ) [ mod 5 ] a4 (1*2*3*4) A * 2 * 3 * 4 ) ( mod 5 ) a 4 A1 (mod 5) Eg. (101) 4 A1 (mod 5) , (127) 4 A1 (mod 5) Fermat’s (Little) Theorem : If p is prime & a is not divisible by p, then a p-1 A 1 (mod p) Proof: Consider { a*1, a*2, a*3,… , a*(p-1)) = S No two are congruent to each other [ ax A ay, x A y ] None are A 0 ( mod p ) S contains p – 1 numbers , no two of which are congruent and none of which is congruent to 0 (mod p) ∴ in some order, elements of S are congruent to { 1,2,3,4,….. p –1} (a*1) (a*2) (a*3)…. (a*(p-1)) A * 2 * 3 * (p-1) (mod p) ap-1((p-1)!) AS -1)! (mod p) p doesn’t divide (p-1) ! ∴ ap-1 A mod p ) Eg. (173, 925) 1,000,000,000 A1(mod ( 1, 000, 000, 000, 001) Corollary: If p, prime and p + b, then there exists c, such that bc A 1 (mod p) (ie. Numbers not A 0 (modp) have multiplicative inverses mod p) Proof: b p-1 A 1(mod p) b(bp-2) A 1(mod p) When is a number its own inverse mod p ? b 2 A 1 (mod p ) means p | ( b 2 – 1) p | (b-1) (b+1) ⇒ p | (b-1) or p | (b 2 – 1) p | (b +1) , Ie. b A 1 (mod p) b A -1 (mod p) A (b-1) (mod p ) Resides: {0,1,2,3,… p –1} (p-1)! A -1 (mod p) Wilson’s Theorem: If p prime, then (p-1) ! + 1 A 0 (mod p) Proof: Consider the numbers {2,3,4,…. p – 3, p –2 } (None are divisible by p, Each has Multiplicative Inverse in the set} Thus the product 2*3*4 …(p -3) (p-2) A 1 (mod p) (pair with inverses ) ∴ (p-1)! A 1*2*3……… (p-1)! A 1 (2*3* (p-3)(p-2) ) * (p-1) A 1 (1) (p-1) (mod p) A (-1) (mod p) ∴ (p-1)! + 1 A 0 (mod p) Eg. p = 5 (1,000,000,006)! + 1 A 0 (mod (1,000,000,007)) 4! =24 24 + 1 A 0 (mod 5) Eg. m = 4 (4-1) ! +1 = 6 + 1 A 3 (mod 4) ≠ 0 (mod 4) Homework : (m-1) ! + 1 A 0 (mod m) ⇒ m is prime Definition: m ∈ N is composite if m ≠ & m isn’t prime. Definition: If m, n ∈ N, the greatest common divisor of m & n is the largest natural number d such that d |m & d |n If g.c.d (m, n) is 1, we say “m & n are relatively prime” Eg. 48, 36 ⇒ want gcd (48, 36) 48 = 4 x 12 = 22 x 22 x 3 = 243 36 = 22 x 32 gcd (36, 48) = 223 = 12 Definition : If m ∈ N, ∅ (m) (“The Euler ∅ function “) Is the number of natural numbers m {1,…., m – 1} that are relatively prime to m. Eg. ∅(4) {1,2,3} ∅(4) = 2 Eg. ∅ 15 = 8 {1,2,(3), 4, (5), (6),7,8, (9), (10), 11, (12), 13, 14} If p is prime ∅ (p) is p –1/ Lemma: If m | ab and if m and a are relatively prime, then m | b Proof: a = p1α1….p sα s b = q1β1…q tβt ab = m * c, some c mc = p1α1…. p sαs q1β1….q tβt m = r1α1…. r uα u No r is a pj, since gcd (m,a) = 1, ∴ all r’s are q’s and m |b. Given any m, let S = {1…., m – 1} be the numbers <= m, that are relatively prime to m. If gcd (a, m) = 1 as = {a*1,…. a (m -1)} All relatively prime to m, so S in some order. Multiply all together, congiuent to S multiplied together. Eventually get a∅m A 1 (mod m) – Euler’s Theorem.