Carmichael number Created 2026-09-24 Updated 2026-10-18
A Carmichael number is a composite number for whichEvery unit modulo satisfies the same modular congruence supplied by Fermat's little theorem for a prime number. The name refers to Robert Daniel Carmichael. The coprime qualification is essential: a nonunit can expose a prime factor through a greatest common divisor calculation. A Carmichael number is therefore a Fermat pseudoprime to every coprime base, rather than to every nonzero residue class.[ref]
Carmichael Numbers and Korselt's Criterion by Keith Conrad. Definition 1, printed p. 1: composite input and coprime bases
For example,The factors are distinct prime numbers. Their predecessor numbers all divide , so Korselt criterion applies. More explicitly, for any integer coprime to , Fermat's little theorem givesThe Chinese remainder theorem combines these into . This proves all coprime bases pass from three short divisibility checks, rather than from a long table of sampled bases.
Equivalently, a composite is a Carmichael number exactly when for every integer , including nonunits. The equivalence follows from Korselt criterion: modulo each prime factor, either is zero or its nonzero power returns to one, and squarefreeness combines those congruences. This does not say a nonunit satisfies . For instance gives , while ; the greatest common divisor already supplies the factor three.[ref]
The Carmichael function supplies another compact description: a composite is Carmichael exactly when . For , and . In contrast, Euler's totient function gives , which does not divide . The least common return exponent, rather than the number of units, controls this test.
The obstruction is useful to know when interpreting a Fermat primality test: even checking every coprime base cannot certify primality. The passing-base fraction for the Fermat test makes this failure quantitative. Stronger primality tests require additional structure, such as the squaring conditions in a Miller-Rabin primality test.
The historical record predates the name. Václav Šimerka's 1885 paper lists on printed page 224, together with factorizations. This is an early published list of examples, independently of their later name.[ref]
Zbytky z arithmetické posloupnosti by Václav Šimerka. Zbytky z arithmetické posloupnosti, printed p. 224, §9: list beginning with 561 and 1105; archive title sheet identifies Václav Šimerka and 1885
Euler's theorem Created 2026-10-03 Updated 2026-10-13
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
Exponent reduction for units 2026-10-14
For a unit modulo n and a nonnegative integer , division with remainder writes with . Euler's theorem then givesThis replaces a potentially enormous exponent by a small remainder. The exponent itself is reduced modulo Euler's totient function, while the powers are reduced modulo : these are different integer moduli.
For a worked modulo-fifteen calculation, seven is coprime to fifteen and . ThereforeUse exponentiation by squaring on the remaining exponent , reducing after each multiplication:Thus . Modular exponentiation supplies the computation; Euler's theorem supplies the optional shortening of its exponent. Exponentiation by squaring also works for nonunit bases, without using this shortening.
The guaranteed exponent is a common return exponent and an upper bound on the shortest period; it need not be that period. The multiplicative order is the least positive return exponent for the chosen unit. The Carmichael function is the least positive return exponent that works for every unit. Their precise relation isEither smaller return exponent can replace in exponent reduction for units. Modulo fifteen, , so gives immediately. For base four the multiplicative order is only two, smaller even than . A return at exponent eight alone does not prove that the multiplicative order is eight.[ref]
Actual power periods, Carmichael function exponents and Euler return exponents
. Each row lists powers from exponent zero through eight. Highlighted first returns identify multiplicative orders; the accompanying labels distinguish a chosen base's shortest period, the common exponent for all units, and Euler's totient function. Powers of the nonunit three modulo fifteen repeat after an initial term but never return to one at a positive exponent. The final calculation compares reduction of modulo eight and modulo four. Details. Fermat witness 2026-10-14
A Fermat witness for an integer is a nonzero residue class represented by for which . It proves that is a composite number by Fermat's little theorem. Here the definition includes nonunits; some conventions restrict Fermat witnesses to bases coprime to . The Fermat primality test can first compute the greatest common divisor: if , it already has a proper factor. A zero residue class is excluded. [ref]
Fermat's Test by Keith Conrad. Keith Conrad, Fermat's Test, p. 2, Definition 2.4 and footnote 3 on the two witness conventions
Choose a reduced residue system . For a unit modulo n , the bijection on the unit group has inverse . Comparing products before and after this permutation givesThe product is a unit; its modular inverse cancels it, proving Euler's theorem. Merely being nonzero would not justify cancellation.[ref]
Euler’s Theorem by Keith Conrad. pp. 2–3, Section 2: permutation of the units, comparison of products, cancellation
In the modulo-twelve example, . The permuted representatives have the same product, while the unreduced products equal . Equating these products modulo twelve exposes the fourth power without calculating it directly. Using all nonzero congruence classes instead would include nonunits, whose product need not permit cancellation.
Passing-base fraction for the Fermat test 2026-10-18
Among the units modulo , the passing residue classes form the kernel of a group homomorphism . If each trial samples independently and uniformly from those units, with replacement, the probability that trials all pass is . This statement assumes that sampling rule; it does not describe arbitrary or dependent choices of bases.
For , the Chinese remainder theorem identifies the unit group with cyclic groups of orders and . The number of solutions of is , among units. Thus . The Carmichael numbers and have passing fractions and , so their conditional false-pass probability remains one regardless of the number of independent trials.
Past exam of the mathematics course of the University of Cambridge 2018 ib Paper 3 1G b Solution Created 2026-09-24 Updated 2026-10-03
The algebraic norm on is and satisfies multiplicativity of the algebraic norm. The calculation in part (a) therefore gives all elements of norm :If one of these factored into two nonunits, multiplicativity would force both factors to have norm . But the Diophantine equation has no solution. Hence all six displayed elements are irreducible. This is a standard example in which an irreducible element need not have prime norm.
Polynomial division Created 2026-09-24 Updated 2026-10-18
Polynomial division separates a polynomial into a multiple of a chosen divisor and a smaller polynomial remainder. Given over a field , with , there are unique polynomials satisfyingHere is the polynomial quotient. The bound concerns polynomial degree, rather than the sizes of the coefficients.[ref]
Fields and Galois Theory by James S. Milne. Fields and Galois Theory, version 5.10, Chapter 1, p. 10, §1.6: division algorithm, zero remainder alternative and uniqueness
For an original example over the rational numbers, takePolynomial long division first cancels by subtracting :Subtracting one more copy of cancels :ThusThe final polynomial remainder has polynomial degree one, below the divisor's polynomial degree two. Multiplying out the last identity checks every coefficient, including the constant term .
The polynomial degree bound makes this decomposition useful: it replaces a potentially long polynomial with a short polynomial remainder whenever multiples of can be discarded. At any root of a polynomial of , those multiples vanish under polynomial evaluation. Repeated polynomial division also drives the Euclidean algorithm for finding a greatest common divisor of polynomials.
The coefficient setting matters. Over a commutative ring, the same existence and uniqueness hold when the divisor's leading coefficient is a unit in a ring. A monic polynomial therefore works over the integers, even though they do not form a field; monic polynomial division over a ring explains why zero divisors cause no difficulty in that case.[ref]
Chapter 3 Ring theory. Abstract Algebra, Chapter 3 Ring theory, §3.9, Theorem 3.9.1: division with a unit leading coefficient
A nonzero divisor alone is insufficient over the integers. Dividing by with an integer polynomial quotient and a constant polynomial remainder would require for an integer , which is impossible. Over the rational numbers the division instead givesThe obstruction is the nonunit leading coefficient . This example separates existence from uniqueness: over an integral domain, the polynomial degree argument still makes any admissible pair unique, if it exists.




