Generator

The Collatz orbit of 27

A generator in the dynamics library, called 46 times across 8 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.

collatz 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

The Collatz orbit of 27. Halve an even number, triple an odd one and add one; the sequence plotted on a logarithmic scale.

The share that provably comes down

The share that provably comes down. The proportion of starting values that fall below their own start within k steps, plotted against k up to 12. The proportion rises towards one; at the largest k drawn it is 0.94.

The first 5 steps, decided by the start

The first 5 steps, decided by the start. A table of the 32 residues modulo 32 and the parity string each produces over 5 steps of the Collatz rule. All 32 strings are distinct, and the ones that shrink the number are marked.

The tree above one, 9 levels up

The tree above one, 9 levels up. The reverse Collatz tree rooted at one, drawn to depth 9, holding 32 numbers. Each level doubles the numbers of the one below and adds the odd numbers whose tripling lands there.

Every parity pattern of length up to 12, and each occurring exactly once

Every parity pattern of length up to 12, and each occurring exactly once. A bar for each pattern length, showing the number of distinct parity patterns produced by all remainders of that power of two, which equals the number of remainders at every length.

64 patterns, 64 rational cycles, 2 of them whole

64 patterns, 64 rational cycles, 2 of them whole. A table with one row per number of odd steps, giving how many patterns have that many, the denominator their solutions share, and how many of those solutions are positive whole numbers.

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.

Dynamics

Almost every number comes down

The Collatz conjecture is open and a great deal about it is not. Whether a number falls below its own start in the first few steps is decided entirely by its remainder on division by a power of two, and the share of numbers for which it happens can be counted exactly.

Dynamics

Every pattern happens exactly once

Choose any sequence of odds and evens and there is exactly one residue class whose orbit follows it, and exactly one fraction that cycles through it forever. The Collatz conjecture is then the statement that only one of those infinitely many cycles is made of whole numbers.

Dynamics

Fourteen fractions that list the primes

Change the Collatz rule so that the multiplier depends on the remainder modulo some other number than two, and the resulting maps can compute anything a computer can. John Conway proved it in 1972, which means no method can decide, for every such map, whether its orbits come down — and fourteen fractions, applied in order, turn out to be enough to print every prime.

Dynamics

How high an orbit climbs

The Collatz orbit of 27 climbs to 9,232 before it falls, and below ten million the champion, 6,631,675, climbs to sixty trillion — almost exactly the square of where it started. That is not a coincidence of the two numbers but a law of the whole family: an orbit climbs to x times its start with a chance of about one in x, and the exponent is one because half of three-halves plus half of a half is exactly one. Among N starts the luckiest climbs about N-fold, and so the records grow like the square of the start.

Dynamics

How short a cycle could be

The drift argument cannot see cycles at all, which is why it is not a proof. What can see them is arithmetic — a cycle's shape has to be a fraction that approximates the logarithm of three to base two extraordinarily well, and there are very few such fractions.

Dynamics

The heuristic that cannot be a proof

There is a two-line argument that the Collatz conjecture is true, it is convincing, and everybody who works on the problem believes it. It also cannot be turned into a proof, and understanding exactly where it fails is more instructive than the argument itself.

Dynamics

The question nobody can answer

Halve it if it is even, triple it and add one if it is odd. Every number anyone has tried comes down to one. Nobody can prove they all do, and the reason is not that the problem is hard to state.

Dynamics

Where the Collatz map is a coin

Extend the Collatz map from the whole numbers to the 2-adic integers — binary strings that run on for ever to the left — and it stops being mysterious. It becomes, after a change of coordinates, the simplest chaotic system there is: shifting a string of coin tosses one place. Everything about it is then known, and none of it says anything about the whole numbers, which is the most instructive failure in the whole story.

The whole library · What the figures prove