Collatz Conjecture Calculator
Trace the full Collatz sequence for any positive integer, showing every step until the sequence reaches 1. Ideal for visualizing the 3n+1 problem and analyzing stopping times.
About this calculator
The Collatz conjecture applies a simple rule repeatedly to any positive integer n: if n is even, divide by 2; if n is odd, multiply by 3 and add 1. Formally: n → n/2 (even), n → 3n + 1 (odd). Despite its simplicity, no one has proven that every starting number eventually reaches 1, though it has been verified computationally for all integers up to at least 2^68. The number of steps to reach 1 is called the stopping time or total stopping time. The sequence can rise dramatically before falling — starting from 27, the sequence peaks at 9232 before descending. The 'max value' metric reveals how high a sequence climbs, which varies widely and unpredictably across starting values.
How to use
Enter 6 as the Starting Number. Step 1: 6 is even → 6 / 2 = 3. Step 2: 3 is odd → 3 × 3 + 1 = 10. Step 3: 10 is even → 10 / 2 = 5. Step 4: 5 is odd → 5 × 3 + 1 = 16. Step 5: 16 / 2 = 8. Step 6: 8 / 2 = 4. Step 7: 4 / 2 = 2. Step 8: 2 / 2 = 1. The full sequence is 6, 3, 10, 5, 16, 8, 4, 2, 1 — 8 steps, max value 16. Enable 'Include Analysis' to see the step count and peak value automatically.
Frequently asked questions
Has the Collatz conjecture ever been proven true or false?
As of 2024, the Collatz conjecture remains unproven — it is one of the most famous open problems in mathematics. It has been computationally verified for all starting integers up to approximately 2^68 (about 295 quintillion), and every tested number does eventually reach 1. However, a complete mathematical proof has eluded mathematicians for decades. Terence Tao published a 2019 paper showing that 'almost all' Collatz sequences reach a value close to 1, which is the strongest partial result to date.
Why does the Collatz sequence always seem to reach 1 for every starting number?
Intuitively, the even rule halves the number quickly, while the odd rule (3n+1) always produces an even number, which is then halved. On average, consecutive applications reduce the magnitude: two steps on an odd number give (3n+1)/2, a factor of roughly 3/4 < 1 per pair of steps. This heuristic suggests convergence, but heuristics are not proofs. The unpredictable peaks and varying stopping times make a rigorous proof extremely difficult despite the simple rule.
What is the stopping time and why does it vary so much between different starting numbers?
The stopping time is the number of iterations required for a starting value to first reach 1. It varies wildly and non-monotonically — the number 27 takes 111 steps and reaches a peak of 9232, while 32 takes only 5 steps. This chaotic behavior arises because the even and odd rules interact in a highly sensitive way depending on the binary structure of the starting number. Researchers study stopping-time distributions statistically, but predicting the stopping time for an arbitrary large number remains computationally intensive.