Generator

Pascal's triangle, 8 rows

A generator in the discrete library, called 31 times across 11 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.

pascal 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

Pascal's triangle, 8 rows. Each entry is the sum of the two above it.

show: "numbers"

Pascal's triangle, 8 rows. Each entry is the sum of the two above it.

show: "paths"

35 routes across a 4 by 3 grid. A grid with each cell holding the number of monotone routes reaching it. The far corner holds 35, which is the binomial coefficient of 7 choose 3.

show: "parity"

Pascal's triangle mod 2, 32 rows. Only the odd entries are drawn; the pattern that appears is the Sierpiński triangle.

show: "sierpinski"

Sierpiński's triangle, depth 5. A triangle with its middle removed, repeatedly, to the given depth.

show: "mod"

Pascal's triangle modulo 3, 27 rows. Entries divisible by 3 are left blank; the rest are shaded by remainder.

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.

Discrete

A polynomial that counts

Hang a counting sequence on the powers of a variable and the two ways of combining choices — this and that, this or that — become multiplication and addition, so a recursion turns into an equation and the equation can be solved.

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.

Probability

A bell curve assembled out of coin flips

Drop six hundred balls through a board of pegs, each bouncing left or right at random, and they pile up in a shape that can be predicted precisely. Nothing coordinated them.

Geometry

Circles that are diamonds and squares

The theorem hands over a formula for distance. Take the formula as a definition, change the exponent in it, and the set of points one unit from the origin stops being round — while remaining, in every sense that matters, a circle.

Discrete

Every entry counts the routes to it

Turn Pascal's triangle forty-five degrees and it becomes a grid of street corners, with each entry counting the ways of walking there. Identities between the entries then become statements about routes, and the statements are proved by cutting the routes in one place.

Geometry

Every square is a stack of odd numbers

Add up the odd numbers in order and the running totals are 1, 4, 9, 16, 25. This is not a coincidence, and the reason fits in a single picture.

Discrete

One sequence, counting everything

The number of ways to cut a polygon into triangles is 1, 2, 5, 14, 42. So is the number of ways to bracket a product, the number of binary trees, and the number of paths that never cross a diagonal. They are the same count, and the reason is one picture.

Discrete

Pascal's triangle, in two colours

Shade the odd numbers in Pascal's triangle and a fractal appears. Nothing was designed to produce it, and the same shape arrives independently from a completely different construction.

Discrete

The carries decide the divisibility

How many times a prime divides a binomial coefficient is not a fact about the coefficient at all. It is a count of the carries that happen when two numbers are added in that prime's base, which is a question about column addition and has nothing to do with choosing anything.

Probability

The path folded at its first touch

Counting the walks that touch a line looks like a question about a walk's whole history. Fold each one where it first touches, and it becomes a question about where walks end up — which is a binomial coefficient, and is already known.

Discrete

The run that lands one place along

Add up a run of entries down one of Pascal's diagonals and the total is another entry of the triangle — one row further down and one place along. The same triangle holds four more sums of that kind, and each is a different question answered by the same additive rule.

The whole library · What the figures prove