Generator

The sieve of Eratosthenes below 100

A generator in the number library, called 55 times across 12 essays. Below: what it draws at its defaults and at each mode an essay asks for, what it checks while drawing, and everywhere it is used.

sieve 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.

At its defaults

The sieve of Eratosthenes below 100. A grid of the whole numbers with the composites struck out by the prime that removes them.

show: "bertrand"

Between every number and its double. The interval from n to twice n, drawn for n up to 26, with the primes inside each marked. Every interval contains at least one.

show: "pnt"

π(x) against its two estimates, up to 8,000. The ratio of the prime counting function to x over the logarithm of x, and to the logarithmic integral, plotted against x. The first is above one and coming down slowly; the second is close to one throughout.

show: "gaps"

The gaps between primes below 300. One bar per consecutive pair of primes, its height the distance between them.

show: "counts"

π(x) below 3000. A staircase counting the primes, with x over the natural logarithm of x beside it.

show: "product"

The sieve as a product, and the sum over the primes. The whole numbers up to 60, with those built only from 2, 3, 5 marked — the numbers the product of three geometric series multiplies out to. Beside them, the sum of the reciprocals of the primes, which grows without bound.

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

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

Number

Always one before the double

A density says what happens on average and permits long empty stretches. This says something a density cannot — that the stretch from any number to twice it contains a prime, at every scale, without exception.

Number

Counting what has no formula

There is no expression that gives the nth prime, and yet the number of primes below a bound is predictable to within a fraction of a per cent — by a function that is not a formula for the primes but an integral of the wrong-looking quantity.

Number

The primes are what is left over

Eratosthenes' sieve does not find the primes. It removes everything else, one prime at a time, and whatever survives is prime by default — which is a strange way to reach the most studied objects in arithmetic.

Number

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

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

There is no last prime

Euclid's argument is often described as producing a new prime from any finite list. It does not, and the number it builds is frequently composite — which makes the proof more interesting rather than less.

Number

Numbers that are their own parts

Six is one plus two plus three. Twenty-eight is one plus two plus four plus seven plus fourteen. Euclid explained where such numbers come from; Euler proved there are no others of that kind; and whether an odd one exists has been open for two thousand years.

Number

The sieve that cannot finish

Sifting out the composites is the oldest method in the subject and it has a ceiling nobody has raised. The reciprocals of the twin primes add to a finite number, so no argument that measures thickness can reach them — and the inclusion–exclusion every sieve truncates goes wildly wrong before it goes right.

Number

The sieve written as a product

Multiply out one geometric series for each prime and every whole number appears exactly once, as a single term. That identity turns a statement about factorisation into a statement about convergence, and it is where the analytic study of the primes begins.

Number

The size of a number with no formula

There is no closed expression for the number of partitions of n. There is an expression for how large it is — with a square root in the exponent and a π in front — and it is accurate enough that rounding a few terms of its refinement gives the exact count.

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 infinitudes are proved

The primes never stop, and neither — apparently — do the twin pairs, the primes one more than a square, or the Mersenne primes. Three of those four statements are theorems and one is not, and counting the members of each family tells nobody which.

The whole library · What the figures prove