Collatz Conjecture Path Analyzer
Even? Divide by 2. Odd? Multiply by 3 and add 1. Explore the exact path, inspect each step, and compare the climb to the descent. Reaching 1 checks this seed; it does not prove the conjecture.
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 stopping time on the shortcut map (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. The browser tool accepts up to 2,048 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 up to the first 4,000 terms 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 three-column file of step index, exact term and parity. 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 shortcut (Terras) map T, which folds that forced halving into the odd branch:
The odd-only Syracuse map instead removes all factors of 2 after 3n+1; it is a different acceleration from T. Counts from these maps must not be mixed.
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 descent for almost all seeds does not guarantee descent for every smaller value reached later, and a set of density zero is still allowed to be infinite. The strongest modern result in this direction is due to Terence Tao, whose result was announced in 2019 and published in 2022: 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 successive parities are modelled as independent, each with probability one half, the geometric-mean multiplicative factor per step of the accelerated map is
This heuristic gives negative average logarithmic growth; it is not a proof because actual parity sequences are constrained. The arithmetic mean of the approximate factors 3/2 and 1/2 is 1, not 0.866. For a completed trajectory, let h count halvings, t count odd operations, and let o range over the odd inputs before the terminal 1. Multiplying the exact ratios of consecutive terms gives:
2h = n ยท 3t ยท โo(1 + 1/(3o))
For t > 0, taking logarithms shows that h/t equals log23 + log2(n)/t + (1/t)โolog2(1 + 1/(3o)). Dropping the final positive correction gives an approximation, not an identity. The observed ratio is not universally close to 1.585; powers of two have no odd operations at all, so the ratio is undefined.
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 a useful comparison, not evidence that the parity assumption holds. 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 stopping time on the shortcut map T 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 these particular seeds share the maximum of their common tail; in general, a path can peak before it merges, 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 and stopping time vary irregularly: 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. These examples do not establish statistical independence between step count and peak height.
How to interpret your result
Powers of two give the simplest baseline: 2k reaches 1 in exactly k halvings with no odd operations. Other seeds may spend many steps climbing before they descend. Read total stopping time and peak amplification together: neither quantity determines the other.
For a completed trajectory with at least one odd operation, the exact product identity above forces h/t to exceed log23. A value below 1.585 cannot describe a completed positive trajectory to 1; it may describe a partial path. The ratio alone does not establish how typical a trajectory is or how quickly it converges.
Amplification is useful on a logarithmic scale: 27 rises by about 8.4 doublings relative to its seed, while 26,623 rises by about 12. The chart uses base-2 logarithms by default, but rescales its vertical axis for each run, so compare the axis labels and amplification values across seeds. Powers of two descend monotonically; other paths can have very different shapes.
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 (a milestone reached on 15 January 2025) by David Baลina's GPU project at Brno University of Technology, extending his earlier verification below 268; that is an enormous finite computation that still leaves infinitely many inputs unchecked. 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 can happen for large seeds and does not imply a counterexample โ 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 contains every computed term; the on-page list is capped at 4,000 terms.
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 shortcut map T report fewer steps (one fewer for each odd operation) for the same seed, so always check which convention a comparison uses. The Terras stopping time reported is computed on the shortcut map T, so its count is distinct from the unaccelerated first descent. 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.
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 was verified by computer by January 2025 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 unaccelerated trajectory first drops below 27 at step 96. On the shortcut map T this first descent takes 59 steps.
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?
This tool explores individual trajectories; it is not a systematic counterexample search or a proof checker. Reaching 1 verifies that seed. Exhausting the browser step budget is inconclusive and does not demonstrate divergence or a non-trivial cycle.
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, article 810 โ 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.
Small seeds, surprising journeys
Compare all seeds from 1 to 100. A larger seed does not necessarily take longer to reach 1. Tap the chart or choose a seed below to explore its exact path.
View all 100 exact results
| Seed | Steps | Peak |
|---|
Sequence Racer
Follow a real Collatz path to 1. Choose the rule that applies to each number. Practice at your own pace, or race with a 2.5-second decision clock.
Choose a seed and start. Arrow keys work while focus is inside the game.
โ
0 steps completed
