Euler's totient function (also called the Phi function) counts the number of positive integers less than that are coprime to . That is
We can calculate via this formula
where are the distinct primes dividing
Euler's totient function (also called the Phi function) counts the number of positive integers less than n that are coprime to n. That is
ϕ(n)=card{m∈N∣1≤m<n and gcd(m,n)=1}We can calculate ϕ(n) via this formula
ϕ(n)=n(1−p11)(1−p21)⋯(1−pk1)where p1,p2,…,pk are the distinct primes dividing n