LearnViz Math
Expert ⛓ Discrete Math & Number Theory Topic 82 of 103

Euler’s Totient Function

Count integers coprime to n.

Key idea

Count integers coprime to n.

In depth

φ(n) counts integers from 1 to n coprime to n. For prime p, φ(p) = p − 1; φ(pᵏ) = pᵏ − pᵏ⁻¹; and φ is multiplicative for coprime arguments. Generally φ(n) = n Π(1 − 1/p).

Worked example

φ(12) = 12 × (1/2) × (2/3) = 4: the numbers 1, 5, 7, 11.

Formula

φ(n) = n∏(1−1/p)

Real-world uses

Common mistake

Applying multiplicativity to numbers that share factors.

How to learn this

  1. Read the key idea and say it in your own words.
  2. Work through the worked example, then try a similar problem.
  3. Use the interactive lesson’s visual and mini-quiz to check the pattern.

Frequently asked questions

What is Euler’s Totient Function?

Count integers coprime to n. It is a topic at the expert level in Discrete Math & Number Theory.

What is the formula for Euler’s Totient Function?

The key formula is φ(n) = n∏(1−1/p).

Where is Euler’s Totient Function used in real life?

Real-world examples: Counting numbers coprime to n; The key quantity behind RSA encryption.

What should I learn before Euler’s Totient Function?

Make sure you are comfortable with Fermat’s Little Theorem, the previous topic in Discrete Math & Number Theory.

What is a common mistake with Euler’s Totient Function?

Applying multiplicativity to numbers that share factors.

How can I practise Euler’s Totient Function?

Open the interactive lesson, play with the visual, then answer the three-question mini-quiz. Getting two right marks the topic complete.

What comes after Euler’s Totient Function?

Move on to Euler’s Theorem next.

Related expert topics in Discrete Math & Number Theory