Euler's totient function
What is the "Euler's totient function"? φ(x)
φ, Φ: phi
Euler's totient function or φ(x) is one of the important functions in number theory defined for an integer x x . It represents the number of positive integers less than or equal to x x that satisfy the following condition:
The number of positive integers n n less than or equal to x x such that n n is coprime to x x (gcd(x x , n n ) = 1).
This function is very useful, especially when dealing with prime factorization and number theory problems, and it is also used in modular arithmetic and cryptography (such as RSA encryption).
Definition
The formal definition of Euler's totient function φ(x x ) is as follows:
φ(x)=∣n∈Z+∣1≤n≤x,,gcd(x,n)=1∣φ(x) = n \in \mathbbZ^+ \mid 1 \leq n \leq x, , \mathrmgcd(x, n) = 1
Here, gcd(x,n) \mathrmgcd(x, n) is the greatest common divisor of x x and n n .
Calculation method
φ(x x ) can be calculated as follows:
Formula using prime factorization
If the prime factorization of x x is
x=p1e1p2e2⋯pkekx = p_1^e_1 p_2^e_2 \cdots p_k^e_k
(where p1,p2,…,pk p_1, p_2, \dots, p_k are the prime factors of x x ), the following formula holds:
φ(x)=x(1−1p1)(1−1p2)⋯(1−1pk)φ(x) = x \left( 1 - \frac1p_1 \right)\left( 1 - \frac1p_2 \right) \cdots \left( 1 - \frac1p_k \right)
Concrete example
1. In the case of x=9 x = 9 :
The divisors of 9 9 are 1,3,9 1, 3, 9 .
The numbers coprime to 9 9 are 1,2,4,5,7,8 1, 2, 4, 5, 7, 8 (6 numbers).
Therefore, φ(9)=6 φ(9) = 6 .
2. In the case of x=12 x = 12 :
The divisors of 12 12 are 1,2,3,4,6,12 1, 2, 3, 4, 6, 12 .
The numbers coprime to 12 12 are 1,5,7,11 1, 5, 7, 11 (4 numbers).
Therefore, φ(12)=4 φ(12) = 4 .
This function is related to many fundamental number-theoretic theorems, such as Euler's theorem and Fermat's little theorem. If you delve deeper, you will see its relationship with the properties of prime numbers and modular arithmetic!
Verificationφ(30) = 8
Φ(30) = 8 is the correct calculation result. To confirm this, let me show you the specific steps.
1. Prime factorization of 30
30=2⋅3⋅530 = 2 \cdot 3 \cdot 5
The prime factors are 2,3,5 2, 3, 5 .
2. Apply the Euler's totient function formula
The formula for Euler's totient function φ(x) φ(x) is as follows:
φ(x)=x(1−1p1)(1−1p2)⋯(1−1pk)φ(x) = x \left( 1 - \frac1p_1 \right) \left( 1 - \frac1p_2 \right) \cdots \left( 1 - \frac1p_k \right)
Here, with x=30 x = 30 , the prime factors are p1=2,p2=3,p3=5 p_1 = 2, p_2 = 3, p_3 = 5 . Substituting these in:
φ(30)=30(1−12)(1−13)(1−15)φ(30) = 30 \left( 1 - \frac12 \right) \left( 1 - \frac13 \right) \left( 1 - \frac15 \right)
Calculating each part:
φ(30)=30⋅12⋅23⋅45φ(30) = 30 \cdot \frac12 \cdot \frac23 \cdot \frac45
φ(30)=30⋅830=8φ(30) = 30 \cdot \frac830 = 8
Therefore, φ(30)=8 φ(30) = 8 .
3. List coprime numbers for verification
Count the positive integers less than or equal to 30 30 that are coprime (have a greatest common divisor of 1):
1,7,11,13,17,19,23,29 1, 7, 11, 13, 17, 19, 23, 29 (8 in total)
This is also correct.
Conclusion
We have shown that Euler's totient function φ(30)=8 φ(30) = 8 is correct through both the formula and direct verification! In this way, the properties of coprime numbers are very interesting in number theory.
The number of basic cycles of the prime sequence is listed here!
See above for details
cid: 674c1930-12cc-8009-8260-663f66e6ca3d