The Collatz conjecture — also called the 3n+1 problem — is one of the most famous unsolved problems in mathematics. Starting from any positive integer, you repeatedly apply a simple rule: if the number is even, divide it by 2; if it is odd, multiply by 3 and add 1. The resulting sequence, called a hailstone sequence, always appears to reach 1, but no one has ever proved this for every positive integer. This visualiser lets you trace individual hailstone paths, compare stopping times across hundreds of numbers via a heat map, and explore the convergence tree showing which numbers lead to 1.
The conjecture was first studied by Lothar Collatz around 1937 and has since attracted the attention of many leading mathematicians, including Paul Erdos, who reportedly said "Mathematics is not yet ready for such problems." Despite its deceptively simple statement, the Collatz conjecture touches deep ideas in number theory, dynamical systems, and computational complexity.
The Collatz conjecture states that for any positive integer n, repeatedly applying the rule n/2 (if n is even) or 3n+1 (if n is odd) will eventually produce the value 1. The sequence of numbers generated along the way is called a hailstone sequence because the values rise and fall erratically before crashing to 1. Despite being verified computationally for all numbers up to roughly 2 to the power of 68, the conjecture remains unproven in general.
Type a starting number into the input box or drag the slider, then watch the Sequence view trace the full hailstone path on a log-scale chart. Use the Animate button to step through the path frame by frame. Switch to the Heat Map tab to see stopping times for all numbers up to your chosen range, colour-coded from blue (short) to red (long). The Tree tab shows the reverse Collatz tree, revealing how numbers converge toward 1 — the cyan edges highlight the path of your current starting number.
Starting from 27, the sequence reaches a peak of 9,232 before eventually descending to 1 after 111 steps — a dramatic excursion for such a small starting number. This happens because the 3n+1 rule applied to odd numbers can temporarily amplify values far above the original input, while the n/2 halvings slowly bring them back down. The ratio of maximum value to starting number for n=27 is about 342, making it one of the most striking examples in the small-number range.
The stopping time (also called the total stopping time) of a number n is the number of iterations of the Collatz rule needed before the sequence first reaches 1. Studying stopping times reveals a fractal-like structure: neighbouring integers can have wildly different stopping times, as seen in the heat map. Mathematicians analyse stopping times statistically — the average stopping time grows roughly as log(n), but individual values fluctuate enormously. Understanding stopping time distributions is one avenue researchers use to study whether the conjecture might be provable using probabilistic arguments.
As of 2026, the Collatz conjecture remains unproven. In 2019, Terence Tao published a landmark paper showing that "almost all" Collatz sequences do eventually reach 1, in a precise probabilistic sense, but a complete proof for every positive integer is still missing. No counterexample has ever been found despite exhaustive computer searches covering numbers up to 2 to the power of 68. The problem is considered one of the most notorious open questions in mathematics precisely because its statement is so simple yet its resolution appears to require fundamentally new mathematical ideas.
A common misconception is that because the conjecture has been verified for trillions of numbers it must be true and just needs a routine proof. In reality, there are many conjectures in number theory that hold for vast ranges of cases but ultimately fail for some extremely large number. The difficulty with Collatz is that the sequence behaviour seems genuinely chaotic — there is no obvious pattern or algebraic structure that would allow a proof by induction or straightforward analysis. The sheer size of verified cases does not substitute for a mathematical proof.
Lothar Collatz, a German mathematician, is credited with first posing the problem around 1937, though he may have considered it as early as 1932. The conjecture spread through mathematical circles largely by word of mouth and became widely known after being discussed at international conferences in the 1950s and 1960s. It has since appeared under many names: the Syracuse problem, Kakutani's problem, Ulam's problem, and Hasse's algorithm, reflecting how independently it was rediscovered by different researchers. The name "Collatz conjecture" became standard only gradually.
The Collatz conjecture is related to the study of iterated maps and dynamical systems on the integers. The Collatz tree shown in this visualiser is an example of a binary tree structure where each node has a unique predecessor under the "even" rule (2n) and possibly a second predecessor under the "odd" rule. Related problems include generalised 3n+k conjectures and the more complex 5n+1 problem, for which counterexamples (divergent sequences) are actually known, illustrating how sensitive these problems are to the exact rule chosen. Connections to the theory of automatic sequences and p-adic numbers have also been explored.
The Collatz problem itself is not used in practical technology, but it has significant connections to theoretical computer science. It is one of the first examples students encounter of an algorithm whose termination cannot be proved from its specification alone — directly relevant to the theory of computability and the halting problem. The Collatz function has also been studied as a benchmark for arbitrary-precision arithmetic, since champion starting numbers (like 837,799) produce sequences requiring very large intermediate values. Some cryptographic hash functions and pseudo-random number generators have been inspired by the mixing properties of chaotic integer maps similar to Collatz.
Current research directions include Tao's probabilistic approach (2019), which proved that for any function tending to infinity, almost all Collatz orbits attain values below that function — the closest anyone has come to a full proof. Other researchers are exploring connections to ergodic theory, tropical geometry, and the theory of aperiodic tilings. Computational efforts using distributed computing (such as the Collatz@Home project) continue to push the verified range higher. Some mathematicians suspect the conjecture may be undecidable within standard axiomatic systems, meaning it could be true but unprovable, placing it in the same category as certain statements studied in the foundations of mathematics.