Section 6.1 Euler's \(\varphi\)-function
Note that if \(p\) is a prime then, all nonzero elements in \(\mathbb{Z}_p\) have an inverse, since for \(0\neq a\in \mathbb{Z}_p, \gcd(a, p) = 1.\) Also if \(n\) is not a prime, then there is a divisor \(d\) of \(n,\) with \(1\lt d\lt n,\) so that \(\varphi(n)\leq n-2,\) thus we have proven our first result.
Theorem 6.1.1.
The number \(n\) is prime if and only if \(\varphi(n) = n-1.\)
A stronger statement, which has yet to be proved, is a conjecture of D.H. Lehmer.
Conjecture 6.1.2 (Lehmer).
The number \(n\) is prime if and only if \(\varphi(n)\vert n-1.\)
One of the implications is a consequence of the previous theorem, but the other is still wide open.
Theorem 6.1.3.
If \(n = p^k\) where \(p\) is prime, then
Proof.
The number \(\varphi(p^k)\) is the number of integers in the set
which are relatively prime to \(p^k;\) that is, divisible by \(p.\) Since every \(p\)th number is divisible by \(p,\) there are \(\dfrac{p^k}{p}=p^{k-1}\) numbers in \(A\) that are divisible by \(p.\) Thus the number of integers in \(A\) that are relatively prime to \(p^k,\) are
Theorem 6.1.4.
If \(A\) is a complete set of residues \(\mod{n},\) and \(x, b\in\mathbb{Z}\) with \(\gcd(x, n) = 1,\) then the set \(Ax + b = \{ax + b: a\in A\}\) is also a complete set of residues \(\mod{n}.\)
Proof.
If \(ax + b \equiv a'x + b\pmod{n}\) where \(a, a' \in A,\) then we have that \(ax\equiv a'x\pmod{n}.\) Since \(\gcd(x, n) = 1,\) we may cancel \(x\) so that \(a \equiv a'\pmod{n}.\) Thus since \(A\) is a complete set of residues, \(Ax + b\) is a complete set of residues, provided \(\gcd(x, n) = 1.\)
Theorem 6.1.5.
If \(\gcd(m, n) = 1,\) then \(\varphi(mn) = \varphi(m)\varphi(n).\)
Proof.
Let \(m, n\in\mathbb{N}\) with \(\gcd(m, n) = 1.\) The result is trivial if \(m\) or \(n\) is \(1\) since \(\varphi(1) = 1,\) so suppose that \(m, n\gt 1.\) Let us arrange the \(mn\) integers \(1, 2,..., mn\) into an array with \(n\) rows and \(m\) columns, as such:
These integers \(i\) form a complete set of residues \(\mod{mn},\) so \(\varphi(mn)\) of them are relatively prime to \(mn,\) or equivalently, \(\gcd(i, m) = \gcd(i, n) = 1.\) If we look that the columns we can see that all of the integers in a given column are equivalent \(\mod{m},\) thus exactly \(\varphi(m)\) of the columns consist of integers that are relatively prime to \(m,\) and the other columns consist of integers for which \(\gcd(i, m) \gt 1.\)
Now each column of integers that are relatively prime to \(m\) has the form
for some \(b.\) By the previous lemma this is a complete set of residues \(\mod{n},\) since \(\{0, 1, 2,..., n-1\}\) is and since \(\gcd(m, n) = 1.\) Therefore such a column contains \(\varphi(n)\) integers relatively prime to \(n,\) and so each of the \(\varphi(m)\) columns contains \(\varphi(n)\) integers relatively prime to \(n,\) so that the array contains \(\varphi(m)\varphi(n)\) integers \(i\) such that \(\gcd(i, m) = 1\) and \(\gcd(i, n) = 1.\) Thus \(\varphi(mn) = \varphi(m)\varphi(n).\)
Definition 6.1.6.
An arithmetic function \(f\) is said to be multiplicative if
whenever \(\gcd(m, n) = 1.\)
Example 6.1.7.
The Euler phi-function is multiplicative.
Corollary 6.1.8.
If \(n\) has the prime factorization \(n = p_1^{k_1}p_2^{k_2}\cdots p_r^{k_r},\) then
Proof.
This all rests on the fact that \(\gcd(p_i^{k_i}, p_j^{k_j})=1\) for \(i\neq j.\) Because of this we have
which is the desired result.
Example 6.1.9.
For \(n = 60 = 2^2\cdot 3\cdot 5,\) we have
One can also think of this example in terms of probabilities. Since the probability of a number being divisible by a prime \(p\) is \(\frac{1}{p},\) the probability of a number being coprime to \(p\) is \(1-\frac{1}{p}.\) So that relating this to each one of it's prime divisors, the above equation for \(\varphi(60)\) says that the probability that a number \(n\leq 60\) is coprime to \(60\) is \(\frac{16}{60}.\)
Remark 6.1.10.
The symbol
is interpreted to mean, "Sum the values \(f(d)\) as \(d\) runs over all the positive divisors of the positive integer \(n.\)"
Example 6.1.11.
If \(n = 10,\) then
Theorem 6.1.12.
If \(n\geq 1,\) then
Proof.
Let \(S = \{1, 2, 3,..., n\},\) and for each divisor \(d\) of \(n\) let
Now if \(d \neq d'\) then \(S_d\cap S_{d'}= \emptyset,\) so that since each \(a\in S\) is in \(S_d\) for some \(d\vert n,\) we have
Thus
So it is enough to show that \(\#S_d = \varphi(d).\) Now
If we define a \(a' = ad/n\) for each \(a,\) then \(a'\) is an integer since \(n/d = \gcd(a, n)\vert a.\) So dividing on the right-hand side by \(n/d\) we can rewrite the condition as
Thus \(\#S_d\) is the number of integers, between \(1\) and \(d,\) inclusive, which are relatively prime to \(d.\) This is the definition of \(\varphi(d),\) so \(\#S_d = \varphi(d),\) and we have \(n =\sum_{d\vert n}\varphi(d).\)
Section 6.1.1 Euler's Theorem
Definition 6.1.1.
Let \(a \in\mathbb{Z}_n\) be an invertible element, then \(a\) is called a unit to the modulus \(n.\) The subset set \(U_n\) of \(\mathbb{Z}_n\) is called the set of units to the modulus \(n.\)
Theorem 6.1.2.
If \(\gcd(a, n) = 1,\) then \(aU_n = U_n,\) where \(aUn = \{au: u\in U_n\}.\)
This theorem aids us in proving Euler's generalization of Fermat's Little Theorem.
Theorem 6.1.3 (Euler's Theorem).
If \(\gcd(a, n) = 1,\) then \(a^{\varphi(n)}\equiv 1 \pmod{n}.\)
Proof.
Let \(a\in \mathbb{N}\) and \(\gcd(a, n) = 1.\) Consider
Since \(\gcd(a, n) = 1, a \in U_n.\) So \(aU_n = U_n.\) Since the sets are equal, we know that the product of the elements are congruent mod \(n;\) that is,
so that
Since we have \(\gcd(u_i,n)=1\) for each \(i,\) we know that
and so we may cancel it from the congruence. So we have
which is Euler's Theorem.