* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Euler`s totient function and Euler`s theorem
History of trigonometry wikipedia , lookup
Brouwer–Hilbert controversy wikipedia , lookup
Vincent's theorem wikipedia , lookup
List of prime numbers wikipedia , lookup
Pythagorean theorem wikipedia , lookup
Georg Cantor's first set theory article wikipedia , lookup
Non-standard calculus wikipedia , lookup
Central limit theorem wikipedia , lookup
Nyquist–Shannon sampling theorem wikipedia , lookup
List of important publications in mathematics wikipedia , lookup
Mathematical proof wikipedia , lookup
Brouwer fixed-point theorem wikipedia , lookup
Fundamental theorem of calculus wikipedia , lookup
Four color theorem wikipedia , lookup
Quadratic reciprocity wikipedia , lookup
Wiles's proof of Fermat's Last Theorem wikipedia , lookup
Euler’s theorem Elad Aigner-Horev Fermat’s little theorem aids us in calculating congruences involving exponents where the modulus is prime. We use the so called Euler’s theorem to conduct similar calculation when the modulus is composite. We thus view Euler’s theorem as a generalisation of Fermat’s little theorem. §1. Euler’s totient function A function defined over all positive integers is called an arithmetic function. Our interest is with a special type of arithmetic functions. Definition 1.1. An arithmetic function f is called multiplicative if f (mn) = f (m)f (n) whenever (m, n) = 1. It is called completely multiplicative if f (mn) = f (m)f (n) for all m, n ∈ Z+ . Example 1.2. The constant function n 7→ 1 is completely multiplicative. Example 1.3. The function n 7→ n is completely multiplicative. Theorem 1.4. Let f be a multiplicative function and let n = pa11 ·pa22 · · · pakk then f (n) = f (pa11 ) · · · f (pakk ). Proof. Due to its simplicity we omit the proof of this statement here. The reader in encouraged to prove this theorem using an induction on the number of distinct prime factors of n (i.e., induction on k here). Definition 1.5. Let n ∈ Z+ . We write ϕ(n) to denote the number of positive integers not exceeding n that are co-prime with n; that is ϕ(n) = |{k ∈ [n] : (k, n) = 1}| . The function ϕ(·) is called Euler’s totient function. Example 1.6. The set 1, 7, 11, 13, 17, 19, 23, 29 consists of all positive integers not exceeding 30 that are co-prime with 30. Hence, ϕ(30) = 8. Example 1.7. ϕ(1) = 1, ϕ(2) = 1, ϕ(3) = 2, ϕ(4) = 2, ϕ(5) = 4, ϕ(6) = 2, ϕ(7) = 6. Note that ϕ(1) = 1 as (1, 1, ) = 1, trivially. For every n > 1 we have (n, n) = n > 1 so that ϕ(n) ≤ n − 1, whenever n > 1. if n is prime then ϕ(n) = n − 1. (1.8) If n is composite then n has at least one non-trivial divisor 2 ≤ d < n so that if n is composite then ϕ(n) ≤ n − 2. 1 (1.9) Number Theory ArielU 2016 Elad Aigner-Horev We have just proved the following. Proposition 1.10. ϕ(n) = n − 1 if and only if n is prime. Lemma 1.11. Let p be prime and let k > 0. Then k k k−1 ϕ(p ) = p − p 1 =p 1− p k Proof. As (n, pk ) = 1 if and only if p 6 |n it is easier to determine ϕ(n) by subtracting from pk (the size of the set {1, . . . , pk }) those numbers divisible by p that do not exceed pk . These numbers are simply the multiples of p: p, 2p, 3p, . . . , (pk−1 )p. That is, there are pk−1 multiples of p in the set {1, . . . , pk }. Discarding these integers implies the lemma. Example 1.12. ϕ(25) = ϕ(52 ) = 52 − 5 = 20 At this stage we are capable to evaluate ϕ at prime powers. To be able to evaluate this function at every positive integer it suffices to prove that this function is multiplicative. Indeed, if prove that ϕ is multiplicative then given n = pa11 . . . pakk then ϕ(n) = ϕ(pa11 ) . . . ϕ(pakk ) by Theorem 1.4. We set out to prove that ϕ is multiplicative, that is, we seek to prove that ϕ(mn) = mn whenever (m, n) = 1. The following two lemmas will facilitate our claims. Lemma 1.13. (a, bc) = 1 ⇐⇒ (a, b) = 1 and (a, c) = 1. Proof. One proof for this lemma employs the fundamental theorem of arithmetics. Here we note that if a and bc share no prime factors then surely a shares no common prime factors with b or c and vice versa. Here is another proof from first principles. Suppose (a, bc) = 1 and let d = (a, b). Then d | a and d | bc so that 1 = (a, bc) ≥ d implying that (a, b) = 1. A similar argument shows that (a, c) = 1. Conversely, suppose that (a, b) = 1 = (a, c) and let d0 = (a, bc). Assume towards contradiction that 0 d > 1 and thus admits a prime divisor p. As d | a then p | a. As d | bc then p | bc so that p | b or p | c. In the former case (a, b) ≥ p > 1 which is a contradiction, and in the latter case (a, c) ≥ p > 1 which is a contradiction. Lemma 1.14. (qm + r, m) = (r, m). Proof. Show that every common divisor of r and m is a common divisor of qm + r and m and vice versa. We leave the details to the reader. We seek to count the members of [1, mn] that are relatively prime to mn. As (`, mn) = 1 if and only if (`, m) = 1 and (`, n) = 1, by Lemma 1.13, we may reduce the task of counting numbers in [1, mn] relatively prime to mn to first round up all numbers that are relatively prime to m and of those count all those relatively prime to n. This two step procedure is easier to see through the following matrix M : 1 m+1 2m + 1 .. . 2 m+2 2m + 2 .. . ... ... ... (n − 1)m + 1 (n − 1)m + 2 . . . r m+r 2m + r .. . ... ... ... m 2m 3m .. . (n − 1)m + r . . . nm Consider the rth column of M . This column consists of the numbers {qm + r : q ∈ [0, n − 1]}; 2 Number Theory ArielU 2016 Elad Aigner-Horev each member of this column is relatively prime to m if and only if (r, m) = 1, by Lemma 1.14. Of these m possible columns of M precisely ϕ(m) of those have all their entries relatively prime to m. Claim 1.15. Each column M contains precisely ϕ(n) members that are relatively prime to n. Proof. Fix a column C = {qm + r : q ∈ [0, n − 1]} of M . The members of C are all incongruent modulo n. For if jm + r ≡ km + r (mod n) for some two distinct j, r ∈ [k] then j ≡ k (mod n) (recall that (m, n) = 1) which is impossible. Hence, the members of C are represented by the canonical complete systems of residues {0, 1, . . . , n − 1}. The latter contains ϕ(n) members that are relatively prime to n and consequently so does C. It now follows that each of the ϕ(m) columns of M with all their members relatively prime to m contains ϕ(n) members that are relatively prime to n. In particular we have just proved the following. Theorem 1.16. The function ϕ is multiplicative. This last theorem coupled with Theorem 1.4 yield the following. Theorem 1.17. Let 1 < n = pa11 . . . pakk then ϕ(n) = pakk − pakk −1 . . . pa11 − pa11 −1 1 1 =n 1− ... 1 − . p1 pk Example 1.18. 1 1 8 1 1− 1− = 900 · = 240 ϕ(900) = ϕ(2 · 3 · 5 ) = 900 1 − 2 3 5 30 2 3 2 Example 1.19. The function ϕ is not complete multiplicative. Consider 2 and 4 then ϕ(2·4) = ϕ(8) = 4 while ϕ(2) · ϕ(4) = 1 · 2 = 2. Proposition 1.20. For n > 2, ϕ(n) is even. Proof. Let a ∈ [1, n] such that a < n/2 (observe that n/2 need not be an integer. Then (a, n) = (n − a, n) and as n > 2 and 1 < a < n/2 we have that a and n − a are distinct numbers. Then the set of ordered pairs {(a, n − a) : a ∈ [1, n], a < n/2, (a, n) = 1} consists of pairs whose members are distinct and both relatively prime to n. In particular, the pair (n/2, n/2) does not appear in this set. This is clear of n is odd. If n is even then (n/2, n) = n/2 > 1 as n > 2. It now follows that as all numbers relatively prime to n can be arranged in pairs (as above) that there is an even number of them. Here is an alternative proof of Proposition 1.20 using the properties of ϕ. Proof of Proposition 1.20 - alternative proof. We consider two complimentary cases. Either n has an odd prime factor or it does not (in which case it is a power of 2). In the latter case let p be some odd prime factor of n so that n = pk m for some k ∈ Z+ and such that (pk , m) = 1. Then ϕ(n) = ϕ(pk )ϕ(m) = pk−1 (p − 1)ϕ(m) which is even as p − 1 is even. (Note that the case k = 1 is covered here as well). 3 Number Theory ArielU 2016 Elad Aigner-Horev In the former case, n = 2k for some k ∈ Z+ . By assumption that n > 2 we have that k > 1 and then ϕ(2k ) = 2k−1 (2 − 1) = 2k−1 so that the claim follows. Proposition 1.21. If n has r distinct odd prime factors then 2r | ϕ(n). Proof. Let p1 , . . . , pr be r distinct odd prime factors of n. Then n = pk11 . . . pkr r ·m such that (pk11 . . . pkr r , m) = 1. Then ϕ(n) = ϕ(pk11 . . . pkr r )ϕ(m) = pk11 −1 (p1 − 1) . . . pkr r −1 (pr − 1) · ϕ(m). As pi − 1 is even for every i ∈ [r] the claim follows. Proposition 1.22. There are infinitely many n for which ϕ(n) is a perfect square. Proof. For every odd integer k = 2m + 1 > 1 we have that ϕ(2k ) = 2k−1 = 22m = (2m )2 . Definition 1.23. Let f be an arithmetic function. The summation function of f is given by X n 7→ f (d). d|n We write Φ(n) to denote the summation function of ϕ. The following asserts that Φ is the identity function. Theorem 1.24. For every n ≥ 1: Φ(n) = n. Proof. For each divisor d of n define Cd = {m ∈ [1, n] : (m, n) = d}. F Then the sets (Cd )d|n form a partition of the set [1, n], that is, [1, n] = d|n Cd . Indeed, every m ∈ [1, n] is either relatively prime to n in which case m ∈ C1 or is not relatively prime to n and in which case there is a common divisor d of n and m such that (m, n) = d. Then X n= |Cd |. d|n For an integer m ∈ [1, n] we have that (m, n) = d if and only if (m/d, n/d) = 1; that is, m ∈ Cd if and only if (m/d, n/d) = 1. Hence, |Cd | = ϕ(n/d) implying that X n= ϕ(n/d). d|n Observe that for every divisor d of n we have that n/d is a divisor of n. This means that d and n/d while not equal still range over the same set of integers, namely the divisors of n. Hence X X n= ϕ(n/d) = ϕ(d). d|n d|n 4 Number Theory ArielU 2016 Elad Aigner-Horev Example 1.25. For which integers n does ϕ(3n) = 3ϕ(n) hold? We start by observing that if (3, n) = 1 then ϕ(3n) = ϕ(3)ϕ(n) = 2ϕ(n); which is not exactly what we want. Now we note that ϕ(32 n) = ϕ(32 )ϕ(n) = (32 − 3)ϕ(n) = 3 (3 − 1) ϕ(n) = 3ϕ(3n). | {z } ϕ(3) This experiment shows that if instead of n we would have started with 3n we would have succeeded. So let us assume now that n = 3k m, k ≥ 1, where (3, m) = 1 and observe that we may write n = 3m0 so that ϕ(3 · 3m0 ) = ϕ(32 m0 ) = ϕ(32 )ϕ(m0 ) = 3(3 − 1)ϕ(m0 ) = 3ϕ(3m0 ). In particular this shows that ϕ(3n) = 3ϕ(n) holds if and only if n = 3k · m, k ≥ 1 and (3, m) = 1. So this identity would holds for multiples of 3. Note that both direction of the if and only if are proved in one stroke through the equalities. In fact a stronger property holds here. Let us show that 3 is not special and that pϕ(n) = ϕ(pn) holds if and only if n is a multiple of p. Both directions of the proof are included in the following equalities. Any multiple of p has the form pk m, k ≥ 1, where (p, m) = 1. Then ϕ(p · pm) = ϕ(p2 )ϕ(m) = p(p − 1)ϕ(m) = pϕ(p)ϕ(m) = pϕ(pm). §2. Euler’s theorem The aim of this section is to prove the following generalisation of Fermat’s little theorem. Theorem 2.1. (Euler’s theorem) Let n ∈ Z+ and let a ∈ Z satisfy (a, n) = 1. Then aϕ(n) ≡ 1 (mod n). Definition 2.2. Let n ≥ 1. A set of ϕ(n) integers such that (i) each is relatively prime to n, and (ii) any two distinct members are incongruent modulo n is called a reduced system of residues modulo n. Example 2.3. The canonical way to think of a reduced system of residues modulo an integer n ≥ 1 is by taking representatives from each of the ϕ(n) congruences classes identified by integers in [1, n − 1]. For instance, the set {1, 3, 5, 7} is the canonical reduced system of residues modulo 8. The set {3, 9, 15, 21} is another example for such a system. Note that 9 ≡ 1 (mod 8), 15 ≡ 7 (mod 8), and that 21 ≡ 5 (mod 8). So the new set simply employs "new" class names for the classes seen in {1, 3, 5, 7}. Like the original set the new set also has the property that each of its members is relatively prime to 8. The observant reader may notice that the new set was obtained from the old set by scaling it by 3 (i.e., multiplying each element by 3). The reason we were able to have the new set keep all properties of a reduced system of residues is that (3, 8) = 1. This next lemma explains the phenomenon seen in the last example. Lemma 2.4. Let n ≥ 1 and let a ≥ 1 such that (a, n) = 1. If r1 , . . . , rϕ(n) is a reduced system of residues modulo n then so is a · r1 , . . . , a · rϕ(n) . 5 Number Theory ArielU 2016 Elad Aigner-Horev Proof. We verify the terms appearing in Definition 2.2. To verify term (i) assume towards a contradiction that (arj , n) > 1 for some j ∈ [1, ϕ(n)] and let p be a prime divisor of (arj , n). Then either p | a and p | n or p | rj and p | n. As (a, n) = 1, by assumption, the first alternative is impossible. Similarly, as (rj , n) = 1, by assumption, the second alternative is also impossible. We reach a contradiction and thus verify (i) for every j ∈ [1, ϕ(n)]. We proceed to term (ii) in Definition 2.2. Suppose that arj ≡ ark (mod n) for some two distinct j, k ∈ [1, ϕ(n)]. Then as (a, n) = 1, by assumption, it follows that rj ≡ rk (mod n) which is a contradiction to those being incongruent. Prior to proving Euler’s theorem let us be reminded of the proof we provided for Fermat’s little theorem. Theorem 2.5. (Fermat’s little theorem) Let p be a prime and let a ∈ Z+ such that p 6 |a. Then ap−1 ≡ 1 (mod p). To Prove this theorem we showed that a · (2a) · (3a) · · · (p − 1)a ≡ 1 · 2 · 3 · (p − 1) (mod p). (2.6) This congruence asserts that the set {a, 2a, 3a, . . . , (p − 1)a} is represented modulo p by the reduced system of residues modulo p given by [1, p − 1]. In Euler’s theorem we substitute the prime p with a composite number n. However, the proof of Euler’s theorem is essentially the same as that of Fermat’s little theorem as seen next. Proof of Theorem 2.1. Given n and a as specified by Euler’s theorem we prove (ar1 ) · (ar2 ) · (ar3 ) · · · (arϕ(n) ) ≡ r1 · r2 · · · rϕ(n) (mod n), (2.7) where r1 , . . . , rϕ(n) is the canonical reduced system of residues modulo n. At this point the reader in encouraged to explore the similarities between (2.6) used in Fermat’s proof and (2.7) to be used here. Indeed, (2.7) is a special case of (2.6). As in Fermat’s proof note that the assumption that (a, n) = 1 together with (2.7) implies that aϕ(n) ≡ 1 (mod n). It remains to show that the set {ar1 , ar2 , . . . , arϕ(n) } forms a reduced system of residues modulo n and thus can be represented by the canonical such system modulo n and thus proving (2.7). This is the assertion of Lemma 2.4. We have seen how to use Fermat’s little theorem to deduce inverses modulo a prime. Euler’s theorem grants us a similar ability modulo composite numbers. Corollary 2.8. Let n > 1 be a positive integer and let a be an integer such that (a, n) = 1. Then the inverse of a modulo n is aϕ(n)−1 . Proof. By Euler’s theorem 1 ≡ a · aϕ(n)−1 (mod n). 6 Number Theory ArielU 2016 Elad Aigner-Horev §2.1 The Chinese remainder theorem: revisited. alternative proof of the Chinese remainder theorem. We use Euler’s theorem to provide an Theorem 2.9. (The Chinese remainder theorem) Let n1 , . . . , nr be pairwise relatively prime positive integers. Then the system x ≡ a1 (mod n1 ) x ≡ a2 (mod n2 ) ... x ≡ ar (mod nr ) has a unique solution modulo M = Q i ni . Proof. For k ∈ [r] set Mk = M/nk . Then ϕ(n1 ) ϕ(n2 ) x = a 1 M1 + a 2 M2 + · · · + ar Mrϕ(nr ) . As Mj ≡ 0 (mod ni ) whenever i 6= j we have that ϕ(ni ) x ≡ a i Mi (mod ni ), for every i ∈ [r]. Next, as (Mi , ni ) = 1 we have that ϕ(ni ) Mi ≡ 1 (mod ni ), by Euler’s theorem, for every i ∈ [r]. Then x ≡ ai (mod ni ), for every i ∈ [r]. The uniqueness part remains as in the original proof. 7