This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


gives the Euler totient function .
  • Integer mathematical function, suitable for both symbolic and numerical manipulation.
  • gives the number of positive integers less than or equal to n which are relatively prime to n.
  • is taken to be equal to .
  • EulerPhi automatically threads over lists.
Table of values:
Plot the sequence:
Table of values:
Click for copyable input
Plot the sequence:
Click for copyable input
Evaluate for large arguments:
EulerPhi threads element-wise over lists:
TraditionalForm formatting:
EulerPhi works for negative integers:
A surprising result for powers of 10:
Number of order-n Farey fractions with denominator n:
Plot the cumulative sum of EulerPhi:
Compare with an asymptotic approximation:
First several -s where the difference is negative:
The probability that two randomly chosen positive integers less than x are relatively prime:
Compare with the asymptotic limit:
Number of cyclic necklaces of length n that can be formed with b types of beads:
Power series of the generating function for GCD:
Count the number of primes using EulerPhi:
Model Fleck's totient function:
reproduces the Euler totient function:
Generalizations and closed forms:
Use FullSimplify with assumptions to simplify expressions containing EulerPhi:
EulerPhi is a multiplicative function:
Calculate EulerPhi through prime factorization:
Calculate a generating function of EulerPhi:
Value at 0:
Form an absolutely abnormal number as the limit of the following sequence:
Digits of the sixth approximation in various bases:
Iterate the map and display result modulo :
The only 8 solutions of :
New in 1