What is Euler's theorem?

Euler's theorem

Euler's theorem is a generalization of Fermat's little theorem. Euler's theorem extends Fermat's little theorem by removing the imposed condition where nn must be a prime number. This allows Euler's theorem to be used on a wide range of positive integers. It states that if a random positive integer aa and nn are co-primeTwo numbers are considered to be co-prime if the only positive integer that divides them is 1, meaning that greatest common divisor of a and n is 1. GCD(a, n) = 1, then aa raised to the power Euler's totient function φ(n)\varphi(n) is congruent to 1(modn)1 \, (mod\, n). The mathematical form is as follows:

However, if nn is a prime number, Euler's theorem is simplified to Fermat's little theorem as follows:

As φ(n)=n1\varphi(n) = n - 1, where nn is a prime number, we can plug the value of the totient function into the equation above resulting in the equation as follows:

This becomes the alternate form of Fermat's little theorem.

Examples

The examples of Euler's theorem with varying values of aa and nn are given below.

Example 1

Let a=4a = 4 and n=7n = 7, aa and nn are co-prime as their greatest common divisor is 11. Now plug the values into Euler's equation above resulting in the equation as follows:

As φ(7)=6\varphi(7) = 6, we plug this value into the equation above resulting in the equation as follows:

We then simplify it as follows:

This equation suggests if we divide 40964096 by 77, we will get a reminder of 11. This proves that Euler's theorem is valid on the given values.

Example 2

Euler's theorem can be used to simplify and solve more complex problems where the values of aa and nn are not properly defined. Instead, a complex problem is given as follows:

The numbers 33 and 1010are co-prime, so we can apply Euler's theorem to this problem. Considering the equation above, we can take the values of aa and nn to be 33 and 1010, respectively. Applying these values to Euler's theorem, the equation is as follows:

As φ(10)=4\varphi(10) = 4, we plug this value into the equation above resulting in the equation as follows:

Using the equation above, we know that if we divide 343^4 by 1010, the remainder will be 11, but the original problem contains 3443^{44}. So we simplify the original problem as follows:

We can replace 343^4 with 11, as 341(mod10)3^{4} \,\cong 1\, (mod \,10)

Euler's theorem allows us to convert complex problems into simpler, computationally less expensive problems.

Application of Euler's theorem

Euler's theorem and Euler's totient function serve as a base for the modern RSA encryption algorithm. Euler's theorem is involved in the following processes of the RSA algorithm.

  • Key generation process
  • Encryption
  • Decryption

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved