Collatz Conjecture
The Collatz rule is simple: halve even numbers, triple plus one odd numbers. Every tested starting value eventually reaches 1, but nobody has proved it always will.
Each step applies n / 2 for even numbers or 3n + 1 for odd numbers. The log scale keeps huge spikes visible. Try 27, 97, or 871 — the sequence may climb far above its starting value before crashing to 1.
What you are seeing
If n is even, the next value is n / 2. If n is odd, the next value is 3n + 1.
The sequence can rise dramatically before falling. The number of steps to reach 1 is the stopping time.
The conjecture says every positive integer eventually reaches 1. It has been verified for enormous ranges but never proved in general.
Why it matters
Collatz is a famous open problem that is easy to state and surprisingly hard to solve. It illustrates how simple deterministic rules can create unpredictable behavior.
Complexity & details
Each step is O(1), but the stopping time varies irregularly. Values can exceed the starting number by a large factor.
Frequently asked questions
Has the Collatz conjecture been proved?+
No. It has been verified computationally for very large starting values, but no general proof is known.
Why do some sequences grow so much?+
Odd steps multiply by about 3, while even steps divide by 2. A run of odd steps can produce a large spike before enough divisions bring it down.