Departmet of Mathematical Scieces Istructor: Daiva Puciskaite Discrete Mathematics Fermat s Little Theorem 43.. For all a Z 3, calculate a 2 ad a 3. Case a = 0. 0 0 2-times Case a 0. 0 0 3-times a a 2-times a a 3-times = 0 0 0 2-times = 0 0 0 3-times = a a a 2-times = a a a 3-times mod 3 = 0, mod 3 = 0. mod 3 = a 2 mod 3 =, mod 3 = a 3 mod 3 = a. 43.8. If p is a prime ad a is a multiple of p, the a p a mod p. (Recall: m mod p if ad oly if m mod p = mod p.) Sice a is a multiple of p, we have a = p x for some x Z. Therefore a p = p x p x p x = p p x p = p p p x p = p y p-times y is also a multiple of p. Thus 0 = p x mod p = p y mod p = 0. a a p
Recall: Let N, >, ad a, b, c Z. The ( ) (a + iteger ) mod = a mod. ( ) If a mod = b mod, the (a + c) mod = (b + c) mod. ( ) (x+y) = x + x y+ + x j y j + + y. 0 j = k! k!( k)!. Let m N. Show that the followig statemets are true () mod = mod. Proof by Mathematical Iductio: We have followig statemets which are related to : 0 0 mod = 0 mod, mod = mod, 2 2 mod = 2 mod, 3 3 mod = 3 mod, k k mod = k mod,. k+ (k + ) mod = (k + ) mod,. Proof. Basis step: The case = 0 is true because both sides of the equatio evaluate to 0. 0 mod = 0 ad 0 mod = 0 Iductio hypothesis: Suppose the result is true for k N; that is, we assume we have 2
(k + ) mod ( ) = k mod = k mod We must prove that the result is true for k + ; that is usig the equatio k mod = k mod we must prove (k + ) mod = (k + ) mod. ( ) k + k 4 + k 3 2 + k 2 3 + k 4 + mod 0 2 3 4 0 0 = ( k + k 4 + 0k 3 + 0k 2 + k + ) mod = ( k + + k 4 + 0k 3 + 0k 2 + k ) mod = ( k } {{ + } + (k 4 + 2k 3 + 2k 2 + k) ) mod a iteger ( ) = k } {{ + } mod a ( by assumptio k a mod ( ) = ( k + ) mod = k b mod, thus ( ) implies ( k + a c ) mod This is what we had to show. I other words we have show: Basis step: The statemet 0 is true. Iductio hypothesis: If statemet 0 is true, the statemet is true If statemet is true, the statemet 2 is true If statemet 2 is true, the statemet 3 is true If statemet 3 is true, the statemet 4 is true Therefore the equatio mod = mod is true for all N.. = ( k + ) mod b c ) (2) mod = mod. Proof. Basis step: The case = 0 is true because both sides of the equatio 3
(k + ) mod ( ) = evaluate to 0. 0 mod = 0 ad 0 mod = 0 Iductio hypothesis: Suppose the result is true for k N; that is, we assume we have k mod = k mod We must prove that the result is true for k + ; that is usig the equatio k mod = k mod we must prove (k + ) mod = (k + ) mod. ( 0 k + k 6 + 2 2 k + 3 3 k 4 + 4 3 k 3 + 2 k 2 + = ( k + k 6 + 2k + 3k 4 + 3k 3 + 2k 2 + k + ) mod = ( k + + k 6 + 2k + 3k 4 + 3k 3 + 2k 2 + k ) mod 6 = ( k + + (k 6 + 3k + k 4 + k 3 + 3k 2 + k) ) mod iteger ( ) = ( k + ) mod ( by assumptio k mod = k mod, thus (k + ) mod = (k + ) mod ) ( ) = ( k + ) mod This is what we had to show. k + ) mod 2. Prove the followig statemets. Let N, >, ad a N () If a mod = b mod, the ( a) mod = ( b) mod. Recall ( )l. If for x, Z with > 0 we have x = q +r such that q, r Z ad 0 r <, the the pair (q, r) of itegers with the property x = q + r ad 0 r < is uique, ad we write r = x mod. Moreover, if 0 r <, the 0 r <. 4
Proof. It is give r = a mod = b mod. This meas that 0 r <, ad a = q + r a mod ad b = q + r, for q, q Z b mod a = ( q) r ad b = ( q) r a = ( q) + 0 r ad b = ( q) + 0 r a = ( q) +( + ) r ad b = ( q) +( + ) r 0 0 a = ( q ) + r 0 r< ad b = ( q ) + r 0 r< ( ) a = ( q ) + r a mod ad b = ( q ) + r b mod ( a) mod r (2) If p is odd, the ( a) p = a p. = ( b) mod r We have ( a) p = ( ) p a p. Sice p is odd, we have p = 2 k+, thus ( ) p = ( ) 2k+ = ( ) ( ) 2k =. Therefore ( a) p = ( ) p a p = a p.
3. Let z Z. Show that the followig statemets are true () z mod = z mod. Proof. From () we kow that the equatio is true for all N. mod = mod Let z be a egative iteger. The z = m for some positive iteger m (this iteger is absolute value of z, i.e. m = z ). m mod = m mod = 2() m mod = m mod 2(2) = ( m) mod = m mod Therefore the equatio z mod = z mod is true for all itegers z. (2) z mod = z mod. 4. Let, m N, ad let p be a prime. Show that the followig statemets are true () If r = p N, ad p does ot divide m, the p divides r. m I other wors: If r = p N, ad p does ot appear i the m prime factorizatio of m, the r is a multiple of p. Proof. Let = p p 2 p s be the prime factorizatio of, m = q q 2 q v be the prime factorizatio of m, r = η η 2 η w be the prime factorizatio of r. ( )Notice that p q i for all i v (i.e. p q, p q 2,..., p q v), because of the assumptio p does ot divide m (or i other words: p does ot appear i the prime factorizatio of m). 6
r = p m = r m = p = η η 2 η w q q 2 q v m = p p 2 p s p r η i, q i, p i are primes = η η 2 η w q q 2 q v ad p p 2 p s p [ Fudametal Theorem of Arithmetic ] by the assumptio p m are two prime factorizatios of the same umber = the oly differece betwee η η 2 η w q q 2 q v ad p p 2 p s p is the order = p is oe of the umbers amog η, η 2,..., η w, q, q 2,..., q v = ( ) p = η i for some i w = p is a factor of r = η η 2 η i = r = p η i η w p η η i η i+ η w is the multiple of p this is what we had to show. (2) If 0 < k < p, the the biomial coefficiet p p! = is a multiple of p. k k!(p k)! Recall. p! = 2 3 (p ) p = (p )! p. (p )! p p! (p )! p Proof. The biomial coefficiet = = k k!(p k)! k!(p k)! is a umber (it is the umber of k-elemet subsets of a -elemet set). Moreover this umber is i the form required by the assumptios of 4() (here r = ( p k), = (p )!, ad m = k!(p k)!). The assumptio 0 < k < p implies that k < p, ad p k < p, therefore k! = 2 i (k ) k <p <p <p <p <p ad (p k)! = 2 j <p <p <p Thus p ca t be a factor of the prime factorizatio of, 2,..., k ad cosequetly ca t be a factor of the prime factorizatio of k!. The same applies to (p k)!: the prime p ca t be a factor of the (p k) <p
prime factorizatio of (p k)!. Therefore p ca t be a factor of the prime factorizatio of k! (p k)!. The assumptios of 4() for ( ( p ad p are satisfied, therefore p ) k is a multiple of p (if < k < p).. Prove Fermat s Little Theorem : Let p be a prime ad let a be a iteger. The a p mod p = a mod p. 8