Euler's totient function (euler_phi)
Euler's totient: how many whole numbers up to n are coprime to n.
How to write it
euler_phi(n)
- n
- A positive whole number. Takes a whole number.
Examples
euler_phi(36)In the solver,
Open in the solvereuler_phi(36)gives12.
Related functions
- euler_e
The n-th Euler number.
- extended_gcd
Greatest common divisor of two whole numbers with the multipliers that give it.
- factor_integer
Prime factorization of a whole number, as a list of prime and exponent pairs.
- divisors
The positive divisors of a whole number, in increasing order.
- fibonacci
The n-th Fibonacci number, with F(1) = F(2) = 1.
- divisor_sum
Sum of the positive divisors of a whole number.