Generator

mediant

A generator in the number library, called 7 times across 2 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.

mediant 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 Stern–Brocot tree to depth 4Every positive rational, each appearing exactly once, generated by taking mediants.11122113233231142535344353524115 fractions, all in lowest terms, none of them twiceand left to right they are already in order

show: "farey"

The Farey sequence of order 7Every fraction in the unit interval with denominator at most n, marked on a line.0/11/71/61/51/42/71/32/53/71/24/73/52/35/73/44/55/66/71/11/82/93/103/84/95/95/87/107/97/819 fractions, and every neighbouring pair has p′q − pq′ = 1the fraction under each arc is the mediant — the next one to appear as the order rises

show: "ford"

Ford circles up to denominator 7A circle of diameter one over q squared resting on each fraction p over q; neighbours touch.0/11/31/22/31/1each circle has diameter one over its denominator squared, and rests on its own fractiontwo circles touch exactly when the fractions are Farey neighbours — nothing overlaps anywhere

What it checks while it draws

Collected by running the family and listening to lib/verify.js, not written here. The count is how many separate times this build put that claim to the test.

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.

The whole library · What the figures prove