How the Collatz Conjecture works
The Collatz conjecture (also called the 3n+1 problem, the Ulam conjecture, or the hailstone sequence) asks a simple question: starting from any positive integer, if you keep applying one rule, do you always eventually reach 1? This calculator builds the sequence for you and reports how long it takes and how high it climbs along the way.
The rule
For a positive integer n, repeat the following step until n equals 1:
- If n is even, the next term is n ÷ 2.
- If n is odd, the next term is 3n + 1.
Formally, f(n) = n/2 when n is even, and f(n) = 3n + 1 when n is odd. Every starting value tested so far eventually lands on 1, then would cycle 4 → 2 → 1 forever, which is why the sequence is defined to stop the first time it reaches 1.
What the calculator reports
Enter a starting number and the calculator runs the rule repeatedly, tracking the total number of steps (the "total stopping time") needed to reach 1, the peak value the sequence reaches before coming back down, and how many of those steps were odd-number steps (3n+1) versus even-number steps (n/2). The sequence terms are listed in the result summary, up to the display limit you choose, so you can trace the path term by term.
Why the numbers can surprise you
Small starting numbers can still produce large, erratic climbs before collapsing to 1. The classic example is 27: it looks unremarkable, but its sequence climbs to a peak of 9,232 and takes 111 steps to finally reach 1 — far more than most nearby numbers. There is no simple formula that predicts the step count or peak value from n alone, which is part of what makes the sequence interesting to explore.
Is it proven?
No. The Collatz conjecture remains unproven for all positive integers, despite being checked by computer for an enormous range of starting values — published searches have verified it for every starting number up to at least 2^68 (roughly 295 quintillion). Verifying a huge range does not amount to a mathematical proof; a single undiscovered counterexample, however large, would disprove it.