Ch3 Euler’s totient function Flashcards
Definition 3.1.1 (Euler’s totient function)
For n ≥ 1, the totient of n, written ϕ(n), is the number of integers k such that 1 ≤ k ≤ n which are coprime with n
(that is, gcd(k, n) = 1).
(For a positive natural we find the totient of n # of integers in {1,…n} s.t gcd(k,n)=1 coprime to n)
Example 3.1.2. *
ϕ(10)
ϕ(1) =
ϕ(p)
ϕ(10)=4
(2,5 and 10 are factors 4,6,8 not coprime)
: the set of numbers between 1 and 10 which are
coprime with 10 is {1, 3, 7, 9};
ϕ(1) = 1
ϕ(p)= p-1 iff p is prime p>2
by the lemma its a multiplicative funct
ϕ(10)=ϕ(5)ϕ(2) = 1*4
ϕ(pqr) = (p-1)(q-1)(r-1) by this too
multiplicative functs
ϕ(n) is a multiplicative funct
if two numbers are coprime gcd(p,q)=1
ϕ(pq)=ϕ(p)ϕ(q)
ϕ(pqr) = (p-1)(q-1)(r-1) by this too
Other multiplicative funct:
d(n)~# divisors of n
= sum_{d|n} 1
(for two comprimes its multiplicative)
sigma(n)= sum_{d|n} d
(sum of divisors relates to perfect numbers)
sigma_k is
Möbius function
remark multiplicative functs
Remark 3.1.5. A function f : N^{≥1} → N is called multiplicative if f (ab) = f (a) f (b)
whenever a and b are coprime. It is completely multiplicative (or totally multiplicative)
if f (ab) = f (a) f (b) for every a, b. Such functions are ubiquitous in number theory.
Some examples:
(1) d(n) := Σd|n 1: the number of positive divisors of n;
(2) σ(n) := Σd|n d: the sum of the positive divisors of n;
(3) σk(n) := Σd|n d_k: the sum of the k-th powers of the positive divisors of n (note
that d(n) = σ0(n), σ(n) = σ1(n);
(4) the Möbius function
μ(n) =
1 if n = 1
(−1)k if n is a product of k distinct primes
0 otherwise.
completely multiplicative
None of those functions is completely multiplicative: for instance d(4) = 3 ̸= d(2)2.
Completely multiplicative functions include instead:
* 1(n) := 1: the constant function 1;
* Id(n) := n: the identity function;
* n → n^k.
Remark 3.1.3. totient
The number ϕ(n) is exactly the size of the group
(Z/nZ)×.
Indeed, we are looking at the numbers between 1 and n which are coprime to n;
this is the same as the numbers between 0 and n − 1 which are coprime to n.
This immediately implies that if a is coprime with n, then
a^ϕ(n) ≡ 1 (mod n). We’ll come back to this
taking an element a from the group and raising to the power when gcd(a,n)=1
Lemma 3.1.4.
totient function of coprime naturals
If m, n ∈ N are coprime, then ϕ(m)ϕ(n) = ϕ(mn).
“multiplicative function”
“won’t spend too much time on, what that means”
holds only when n,m are coprime not in general
PROOF of
If m, n ∈ N are coprime, then ϕ(m)ϕ(n) = ϕ(mn).
Consider mapping:
F : {0, 1, . . . , mn − 1} → {0, 1, . . . , m − 1} × {0, 1, . . . , n − 1}
defined by F(k) = (a, b), where a is the remainder of k
modulo m (congruence class of k mod m k=a mod m)
and
b the remainder of k modulo n. (k=b modn)
k mapped to (a,b)
Since gcd(m,n)=1: By the Chinese Remainder Theorem, the map F is a bijection( onto (because x ≡ a (mod m) and x ≡ b (mod n) has a solution for every a, b) and injective (because the solution is unique modulo mn).
To state this more abstractly, the map Z/mnZ → Z/mZ × Z/nZ defined as above is a bijection
Observe, k is coprime to mn.
IFF
k is coprime to n and k is coprime to m. (not using m and m coprime) (by Corollary 1.1.12)
IFF
a is coprime to n and b is coprime to m s.t (a,b)=F(k)
(whether k is coprime to m dep on when a coprime to m, because k ≡ a (mod m) and k ≡ b (mod n))
The numbers of k’s coprime to mn is ϕ(mn); the numbers of pairs (a, b) where a is coprime to m and b is coprime to n is ϕ(m)ϕ(n). Thus ϕ(mn) = ϕ(m)ϕ(n).
Remark 3.1.5.
missed some notes??
Thm Eulers product thm 3.2.1
(used for powers of primes using (p^α=pᵃ))
For a prime power p^α
, ϕ(pᵃ) = pᵃ − pᵃ⁻¹ = pᵃ(1 − (1/p))
(from prev thm)
In general, if n = p₁ᵃ¹· · · pₜᵃᵗ , (using ftoa)
where the pᵢ’s are distinct prime factors of n,
then (we can apply the thm as each prime factor is comprime to the others)
ϕ(n) = (pᵃ-¹ - pᵃ-¹⁻¹)· · ·(pᵃ-ᵗ - pᵃ-ᵗ⁻¹)·)
=n(1- (1/pₜ))· · · (1 - (1/pₜ))
eulers product thm proof
used for powers of primes using (p^α=pᵃ))
For a prime power p^α
, ϕ(pᵃ) = pᵃ − pᵃ⁻¹ = pᵃ(1 − (1/p))
(from prev thm)
In general, if n = p₁ᵃ¹· · · pₜᵃᵗ , (using ftoa)
where the pᵢ’s are distinct prime factors of n,
then (we can apply the thm as each prime factor is comprime to the others)
ϕ(n) = (pᵃ-¹ - pᵃ-¹⁻¹)· · ·(pᵃ-ᵗ - pᵃ-ᵗ⁻¹)·)
=n(1- (1/pₜ))· · · (1 - (1/pₜ))
Take a prime power pᵃ . Since p is prime, the only numbers not coprime with pᵃ are the multiples of p; below pᵃ {p,2p,3p,…,p²,…,p^n} so there are pᵃ/p of them= pᵃ⁻¹
Eg multiples of prime until prime to the power of alpha minus one
ϕ(pᵃ)= # coprime to p below pᵃ are pᵃ-pᵃ⁻¹ many.
(when n is the power of a single prime)
For general n, just use that ϕ is multiplicative and combine the above result. As long as factors are pairwise coprime, distinct factors taken as fundamental thm of arithmetic.
ϕ(n) = (pᵃ-¹ - pᵃ-¹⁻¹)· · ·(pᵃ-ᵗ - pᵃ-ᵗ⁻¹)·)
=n(1- (1/pₜ))· · · (1 - (1/pₜ))
ϕ(m) link to group
ϕ(m) is also the cardinality of the multiplicative group {z/mz}*
Example 3.2.2. ϕ(2560)=
3.2.2. ϕ(2560) = ϕ(2^9 · 5)
= 2560(1 − 1/2)(1 − 1/5)
= 1024.
Extra.We can also verify manually that ϕ(2560) = 1024.
Indeed, the numbers not coprime
with 2560 are the numbers divisible by 2 and the numbers divisible by 5. There are 2560/2 = 1280
numbers below 2560 that are divisible by 2; and 2560/5 = 512 are divisible by 5; we are counting twice the numbers that are multiple of 10, and there are 256 of those.
Thus, the numbers not coprime with 2560 are 1280 +512 −256 = 1536; so the numbers coprime
with 2560 are 2560 − 1536 = 1024.
Theorem 3.2.3 (Euler / Euler-Fermat theorem (Euler, 1763))
If a is coprime with n,
then aᵠ⁽ⁿ⁾ ≡ 1 (mod n).