The idea: one rule, and every start seems to fall to 1
Pick a whole number n and apply this rule again and again:
n even → n / 2
n odd → 3n + 1
Start at 6: 6, 3, 10, 5, 16, 8, 4, 2, 1. Start at 7: 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. Every start anyone has tried ends at 1, and from 1 the rule only loops 1 → 4 → 2 → 1. The Collatz conjecture (Lothar Collatz, 1937) says this happens for every start. Nobody has proved it.
Each number has exactly one next number, so all the sequences together form one tree with 1 at the root. Read backwards, a number m comes from 2m, and also from (m − 1)/3 when that is an odd whole number.
Hailstones: up and down before the fall
An odd step makes the number about 3 times bigger, an even step halves it, so the values bounce up and down like hail in a storm cloud before they drop to 1. That is why they are called hailstone sequences. 27 is the famous example: it wanders for 77 steps, climbs as high as 9232, and only reaches 1 after 111 steps. (Demo: 27 takes 111 steps and climbs to 9232.)
On a linear chart the peak fills the picture and the last 70 values look flat. On a log scale each grid line is 10 times the one below, a halving is always the same small drop, and the long climbs and falls become visible. (Demo: 27 on a log scale.)
Stopping time
The number of steps a start needs to reach 1 is its total stopping time (the page says "steps to 1"). It jumps around wildly: 26 needs 10 steps and 27 needs 111. (The plain stopping time is the number of steps until the value first drops below n.)
| start n | steps to 1 | highest value | reached at step | odd steps | even steps |
|---|---|---|---|---|---|
| 6 | 8 | 16 | 4 | 2 | 6 |
| 7 | 16 | 52 | 5 | 5 | 11 |
| 27 | 111 | 9232 | 77 | 41 | 70 |
| 97 | 118 | 9232 | 84 | 43 | 75 |
| 871 | 178 | 190 996 | 31 | 65 | 113 |
97 reaches 9232 too: from there it follows exactly the same 34 steps as 27, because after a shared value the rest of the sequence is the same. 871 is the start below 1000 that takes the longest. (Demo: 871, the slowest start below 1000, Demo: 6 step by step.)
Running it backwards: the Collatz tree
Going forward there is no choice: n has one next number. Going backwards, a number m can come from
- 2m, always (2m is even, and its half is m);
- (m − 1)/3, when that is an odd whole number, which happens when m leaves a remainder of 4 when divided by 6. For example 16 ← 5, 10 ← 3, 40 ← 13. (4 ← 1 is left out: that is the loop.)
So the tree from 1 is a long trunk of powers of two, 1 ← 2 ← 4 ← 8 ← 16, that branches at 16 into 32 and 5, and keeps branching. A number divisible by 3 never has an odd child (3m + 1 is never a multiple of 3), so beyond it the branch only doubles. The conjecture says this tree contains every positive whole number.
The paths of all starts from 1 to N share their tails, so the tree is much smaller than the sum of their lengths:
| starts 1 … N | different numbers | longest path | biggest value |
|---|---|---|---|
| 50 | 173 | 111 steps (n = 27) | 9232 |
| 500 | 1066 | 143 steps (n = 327) | 39 364 |
| 5000 | 10 871 | 237 steps (n = 3711) | 8 153 620 |
| 10 000 | 21 664 | 261 steps (n = 6171) | 27 114 424 |
The seaweed picture
To see the tree, draw each path backwards from 1 as a line: walk out from the root, and at every number turn a little left if it is even and a little more to the right if it is odd, as Edmund Harriss did. A number always sits at the same place, so paths that share a tail share the same piece of line, and the drawing grows like a plant: long runs of halvings curl one way, odd steps kick the other way. The page also makes each segment 0.99 times shorter than the one before it, so the outer branches are finer, and colours each segment by its number's steps to 1.
The angles are a free choice. The page offers three: seaweed (even +8°, odd −16°), kelp (+5°, −11°) and coral (+15°, −30°). The tree, and which numbers share which stems, are the same in all three; only the shape changes. The tree is turned so that its centre of mass sits straight above the root. (Demo: grow the seaweed for n ≤ 5000, Demo: all starts up to 10 000, coral angles.)
Grow adds the starts in 40 batches. The first batches add long new paths; later ones add mostly short twigs, because most of a new start's path is already in the tree. With 21 664 segments for N = 10 000 the tree is painted once into an off-screen image, like the dots of the bifurcation diagram on The Logistic Map, another simple rule repeated over and over.
Unproven: why it is hard
Computers have checked every start up to about 2⁶⁸ ≈ 3 × 10²⁰ (David Barina, 2020): all reach 1. That is strong evidence but not a proof; a counterexample could be a huge start that either climbs for ever or falls into a different loop.
A rough argument says sequences should shrink. After an odd step, 3n + 1 is even, and it can be halved once (half the time), twice (a quarter of the time), and so on: 2 halvings on average. So an odd step and its halvings multiply by about 3 / 4 on average, and the values drift down. But "on average" is not "always": the argument says nothing about rare starts, and a proof has to cover every single one.
The best result so far is Terence Tao's (2019): almost all starts (in a precise density sense) reach values below any slowly growing bound. John Conway showed in 1972 that some rules of the same kind (divide by one of several numbers or multiply and add, depending on the remainder) are undecidable: no algorithm can answer the question for them in general. Paul Erdős said: "Mathematics may not be ready for such problems."
Other number patterns that look simple and are hard to explain: the primes on the Ulam Spiral, found with the Sieve of Eratosthenes. A rule that does provably finish, because the numbers always get smaller, is Euclid's algorithm; and a recursive function such as factorial stops because each call is on a smaller number, which is exactly what nobody can show for 3n + 1.
What the page leaves out
Starts other than the five in the menu (the tree has them all up to 10 000), the "shortcut" form (3n + 1)/2, negative numbers (where other loops exist, such as −5 → −14 → −7 → −20 → −10 → −5), the stopping-time records and their growth, the parity-vector and 2-adic views, Conway's generalised rules, and other drawings of the tree (graph layouts, rings by steps to 1). The seaweed angles, the 0.99 shrink and the colours are an artist's choice, not part of the mathematics.