Concept

Modular arithmetic

Arithmetic on a finite dial, in which numbers differing by a multiple of the dial's size count as the same number. Addition and multiplication are well defined on the classes, which is what makes the dial a ring and not merely a labelling.

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

Arithmetic on a dial of 12. A dial with 12 positions. Starting at 8 and stepping forward 9 places lands on 5, because the walk passes the top 1 time on the way.

Numbers that wrap

A clock does arithmetic. It has finitely many numbers, addition never leaves it, and multiplication behaves entirely differently depending on one property of the size of the dial.

discrete · Modular arithmetic
The circle of radius √25 on the integer lattice. A circle drawn on the whole-number grid, with the lattice points it passes through marked.

Two squares, and a lattice

Whether a prime is the sum of two squares is decided entirely by its remainder on division by four. A fact about circles is settled by a fact about remainders, and neither statement contains any hint of the other.

number · Sums of two squares
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
One number, two dials: 3 and 5. A grid of remainder pairs, each cell holding the smallest number that leaves those two remainders.

Two dials at once

Watch one number on two clocks with different faces. If the faces share no factor, every pair of readings occurs exactly once — so two remainders name a number, and a hard calculation can be split into two easy ones.

number · Modular arithmetic
Counting a 5 by 3 rectangle two ways. Lattice points in a rectangle cut by a diagonal of slope q over p, coloured by which side they fall.

Counting one rectangle, twice

Whether seven is a square modulo eleven, and whether eleven is a square modulo seven, are two unrelated-looking questions. Their answers are linked, and the link is a rectangle of dots counted along its rows and then along its columns.

number · Quadratic reciprocity
A code on the 3-cube, and the balls around its words. The corners of a hypercube with the chosen codewords marked and the words within one error of each shaded.

Distance is a picture

A message is a corner of a cube and an error is a step along an edge. Everything a code can do is decided by how far apart the corners it uses are — and that is a fact about a drawing.

computation · Error-correcting codes
The arithmetic of GF(4), and of the integers mod 4. Addition and multiplication tables of a finite field, optionally beside the table of a ring of the same kind of size.

The field with four elements

The integers modulo four are not a field: two times two is zero and two has no reciprocal. There is nevertheless a field with four elements, and building it means giving up on counting as the way to make arithmetic finite.

computation · Finite fields
The non-zero elements of GF(16) as the powers of one of them. A ring of the field's non-zero elements in the order the powers of a primitive element produce them, beside a table of exponents.

Every element is a power of one of them

Pick the right element of a finite field and its powers run through every other non-zero element exactly once before returning to one. Multiplication becomes addition of exponents, and a table of q − 1 entries replaces the whole multiplication table.

computation · Finite fields
How many colourings each knot allows. Three knots, and the number of ways their arcs can be coloured with three, five and seven colours under the crossing rule, beside the determinant computed separately from the same crossings.

Colours that count more than three

Three colours prove the trefoil is knotted and say nothing at all about the figure-eight, which refuses them exactly as an unknotted loop does. The repair is to stop colouring and start counting — with five colours, or seven, and with the arithmetic done modulo the number of them.

topology · Knots
A subgroup of 2, and the 4 blocks it cuts the group into. The 8 symmetries of a 4-gon, split into 4 blocks by composing every element onto the subgroup {e, r²}. The blocks all have 2 elements and no element is in two of them.

The blocks a subgroup cuts out

Take any part of a group that is closed under composition, and it slices the whole group into blocks of its own size that do not overlap. Everything Lagrange's theorem says is arithmetic about that picture — and whether the blocks can be multiplied is a separate question with a surprising answer.

algebra · Symmetry groups
256 consecutive pairs from xₙ₊₁ = 137xₙ + 187 mod 256. Consecutive outputs of a linear congruential generator plotted as points of a square, falling on a small family of evenly spaced parallel lines.

The planes a recurrence cannot leave

One multiplication and one addition, taken modulo a fixed number, produce a sequence that passes for random one value at a time. Taken two or three at a time it does not, and the reason is a whole-number relation that pins every point onto one of a small family of parallel lines.

computation · Pseudorandomness
17 points coloured by whether their difference is a square. 17 points on a circle with every pair joined, coloured by whether the difference of their labels is a square modulo 17; the largest set of points all joined by one colour has 3 members.

Eighteen people, and the seventeen that escape

Among any eighteen people, four are mutual acquaintances or four are mutual strangers. Seventeen can be arranged so that neither happens, and the arrangement is not a lucky find — it is a rule about squares.

discrete · Ramsey theory
Two colours avoid a progression up to 8, and no further. The numbers 1 to 8 in the two colours that avoid three equally spaced numbers in one colour, with the number 9 beside them in both colours and the pattern each choice forces.

Three in a row on the number line

Colour the numbers one to eight in two colours and it can be arranged that no three equally spaced numbers agree. Add the ninth and it cannot. The structure being forced is arithmetic rather than graphical, and the proof is a different proof.

discrete · Ramsey theory
The 3 mutually orthogonal squares of order 4. Every Latin square built from the field of order 4 as a·i + j, one for each non-zero multiplier, with every pair checked orthogonal.

A field's worth of squares

Two orthogonal squares of order five are easy to stumble on. Four of them, every pair orthogonal, is not a stumble — it is one line of arithmetic over a field, and the field supplies as many as the order allows.

computation · Latin squares
Every fifth partition count divides, and the rank that says why. A row of partition counts with the ones in a congruence class marked, and a histogram of partitions sorted by rank.

Every fifth one divides

p(4) is 5, p(9) is 30, p(14) is 135, and every partition count at a number leaving four on division by five is divisible by five. Ramanujan read it off a table; the explanation is a way of splitting those partitions into five equal heaps.

number · Partitions
The two supplements, and the residue classes that decide them. A table of odd primes with the Legendre symbols of minus one and two beside the residue of p modulo four and modulo eight.

The two supplements, and where the eight comes from

The main law relates two odd primes to each other and says nothing about −1 or about 2. Those two are settled separately, by their own counts, and the answers arrive modulo four and modulo eight — which is a clue about where the whole subject is really taking place.

number · Quadratic reciprocity
Multiplication by 3 modulo 11, and the sign of the shuffle. Residues in two rows joined by strings showing where multiplication sends each one, with a strip beneath comparing the sign of the shuffle to the Legendre symbol for every multiplier.

The symbol is the sign of a shuffle

Multiplying every residue modulo p by a fixed number rearranges them. That rearrangement is a permutation, permutations have a sign, and the sign is exactly the Legendre symbol — so a question about squares becomes a question about crossings.

number · Quadratic reciprocity
Where a congruence decides which primes a form represents, and where it does not. Rows of primes marked by whether each is represented by x squared plus n y squared, with the residue classes that decide it where such classes exist.

Which primes a form takes

A prime is the sum of two squares exactly when it is 1 modulo 4. Change the form slightly, to x² + 27y², and no congruence on p decides it at all — which is where the elementary subject ends and its successor begins.

number · Quadratic reciprocity
The share that provably comes down. The proportion of starting values that fall below their own start within k steps, plotted against k up to 12. The proportion rises towards one; at the largest k drawn it is 0.94.

Almost every number comes down

The Collatz conjecture is open and a great deal about it is not. Whether a number falls below its own start in the first few steps is decided entirely by its remainder on division by a power of two, and the share of numbers for which it happens can be counted exactly.

dynamics · Collatz
The same modulus, four multipliers, four qualities. 4 linear generators at modulus 1021, drawn as scatters of consecutive pairs and ranked by the spacing of the lines their points fall on. The spacings differ by more than a factor of two.

The test that ranks the generators

Every linear generator's output lies on a family of parallel planes. Which generator is better is decided by how far apart those planes are, and that distance is the length of the shortest whole-number vector the modulus annihilates — a quantity that can be computed exactly rather than estimated by testing.

computation · Pseudorandomness
Four outputs are enough to find the rule. A row of 12 outputs of a linear generator, with the first 4 marked as given and the rest as predicted. The multiplier and increment recovered from the given ones reproduce every later output exactly.

Four numbers and the rule is yours

A linear generator can be solved. Given a few of its outputs, the multiplier and the increment fall out of two congruences, and every future output is then known exactly — which is a failure of a completely different kind from the lattice defect, and is not detected by any test of how evenly the points are spread.

computation · Pseudorandomness
A scatter with no lines in it. 900 consecutive pairs from a generator that squares modulo a product of two primes. The points show no family of parallel lines, and an exhaustive search for a short relation between consecutive outputs finds none.

Randomness that has to be earned

A generator that resists prediction cannot be built out of a rule anybody can fit. It has to be built out of a computation believed hard to undo, and the belief is the load-bearing part — which makes cryptographic randomness a conditional statement rather than a construction.

computation · Pseudorandomness
The primes below 100,000, by remainder mod 4. A bar for each remainder on division by 4, showing how many primes below 100000 leave it. The 2 classes sharing no factor with 4 hold near-equal counts; the rest are empty or hold one prime.

Infinitely many of one kind

Euclid's argument produces a prime nobody had listed, and says nothing about what it looks like. Ask for infinitely many primes ending in 3, or leaving a remainder of 1 on division by 4, and the same construction has to be aimed — and for most targets nobody knows how to aim it.

number · Infinitude of primes
Every parity pattern of length up to 12, and each occurring exactly once. A bar for each pattern length, showing the number of distinct parity patterns produced by all remainders of that power of two, which equals the number of remainders at every length.

Every pattern happens exactly once

Choose any sequence of odds and evens and there is exactly one residue class whose orbit follows it, and exactly one fraction that cycles through it forever. The Collatz conjecture is then the statement that only one of those infinitely many cycles is made of whole numbers.

dynamics · Collatz
The primes 3 mod 4 against the primes 1 mod 4, out to 30,000. A plot of the difference between the counts of primes in two residue classes, against the bound, showing a persistent lead for one class and where it is lost.

Every class, and in equal shares

Euclid's argument aimed at a residue class reaches some classes and stalls at others. The theorem covering all of them is Dirichlet's, its proof abandons arithmetic entirely for analysis, and what it proves is stronger than infinitude — the classes are equal, though not at any point anybody has counted.

number · Infinitude of primes
Pascal's triangle modulo 4, where one digit at a time is not enough. 32 rows of Pascal's triangle coloured by remainder modulo 4 — hue for the last base-2 digit, depth for the second. The digit-by-digit product that gives every remainder modulo 2 gets the remainder modulo 4 wrong at 100 of the 243 entries 2 does not divide.

A remainder read two digits at a time

Lucas' theorem reads a binomial coefficient's remainder on division by a prime off its digits one at a time. On division by the prime's square the same reading is wrong at four odd entries in ten. What replaces it still reads digits — in overlapping pairs, with the prime taken out first and a sign that the carries decide.

discrete · Pascals triangle
The coefficients of (1 + x)¹² sorted by remainder mod 3. The binomial coefficients of the 12th power coloured by the remainder of their index on division by 3, beside the 3 points one plus a root of unity, whose powers averaged pick out each colour's total.

Every third coefficient

Add every third number in the twelfth row of Pascal's triangle and the answer is 1366 — a third of 4096, rounded up. Which way the rounding goes is decided by two arrows of length one in the complex plane, and the same average over the roots of unity counts dice totals, subsets and necklaces.

algebra · Roots of unity
The zeros of x² + y² + z² over GF(5), and of x² + y² over GF(7). Grids of every point over a small prime field with the solutions of a quadratic equation filled in: the three-variable equation drawn as one slice per value of z, beside a two-variable equation with far fewer solutions.

Solutions that come in multiples of p

Count the solutions of x² + y² + z² = 0 in the field with five elements and there are 25; with seven, there are 49. Whenever a system of equations has more unknowns than its total degree, its number of solutions is a multiple of the characteristic — which forces a solution besides zero, and the reason is a sum over the field that vanishes because its non-zero elements form one cycle.

computation · Finite fields
The cubic curves over GF(43) with the most and the fewest points. The solutions of two equations y squared equals x cubed plus ax plus b over the field with 43 elements, drawn as dots on a square grid: the curve with the most points and the curve with the fewest.

Give or take twice the square root

A cubic curve over the integers mod 43 should have about 44 points — one for each value of x, on average, and one at infinity. No curve misses by more than 13, the largest whole number below 2√43, and every count from 31 to 57 belongs to some curve. The first fact is Hasse's theorem, the second Deuring's, and the way the counts spread between the limits is a semicircle.

computation · Finite fields
Bhāskara's cyclic method on x² − 61y² = 1, step by step. A table of the cyclic method's rows: the helper m chosen at each step and the near miss a² − Db² = k it produces, ending at k = 1 with the fundamental solution.

A method that is allowed to miss

Bhāskara's cyclic method solves x² − Dy² = 1 by aiming at the wrong target. It keeps a pair a, b with a² − Db² = k for some small k, combines it with a helper chosen so that k can be divided out, and repeats until k is 1. For D = 61 it reaches the ten-digit fundamental solution in 13 steps, where walking the convergents of √61 takes 22 — and for every D up to 100 it is faster.

number · Pell
The powers of 2 modulo 13, as a ring of 12. The non-zero residues modulo 13 placed on a circle, with the successive powers of 2 joined by straight lines into a closed walk of 12 steps.

One residue whose powers are all of them

Fermat's theorem says every order divides p − 1. It does not say that anything has order exactly p − 1, which is a separate and stronger claim — and what forces it is a count of how many numbers share each divisor with p − 1.

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 two squares of 97, produced by division. A table of the division chain on 97 and a square root of minus one modulo it, with each row's quotient and remainder, the point at which the remainder falls below the square root marked, and the two squares that add to 97.

The two squares actually produced

Three proofs say a prime one more than a multiple of four is a sum of two squares, and not one of them hands over the squares. Running the Euclidean algorithm half-way does — and where to stop is the whole of the correctness argument.

number · Sums of two squares
A plane of 13 points from a list of 4 numbers. A ring of 13 points with one block of 4 of them drawn as a closed path, beside the table of the 13 blocks its shifts produce.

A plane in a list of numbers

A projective plane of order three has thirteen points and thirteen lines and fifty-two incidences. All of it is in the four numbers 0, 1, 3, 9 — because their pairwise differences hit every non-zero residue modulo thirteen exactly once, and the plane is that list's thirteen shifts.

computation · Finite geometry
The walk x² + 1 modulo 101, drawn as the letter ρ. Starting at 2 and squaring and adding 1 modulo 101, the walk visits 8 values once on a tail and then runs round a cycle of 9 values for ever.

A collision that finds a factor

A walk through the remainders modulo a number must eventually repeat, and it repeats modulo each hidden prime factor long before it repeats modulo the number. Pollard saw that the earlier repeat can be detected without knowing the prime — and that its timing is the birthday problem, so the cost is the square root of the factor.

probability · Birthday problem
100 as three triangular numbers. 100 drawn as three triangles of dots with 36, 36 and 28 dots. There are 6 such decompositions.

Three triangular numbers, and no fewer

On 10 July 1796 Gauss wrote in his diary: ΕΥΡΗΚΑ — num = Δ + Δ + Δ. Every whole number is a sum of three triangular numbers. Two are not enough, and not by a little: the numbers that are sums of two thin out to a share of nought. Both facts are statements about squares in disguise, and one picture translates them.

geometry · Figurate numbers
441 factored two ways among the numbers of the form 4k + 1. Two factor trees for 441 among the Hilbert numbers, those one more than a multiple of four: one splits it as 9 times 49, the other as 21 times 21, and every factor is irreducible there.

A factorisation that hides its primes

Keep only the whole numbers one more than a multiple of four. They multiply among themselves and nothing is lost — yet 441 is 9 × 49 and also 21 × 21, and every one of those factors is unbreakable there. Unique factorisation turns out not to be a fact about multiplication at all.

number · Unique factorisation
Twenty-seven choices of trisector, and the eighteen equilateral triangles. Twenty-seven small panels, one for each choice of trisecting line at each corner of a triangle, each drawing the triangle and the triangle the chosen lines cut out; the eighteen equilateral ones are marked.

Eighteen equilateral triangles

Every angle of a triangle has three trisectors, not one, once the angle and its outside are both counted. Choosing one at each corner gives twenty-seven ways to cut out a triangle, and eighteen of them give an equilateral one. The nine that fail are exactly the choices whose labels add to 2, 5 or 8 — and all eighteen equilateral triangles have their sides in the same three directions, fixed by a third of the difference between two angles.

geometry · Morley
The Fermat quotient of 2 at every prime up to 4000, and where it is 0. A scatter of the Fermat quotient of 2 modulo p, divided by p, against p for the primes up to 4000; the points spread evenly between zero and one and reach zero at the Wieferich primes.

Two primes where Fermat holds twice

Fermat's theorem says p divides 2^(p−1) − 1. Usually p² does not. It does at 1093 and at 3511 and at no other prime anyone has found, in searches reaching past 10^19. The leftover, (2^(p−1) − 1)/p taken mod p, behaves like a random number, so a prime has about a one-in-p chance of the extra divisibility — and a random count with that chance grows so slowly that two by now is unremarkable, while nobody can prove there are any more, or that there are infinitely many primes where it fails.

number · Fermats little theorem
A + B modulo 13: 4 and 3 residues make 9. A clock face of residues with two sets marked on an inner ring and their sumset marked on an outer ring.

A sum of two sets modulo a prime cannot be small

Add every element of one set of residues to every element of another. Over the whole numbers the sums always number at least |A| + |B| − 1. Modulo a prime the sums can wrap round and collide, and still they never number fewer — the theorem Cauchy proved in 1813 and Davenport again in 1935. Modulo 12 they can. A polynomial of low degree explains the difference in a paragraph.

computation · Finite fields
Every residue joined to 2 times itself, on a dial of 199. A circle with 199 equally spaced points and a chord from each point k to the point 2k mod 199, with the 1-cusped curve the chords envelope drawn dashed.

Multiplying every number on the dial at once

Join every residue on a dial to twice itself and the chords draw a heart-shaped curve with one cusp; join each to three times itself and the curve has two. The picture is the whole multiplication map at once, and it holds three facts: the map splits the dial into cycles whose lengths are orders, those cycles on a dial of 2ⁿ − 1 are the binary necklaces of length n, and the curve is the caustic light draws inside a cup.

discrete · Modular arithmetic
Square roots of 2, lifted from one power of 7 to the next. A tree whose rows are the square roots of 2 modulo 7 to the powers 1 to 4, each joined to the root it reduces to; counts 2, 2, 2, 2.

A root lifted one digit at a time

On a dial of seven, 3 × 3 is 2. On a dial of forty-nine the square root of 2 must reduce to 3, so there are only seven candidates, and exactly one of them works: 10. On a dial of 343 exactly one lift of 10 works: 108. Each step adds one digit on the left, found by solving a linear equation, and the digits go on for ever — a number …21216213 whose square is 2, in a world where closeness means divisibility by seven.

discrete · Modular arithmetic
Whole-number points in a strip, and the shadow they cast. The lattice points satisfying 2x ≤ 5y ≤ 2x + 1 for x from 0 to 30, and their projection onto the x-axis, which repeats every 5.

Arithmetic with addition alone

Over the real numbers, a quantifier's shadow is described by inequalities. Over the whole numbers with addition and multiplication, a shadow can be any set a computer can list. In between lies arithmetic with addition and no multiplication, and there the shadows are always the same kind of thing: a finite exception, then a pattern that repeats. The whole numbers made from coins worth 6, 9 and 20 are every number from 44 on; the squares, which need multiplication, never repeat at all.

logic · Quantifiers
Two ways of counting that agree at every number. For n up to 40, the counts of partitions with gaps of at least two against partitions into parts congruent to 1 or 4 mod 5, on a logarithmic scale, equal at every n, with the second identity's counts beside them.

Two counts that agree for no visible reason

Write 10 as a sum of whole numbers that differ from each other by at least two, and there are six ways. Write 10 as a sum of numbers that each leave 1 or 4 on division by 5, and there are six ways. The same happens for 20 (thirty-one each), for 40 (three hundred and seventy-four each), for every number anyone has checked and every number there is. The two lists look nothing alike, and no one has found a simple way to turn one into the other.

number · Partitions

Named alongside it

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

Counting two waysCounting argumentPrimesCyclic groupQuadratic residueFinite fieldFermats little theoremLatticeSums of two squaresExhaustive searchExistence proofLegendre symbol

All concepts