Trace the hailstone sequence of any number and find the most stubborn starter up to a limit.
The Collatz conjecture (the 3n+1 problem) starts with any whole number and
applies one simple rule over and over: if the number is even, divide it by 2, and if it is odd, multiply
it by 3 and add 1. The conjecture says every starting number eventually reaches 1.
Example: 6 → 3 → 10 → 5 → 16 → 8 → 4 → 2 → 1, so 6 reaches 1 in 8 steps.
The values rise and fall like hailstones, which is why the path is called a hailstone sequence.
Trace a number
Find the most stubborn number
The starter with the longest sequence. Calculated in your browser. Limited to 1000000 to stay responsive.