Skip to main content
Calkulon
Natrag na vodiče
3 min read6 Steps

Euler's Totient Function: A Step-by-Step Guide

Calculate φ(n) manually

Preskočite matematiku — koristite kalkulator

Upute korak po korak

1

Find the Prime Factorization of n

First, find the prime factors of n and express it as a product of prime factors. For example, if n = 12, the prime factorization is 2^2 * 3.

2

Apply the Formula

Next, plug in the values into the formula. Using the example from step 1, φ(12) = 12 * (1 - 1/2) * (1 - 1/3) = 12 * (1/2) * (2/3) = 4.

3

Worked Example

Let's calculate φ(20). The prime factorization of 20 is 2^2 * 5. Using the formula, φ(20) = 20 * (1 - 1/2) * (1 - 1/5) = 20 * (1/2) * (4/5) = 8.

4

Common Mistakes to Avoid

Make sure to find the correct prime factorization of n. Also, be careful when calculating the product of fractions in the formula. A common mistake is to forget to subtract 1 from the numerator of each fraction.

5

Using a Calculator for Convenience

While it's possible to calculate φ(n) manually, it can be time-consuming for large values of n. In such cases, you can use a calculator or a computer program to calculate φ(n) quickly and accurately.

6

Practice and Verify

To become proficient in calculating φ(n), practice with different values of n and verify your results using a calculator or other resources. This will help you build confidence and fluency in applying the formula.

Introduction to Euler's Totient Function

Euler's totient function, denoted by φ(n), is a fundamental concept in number theory that counts the number of positive integers up to n that are coprime with n. In this guide, we will walk you through the steps to calculate φ(n) manually.

What is Coprime?

Two numbers are coprime if their greatest common divisor (GCD) is 1. For example, 8 and 15 are coprime because their GCD is 1.

Formula

The formula for Euler's totient function is based on the prime factorization of n. If n is expressed as a product of prime factors as p1^k1 * p2^k2 * ... * pn^kn, then φ(n) can be calculated using the formula: φ(n) = n * (1 - 1/p1) * (1 - 1/p2) * ... * (1 - 1/pn)

Step-by-Step Calculation

To calculate φ(n), follow these steps:

Spremni za izračun?

Preskočite ručni rad i ostvarite trenutne rezultate.

Otvori kalkulator

Postavke

PrivatnostUvjetiO nama© 2026 Calkulon