How it is calculated
The product runs over the distinct prime factors of n. For a prime p the result is p − 1.
φ(n) = n × ∏ (1 − 1/p)
Where the numbers come from
- Number
Example
φ(10) = 4. The numbers are 1, 3, 7, and 9.
Questions
What is φ(1)?
To 1: by this definition, the number 1 is coprime with itself.
Why this?
The function turns up in Euler’s theorem and when counting residues that have an inverse modulo n.
Does the factorization itself need to be on screen?
No. Only the value of φ(n) is shown. Look up the factors in the prime-number calculator.