Generator

Counting a 5 by 3 rectangle two ways

A generator in the number library, called 27 times across 6 essays. Below: what it draws with nothing chosen and at each mode an essay asks for, what it checks while drawing, and everywhere it is used.

reciprocity is one function. Everything below came out of it during this build, at parameters taken from the essays rather than invented for this page — so a figure here is the same figure a reader meets in an essay, and if the generator changes, this page changes with it.

With nothing chosen

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.

The multiples of 5, modulo 13

The multiples of 5, modulo 13. Each multiple marked on a strip of residues, with the ones in the top half folded down.

The two supplements, and the residue classes that decide them

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 Gauss sum for 13, added one root at a time

The Gauss sum for 13, added one root at a time. Partial sums of the p-th roots of unity signed by the Legendre symbol, drawn as a walk closing on a point at distance root p from the origin.

Forty-two squares in a row

Forty-two squares in a row. p = 366791: partial sums of (n/p) for n ≤ 200: 0, 10, 20, 30, 40, 46, 54, 60, 64, 72, 78, 78, 88, 92, 98, 102, 108, 116, 122, 126, 132; least non-residue 43.

Half the primes stop at two

Half the primes stop at two. 2: 0.500114, 3: 0.250022, 5: 0.125236, 7: 0.062512, 11: 0.031122, 13: 0.015642, 17: 0.007901, 19: 0.003920, 23: 0.001931; largest value 53.

What it checks while it draws

Collected by running the family and recording what it asserted, not written here. The count is how many separate times the claim was put to the test while these drawings were made.

Where it is called

Every figure on this list is drawn by the same rule, so a change to the rule changes all of them at once. That is why the list is published.

Number

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

One sum, squared two ways

Add the p-th roots of unity, each taken with a plus or a minus according to whether its index is a square. The walk that results closes on a point at distance √p from the origin — and squaring that one number, evaluated two different ways, is the reciprocity law.

Number

The first number that is not a square

Modulo a prime, half the numbers are perfect squares. Count up from 1 and the first non-square is usually 2 or 3 — but modulo 366,791 the numbers 1 to 42 are all squares. How far the run of squares can last is one of the oldest open questions about primes: the truth is tiny, the proofs are huge, and the Riemann hypothesis would close most of the gap.

Number

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

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

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.

The whole library · What the figures prove