Generator

Pascal's triangle, 8 rows

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

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.

With nothing chosen

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

Pascal's triangle, 8 rows

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

Pascal's triangle modulo 4, where one digit at a time is not enough

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.

C(13, 4) modulo 4, read in windows of 2 base-2 digits

C(13, 4) modulo 4, read in windows of 2 base-2 digits. The addition of 4 and 9 in base 2 with its carries, and a table reading the digits of n, k and n − k in overlapping windows of 2. The windows' ratios of factorials without multiples of 2 multiply, with a sign from the carries, to 3 — the remainder modulo 4 of the coefficient with its 2s removed.

Every fifth row of Pascal's triangle repeats the triangle modulo 125

Every fifth row of Pascal's triangle repeats the triangle modulo 125. Two small triangles side by side: the first 7 rows of Pascal's triangle modulo 125, and the entries C(5n, 5k) modulo 125. They agree at 28 of 28 places, and the differences are multiples of 5³.

A polygon of 4 points averaged down to its curve at t = 0.40

A polygon of 4 points averaged down to its curve at t = 0.40. A control polygon of 4 points, the 3 rounds of weighted averaging at t = 0.40 drawn as nested polylines, the single point they end at, and the whole curve those points trace. The weights on the control points are 0.216, 0.432, 0.288, 0.064.

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.

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.

Discrete

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.

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.

Discrete

Averaging down the triangle

Change one word in the rule that builds Pascal's triangle — take a share of each entry above instead of adding them — and the triangle stops counting and starts averaging. The same rule then draws smooth curves from polygons and approximates every continuous function by polynomials, at a rate that no amount of smoothness can improve.

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