Collatz Conjecture Path Analyzer
An introduction to the 3n+1 problem and the trajectories this analyzer traces
The Collatz conjecture — variously called the 3n+1 problem, the Syracuse problem, Hasse's algorithm, Kakutani's problem and Ulam's problem — asks whether one absurdly simple rule always ends the same way. Take a positive integer. If it is even, halve it. If it is odd, triple it and add one. Repeat. The conjecture claims that whatever integer you start from, the sequence eventually reaches 1 and then falls into the cycle 1 → 4 → 2 → 1. Nobody has proved it, and after nearly nine decades it remains genuinely open. Jeffrey Lagarias, whose 1985 survey in the American Mathematical Monthly and whose 2010 edited volume The Ultimate Challenge: The 3x+1 Problem are the standard references, has repeatedly warned that the problem is far harder than its statement suggests and that amateur attacks on it are almost always circular.
This analyzer is a laboratory instrument for that problem rather than a party trick. Given any positive integer — including integers far beyond what a browser can hold as an ordinary floating-point number — it runs the trajectory exactly in big-integer arithmetic and reports the quantities that working number theorists actually use: the total stopping time, the Terras stopping time (the first descent below the seed), the peak the trajectory reaches, the amplification factor, the split between tripling steps and halving steps, and the empirical ratio of halvings to triplings that drives the standard heuristic argument for why the conjecture ought to be true. It draws the whole excursion on a logarithmic axis so that the characteristic sawtooth climb-and-collapse structure is visible at a glance, and it exports the trajectory as CSV so you can take the numbers somewhere else.
Two properties make Collatz trajectories worth plotting rather than merely counting. First, the map is wildly non-monotone in the seed: 26 reaches 1 in 10 steps, 27 needs 111. Second, the excursion is enormous relative to the seed. Starting at 27, a two-digit number, the trajectory climbs to 9232 — roughly 342 times its starting point — before collapsing. That combination of a trivial rule, chaotic step counts and violent excursions is exactly why the problem has resisted every standard technique in dynamics, ergodic theory and analytic number theory.
How to use the Collatz path analyzer on a seed of your choice
Type a positive whole number into the seed field. There is no practical upper bound: the field accepts an arbitrary run of digits and the engine promotes it to a BigInt, so a 40-digit seed is handled with the same exactness as the number 7. Decimal points, minus signs, scientific notation and stray letters are rejected with a specific message rather than being silently rounded — a common failure mode in Collatz tools that call parseInt and quietly turn 5.9 into 5.
Choose a trajectory detail level. Summary reports the statistics and draws the chart. Full trajectory additionally lists every term of the sequence, which is useful when you want to eyeball where the odd steps cluster. Toggle the logarithmic axis off if you would rather see the raw magnitudes; for anything but tiny seeds the logarithmic view is far more informative, because a linear axis collapses the whole tail of the trajectory onto the baseline.
After a run, the chart responds to the mouse, to touch, and to the left and right arrow keys once it has keyboard focus, reporting the exact value at each step index. The Download CSV button writes a two-column file of step index and exact term. The Copy shareable link button rewrites the address bar with your seed and options encoded in the query string, so a colleague opening the link sees the same analysis without retyping anything. Reset clears the form, the chart and the announcements together, so nothing stale is ever left on screen.
The Collatz formula, the Syracuse map and the two different stopping times
The Collatz map is defined on the positive integers by a single case split. For any positive integer n:
Writing the trajectory as a sequence with a0 = n, the iteration continues until a term equals 1, at which point the trajectory enters the cycle 1 → 4 → 2 → 1 and every further step just repeats it. Starting from 5, for instance, the trajectory is 5 → 16 → 8 → 4 → 2 → 1, so five steps are needed.
Because every odd term is immediately followed by an even one — 3n+1 is even whenever n is odd — the literature usually works with the accelerated or Syracuse map, which folds that forced halving into the odd branch:
The word "stopping time" means two genuinely different things in this subject, and conflating them is the single most common error in popular write-ups. Riho Terras, in his 1976 Acta Arithmetica paper, defined the stopping time of n as the first moment the trajectory drops strictly below its own starting value:
The total stopping time, by contrast, is the number of iterations needed to reach 1. Counted on the unaccelerated map that is exactly the sequence catalogued as OEIS A006577, "the number of halving and tripling steps to reach 1 in the 3x+1 problem". This analyzer reports both, plus the step index at which the unaccelerated trajectory first falls below the seed, so the two notions can never be mistaken for one another.
Terras proved something remarkable and often misquoted: the set of integers with finite stopping time has natural density 1. In other words almost every integer, in the density sense, does eventually descend below itself. That is a very long way from the conjecture, because a single descent says nothing about what happens next, and a set of density zero is still allowed to be infinite. The strongest modern result in this direction is due to Terence Tao, who proved in 2022 that almost all Collatz orbits, in the sense of logarithmic density, attain almost bounded values — for any function f tending to infinity, the orbit minimum of N is at most f(N) for almost all N. Again, "almost all" is not "all".
The heuristic that makes mathematicians believe the conjecture is a simple averaging argument. On an odd term the map produces roughly 3n/2 after the forced halving; on an even term it produces n/2. If odd and even terms alternate with probability one half each, the expected multiplicative factor per step of the accelerated map is
A factor below 1 means trajectories should shrink geometrically on average, which is why nobody expects a counterexample. Equivalently, a trajectory that starts at n and ends at 1 with h halving steps and t tripling steps must satisfy the near-identity below, so the ratio h/t should sit close to log23 ≈ 1.585. The analyzer prints your trajectory's measured ratio next to that constant.
A worked example: reading the trajectory of the notorious seed 27
The integer 27 is the standard demonstration case because it is small enough to write out in full yet behaves outrageously. Its trajectory is:
27 → 82 → 41 → 124 → 62 → 31 → 94 → 47 → 142 → 71 → 214 → 107 → 322 → 161 → 484 → 242 → 121 → 364 → 182 → 91 → 274 → 137 → 412 → 206 → 103 → 310 → 155 → 466 → 233 → 700 → 350 → 175 → 526 → 263 → 790 → 395 → 1186 → 593 → 1780 → 890 → 445 → 1336 → 668 → 334 → 167 → 502 → 251 → 754 → 377 → 1132 → 566 → 283 → 850 → 425 → 1276 → 638 → 319 → 958 → 479 → 1438 → 719 → 2158 → 1079 → 3238 → 1619 → 4858 → 2429 → 7288 → 3644 → 1822 → 911 → 2734 → 1367 → 4102 → 2051 → 6154 → 3077 → 9232 → 4616 → 2308 → 1154 → 577 → 1732 → 866 → 433 → 1300 → 650 → 325 → 976 → 488 → 244 → 122 → 61 → 184 → 92 → 46 → 23 → 70 → 35 → 106 → 53 → 160 → 80 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
Reading that trajectory the way the analyzer does gives six numbers. The total stopping time is 111 steps, which is exactly the value published as A006577(27) in the On-Line Encyclopedia of Integer Sequences — a good independent check that any implementation is correct. Of those steps, 41 are tripling steps on odd terms and 70 are halving steps on even terms, giving a measured ratio of 70/41 ≈ 1.707 against the predicted log23 + (log227)/41 ≈ 1.701 — agreement to better than half a percent, which is the heuristic above working in miniature. The peak is 9232, so the amplification is 9232/27 ≈ 341.9×. The trajectory does not fall below its own seed until step 96, where it reaches 23; equivalently the Terras stopping time on the accelerated map is σ(27) = 59. Any calculator claiming an amplification of "339×" for 27 has simply divided badly: 9232/27 = 341.93 to two decimals.
Note also that 27, 31, 41, 47, 54, 55, 62, 63, 71, 73, 82, 83, 91, 94, 95 and 97 all funnel through 9232 — the same peak value. Once two trajectories merge they are identical forever, so the peak is a property of the merged path rather than of the individual seed, and that is why so many two-digit seeds share it.
Record-setting trajectories and what the analyzer reports for them
The table below lists selected entries from OEIS A006884, the sequence of integers that set a new record for the highest value ever reached by a Collatz trajectory. Every figure was recomputed with exact integer arithmetic; use these rows to verify that the analyzer on this page agrees with the published record holders.
| Seed n | Peak value | Amplification (peak / n) | Total stopping time | Tripling / halving steps |
|---|---|---|---|---|
| 7 | 52 | 7.4× | 16 | 5 / 11 |
| 15 | 160 | 10.7× | 17 | 5 / 12 |
| 27 | 9,232 | 341.9× | 111 | 41 / 70 |
| 255 | 13,120 | 51.5× | 47 | 15 / 32 |
| 447 | 39,364 | 88.1× | 97 | 34 / 63 |
| 639 | 41,524 | 65.0× | 131 | 47 / 84 |
| 703 | 250,504 | 356.3× | 170 | 62 / 108 |
| 1,819 | 1,276,936 | 702.0× | 161 | 58 / 103 |
| 9,663 | 27,114,424 | 2,806.0× | 184 | 66 / 118 |
| 26,623 | 106,358,020 | 3,995.0× | 307 | 113 / 194 |
Two things stand out. Amplification grows far faster than the seed, and the total stopping time does not: 26,623 climbs to over a hundred million but still finishes in 307 steps, while 1,819 climbs higher than 703 yet finishes in fewer steps. Step count and excursion height are close to independent, which is precisely why a proof has been so elusive — bounding one quantity gives almost no leverage over the other.
How to interpret your result
A short total stopping time relative to the seed usually means the trajectory hit a long run of even terms early; powers of two are the extreme case, since 2k descends in exactly k steps with no tripling at all. A long total stopping time means the trajectory kept landing on odd terms, each of which multiplies by roughly 3/2 after its forced halving. The measured halving-to-tripling ratio is the most diagnostic single number the analyzer prints: values close to 1.585 indicate a "typical" trajectory obeying the averaging heuristic, values noticeably above it indicate an unusually even-heavy path that collapsed quickly, and values below it indicate a trajectory that climbed hard before its eventual descent.
Amplification is best read logarithmically. An amplification of 342× for 27 sounds spectacular but is only about 8.4 doublings; the record holder 26,623 amplifies by about 12 doublings. Because the analyzer plots the trajectory on a base-2 logarithmic axis by default, the visual height of a peak is directly comparable across seeds of wildly different sizes, and the sawtooth texture — a slow ragged climb followed by a steep collapse — is the same shape for essentially every seed.
Assumptions, limitations and what this tool cannot settle
The most important limitation is epistemic: running a trajectory to 1 verifies the conjecture for that one integer and proves nothing in general. The Collatz conjecture is open. Convergence has been machine-verified for every positive integer below 271 by David Bařina's GPU project at Brno University of Technology, extending his earlier verification below 268; that is an enormous computation and still an empty set of integers compared with the infinitely many that remain. A counterexample could be a trajectory that diverges to infinity, or a non-trivial cycle; both remain logically possible, and results such as Terras's density theorem and Tao's logarithmic-density theorem rule out neither.
The second limitation is computational, and this page states it honestly rather than failing silently. Trajectories are computed with JavaScript BigInt, so terms are exact at any size, but they are also stored in memory and drawn, so the analyzer imposes an explicit step budget. If a trajectory exceeds it — which, given the verification record, will not happen for any seed you can realistically type — the analyzer says the budget was exhausted instead of reporting a truncated step count as if it were final. Very long trajectories are also thinned before plotting, so the chart shows a faithful envelope rather than every individual pixel-width term; the CSV export and the full-trajectory listing always contain every term.
Third, some assumptions are baked into the definitions. Step counts here follow OEIS A006577 and count each halving and each tripling separately on the unaccelerated map; sources that use the accelerated Syracuse map report roughly 40% fewer steps for the same seed, so always check which convention a comparison uses. The Terras stopping time reported is computed on the accelerated map, matching Terras's own definition. The seed 1 is a legitimate input with total stopping time 0; it has no first descent and no Terras stopping time, and the analyzer says so rather than printing a zero that could be misread.
Finally, on prizes: in July 2021 the Tokyo software company Bakuage announced a prize of 120 million yen (about US$1.1 million at the time) for a resolution of the conjecture. That is a single corporate prize, not the "millions offered by various institutions" that circulates online, and the Collatz conjecture is not one of the Clay Mathematics Institute's Millennium Prize Problems.
Frequently asked questions about Collatz trajectories
Has the Collatz conjecture been proven?
No. The Collatz conjecture is an open problem. Every positive integer below 2^71 has been checked by computer and every one of them reaches 1, but exhaustive checking is not a proof: the conjecture could still fail at some larger integer, or on a cycle nobody has found.
What is the difference between stopping time and total stopping time?
Terras defined the stopping time of n as the number of steps needed for the trajectory to fall strictly below n for the first time. The total stopping time is the number of steps needed to reach 1. For n = 27 the total stopping time is 111 steps of the 3n+1 map, while the trajectory does not drop below 27 until step 96.
Why does this analyzer use big-integer arithmetic?
Collatz trajectories overshoot badly, so a seed that fits comfortably in an ordinary browser number can still produce intermediate terms above 2^53, where JavaScript numbers stop representing every integer exactly. This analyzer runs the whole trajectory in BigInt arithmetic, so every term, the peak and the step count stay exact no matter how large the seed.
How many steps does 27 take, and how high does it climb?
Starting from 27 the trajectory takes 111 steps to reach 1, the value listed in OEIS A006577, and it peaks at 9232, roughly 341.9 times the starting value. Of those 111 steps, 41 are tripling steps applied to odd terms and 70 are halving steps applied to even terms.
Can this calculator find a counterexample to the conjecture?
In practice, no. Convergence has already been verified for every integer below 2^71, so any counterexample has to be larger than that, and a search at that scale needs specialised software on supercomputers rather than a browser tab. The analyzer stops and says so when a trajectory exceeds its step budget, instead of reporting a misleading number.
Sources and further reading
Definitions, the verification record and the named theorems on this page come from the primary mathematical literature, not from secondary summaries:
- Lagarias, J. C. (1985). "The 3x+1 problem and its generalizations." American Mathematical Monthly 92(1), 3–23. doi:10.1080/00029890.1985.11971528
- Lagarias, J. C. (ed.) (2010). The Ultimate Challenge: The 3x+1 Problem. American Mathematical Society. The standard reference volume, including the annotated bibliography of the problem.
- Terras, R. (1976). "A stopping time problem on the positive integers." Acta Arithmetica 30, 241–252 — source of the stopping-time definition and the density-1 theorem. eudml.org/doc/205476
- Bařina, D. (2021). "Convergence verification of the Collatz problem." The Journal of Supercomputing 77, 2681–2688, and Bařina, D. (2025), "Improved verification limit for the convergence of the Collatz conjecture," The Journal of Supercomputing 81(1) — the 268 and 271 verification limits. Project status page, Brno University of Technology
- Tao, T. (2022). "Almost all orbits of the Collatz map attain almost bounded values." Forum of Mathematics, Pi 10, e12. doi:10.1017/fmp.2022.8
- OEIS Foundation. A006577 (halving and tripling steps to reach 1) and A006884 (record trajectory maxima) — used to validate every figure in the tables above.
- Bakuage Co., Ltd. (7 July 2021). "Bakuage Offers Prize of 120 Million JPY to Whoever Solves Collatz Conjecture." Company announcement
🚀 Sequence Racer
Race through the Collatz sequence! React fast—tap ← for EVEN (÷2) or → for ODD (×3+1). Navigate the chaotic path to reach 1 and unlock the mystery!
