Pick any whole number. If it is even, halve it. If it is odd, triple it and add one. Then do the same to the answer, again and again. That is the entire rule.
Try 6: 6, 3, 10, 5, 16, 8, 4, 2, 1. Try 7 and you get a longer wander: 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. Every number anyone has ever tried ends up at 1, and then loops 1, 4, 2, 1, 4, 2 for ever. Nobody has proved that every number does. This is the Collatz conjecture, and it is open.
Type a starting number, or tap a preset, and watch the path. The numbers rise and fall like a hailstone tossed about inside a storm cloud, which is why they are called hailstone sequences.
Orange dots mark odd numbers (the ×3+1 jumps); green ones are the halvings. Switch to log scale to see the small steps near the bottom.
Whether a number is big or small tells you almost nothing about how long it will wander. The number 27 looks harmless, yet it takes 111 steps to reach 1. It climbs to 9,232 (at step 77) before it falls, more than 340 times its starting value. Of those 111 steps, 41 are the triple-plus-one move and 70 are halvings. Below 100, the champion is 97, with 118 steps. Below 1,000 it is 871, with 178 steps and a peak of 190,996. Below 10,000 it is 6,171, with 261 steps.
Neighbours can behave very differently, too. Run 26 (10 steps) and then 27 (111 steps) and see how a one-unit change sends the path somewhere else entirely.
There is a loose argument for why the numbers should come down. After an odd number n becomes 3n + 1, the result is always even, so a halving must follow straight away. Bundle those two moves and an odd step multiplies the number by about 3/2, while an even step halves it. If odd and even steps came up like heads and tails, an equal mix would multiply the number by 3/2 × 1/2 = 3/4 per pair of steps. The drift is downward, so numbers should sink towards 1.
But that is a story about averages, and numbers are not coin flips. They follow a fixed rule, and a rule can have a rare path that climbs for ever, or a loop that never reaches 1. Nobody has found either. Nobody has ruled either out.
Computers have tested every starting number up to about 2⁶⁸, which is more than 10²⁰, and all of them reach 1. That is strong evidence, but not a proof, because a counterexample could sit at a number nobody has reached. Mathematicians have proved partial results (Terence Tao showed in 2019 that, in a precise statistical sense, almost all starting numbers end up far below where they began), but not the full claim.
The rule is simple enough for a child to follow, and the question it asks is beyond what current mathematics can settle. That mix is exactly why people keep trying numbers by hand and on computers.
There is a reason for the caution. In 1972 John Conway showed that slightly more general rules of this "do one thing if the number divides evenly, another if not" kind can be set up so that no method can decide in advance where they end up. Collatz itself is not known to be one of those, but it shows that innocent-looking rules can hide very hard questions.
Run a power of two, like 64 or 1024, and see it fall straight down. Then try 27 again and watch the cloud. Try 97 and compare its peak with 27's. Which starting numbers under 50 take more than 100 steps? (Hint: 27 is one of them; there are a few more.)