Concept

Primality test

A computation certifying that a number is composite without producing a factor. Raising a base to one less than the number is the cheapest such test, and the composites it cannot catch are exactly those whose unit orders all divide one less than the number.

Named by 7 essays across 2 fields — each of them below, with the objects they name alongside it.

Necklaces of 5 beads in 2 colours. Every string of beads, grouped by the rotations that carry one onto another.

Necklaces that prove a theorem

Thread five beads in two colours, thirty-two ways. Two of them are all one colour; the other thirty fall into rings of five. That count, and nothing else, is Fermat's little theorem.

number · Fermats little theorem
The orders of the 8 units modulo 15. A strip of the units modulo 15 with each one's multiplicative order beneath it, the largest order marked at 4 against φ(15) = 8.

The exponent that is smaller than Euler's

Euler's theorem raises every unit to the count of the units and gets one. The smallest exponent that works for all of them at once is often much smaller — and a composite is invisible to Fermat's test exactly when that smaller number divides n − 1.

number · Fermats little theorem
The powers of 4 roots, added: 1, −1, 4, −5. For k from 1 to 4, the k-th powers of the roots of a degree-4 polynomial drawn as arrows placed tip to tail. Each walk ends on the real axis at a whole number, the k-th power sum, which the coefficients determine.

Every power sum, from the coefficients alone

Raise the roots of a polynomial to the k-th power and add them. However the roots turn, the total is a whole number when the coefficients are, and Newton's identities produce it from the coefficients one step at a time — no root is ever found. Run the rule on x³ − x − 1 and out comes Perrin's sequence, whose terms know which numbers are prime, nearly.

algebra · Polynomial roots
A witness that 97 is prime: 5 has order 96. A table of the checks Lucas's test makes on 97 with base 5: the power (n − 1)/q for each prime q dividing n − 1, none of which is 1.

An order that proves a prime

Fermat's little theorem is a test that primes pass and composites mostly fail, and it can be fooled. Run backwards, it cannot. If some number a has order exactly n − 1 modulo n, then n is prime — because only a prime has n − 1 numbers to cycle through. Checking that takes the prime factors of n − 1, which need proofs of their own, and the proofs nest into a tree that anyone can check: Pratt's certificate, which shows every prime has a short proof of being one.

number · Fermats little theorem
The necklaces of 7 beads with 3 black. C(7, 3) = 35 arrangements in 5 rotation classes of sizes 7, 7, 7, 7, 7.

The row that proves a prime

Fermat's little theorem can be fooled: 561 passes it for every base and is not prime. Thread necklaces with a fixed number of black beads instead of any colours at all, and the count becomes a statement about a whole row of Pascal's triangle — every middle entry of row n is a multiple of n exactly when n is prime — which no composite can fake. Written as polynomials it is (x + a)ⁿ = xⁿ + a, and cut down to size it is the first proof that primes can be recognised in polynomial time.

number · Fermats little theorem
Class numbers of x² + ny², with Euler's idoneal numbers marked. A scatter of class number against n up to 2000, on a logarithmic scale, with the 65 idoneal numbers marked on the power-of-two levels.

Euler's sixty-five convenient numbers

For some n, whether a prime can be written as x² + ny² is settled by its remainder on division by 4n alone, the way a prime's remainder on division by four settles whether it is a sum of two squares. Euler found sixty-five such n, from 1 to 1,848, called them convenient, and used the largest to prove that 18,518,809 is prime. Every one of them is a number whose class group has no element of order more than two — and whether the list is complete is still not known.

number · Unique factorisation
Euclid's argument run twenty times. The first 20 terms of the Euclid–Mullin sequence: 2, 3, 7, 43, 13, 53, 5, 6221671, 38709183810571, 139, 2801, 11, 17, 5471, 52662739, 23003, 30693651606209, 37, 1741, 1313797957.

Euclid's proof run as a machine

Euclid proved there is no last prime by multiplying the primes on any list, adding one, and noting that the result has a prime factor not on the list. Run the proof as a machine — start from 2, and each time take the smallest prime factor of one more than the product so far — and it produces 2, 3, 7, 43, 13, 53, 5, 6221671, … a sequence that never repeats, that reaches small primes late and large ones early, and that nobody can prove reaches every prime.

number · Infinitude of primes

Named alongside it

The objects these essays reach for when they reach for this one.

Fermats little theoremModular arithmeticPrimesCompositeCounting two waysExhaustive searchOrderPolynomialBinomial coefficientCarmichael numberClass groupClass number

All concepts