For an integer modulus and an integer with greatest common divisor , Euler's theorem, also called the Fermat-Euler theorem, statesHere Euler's totient function counts the units in the unit group . These congruence classes have modular multiplicative inverses, equivalently their representatives are coprime to . The guaranteed return to one permits exponent reduction for units.[ref]
For a prime number , , recovering Fermat's little theorem in the form when . Multiplying by and separately handling gives for every integer . For a composite number used as the integer modulus, a nonzero congruence class can be a nonunit.
Modulo twelve, the units have representatives , so Euler's totient function gives . Multiplication by five producesThus this permutation has two permutation cycles, each of length two. In particular , and the guaranteed return follows. The number of units need not be the length of one permutation cycle. Modulo fifteen, multiplication by seven similarly gives the two permutation cycles and , covering all eight units. The powers of seven follow the permutation cycle containing one; the other permutation cycle shows that these powers do not visit every unit.
There is a stronger obstruction for a nonunit than just an occasional failed calculation. If a positive integer divides both and , then for every , so cannot be congruent to one modulo . For example, and , rather than one. Such a base has no multiplicative order modulo that integer modulus.[ref]
Orders of Units in Modular Arithmetic by Keith Conrad. p. 2, explanation following Example 1.8: a positive-exponent return to one forces coprimality
Euler's theorem is a fundamental statement in number theory that relates to modular arithmetic. It is particularly useful for working with integers and their properties under modular exponentiation. The theorem states that if \( a \) and \( n \) are coprime (i.e.
New to topics? Read the docs here!
