Calculate the count of numbers coprime to n
Enter a positive integer to calculate φ(n)
Euler's totient function φ(n) counts the number of integers between 1 and n that are coprime to n (their greatest common divisor with n is 1).
For a number n with prime factorization n = p₁a₁ × p₂a₂ × ... × pₖaₖ:
φ(n) = n × ∏(1 - 1/pᵢ)