Have you ever come across world records in numerical verification of the Collatz conjecture, such as "verified up to 268"?
This does not mean that the trajectory of one specific large number was traced. It means that for every odd number from 3 to 268 — quadrillions of them — each trajectory was confirmed to fall below its initial value, without a single exception. What research institutions around the world have achieved by investing computational resources is precisely this "exhaustive verification over a range."
The Range Analysis tab of this tool provides exactly this sweep functionality. Simply enter a start value and an end value, press "Start Verification," and the tool will compute the stopping time for all odd numbers in that range in parallel, determining convergence or non-convergence for every single number.
The validity of the verification is guaranteed by reproducibility. World records work the same way: the code is published, and anyone can re-run the same computation and cross-check the results, which serves as the basis of proof. This tool follows the same principle — you can run the same verification on your PC and obtain the same results.
There are many computational tools for Collatz-type maps, but the vast majority are the "enter one number and observe the trajectory" type. Tools that provide sweep verification over a specified range of all odd numbers are limited.
Furthermore, conventional verification tools output only three items: "number of values checked, whether all converged, and maximum stopping time." No structural information is recorded at all. This tool accumulates GPK statistics and carry chain length distributions simultaneously with verification, providing structural information that approaches the "why" behind convergence. It is the only sweep tool that records not just "what was verified" but "what happened during the verification process."
| Map | Verification Range | Number of Odd Numbers Verified | Time Required | Result |
|---|---|---|---|---|
| 3n+1 | 3 ~ 99,999,999,999 (≈237) | 50 billion | Approx. 2 min 17 sec | All converged (max stopping time 345, n=14,500,812,391) |
* Measured on an Intel Core i7-12650H (single desktop PC). The current world record is on the scale of 271 (January 2025, David Barina, distributed computation on a GPU cluster). The sweep range can be extended as far as machine performance and time allow, and anyone can reproduce the verification in their own environment.
collatz-m4m6 is a tool that analyzes the Collatz-type map T(n) = (xn+1)/2d using m4/m6 pair predicate decomposition. Without using multiplication, it executes one step of the map as carry propagation of an adder (Kogge-Stone parallel prefix scan) and obtains the GPK classification (Generate / Propagate / Kill) at each pair position as a byproduct of the computation.
The supported maps use all constants of the form x = 2s + 1 (x = 3, 5, 9, 17, 33, ...). Not only 3n+1 (the standard Collatz map), but also generalized maps such as 5n+1 and 9n+1 can be analyzed.
Toggles GPK statistics collection ON/OFF.
When ON, at each step the carry propagation of the adder is classified at each pair position as G (Generate: carry generation), P (Propagate: carry propagation), or K (Kill: carry extinction), and statistics are accumulated. In range analysis, the GPK ratio, carry chain length distribution, and G-K balance (divergence/convergence tendency) are displayed as graphs.
In pair scan (packed bit operations), GPK is obtained as a byproduct of the scan process, so the additional cost is only about 1.3x. On the other hand, in the u128 direct computation path, separate bit decomposition is required to obtain GPK, resulting in a slowdown of about 20x.
For large-scale range verification where speed is a priority, turning this OFF allows the u128 path to achieve its maximum speed (approximately 440 million nums/s).
Toggles the u128 native high-speed computation path ON/OFF.
When ON (default), during range analysis, as long as the value fits within 128 bits, xn+1 is computed directly using the CPU's native multiplication instructions (4 instructions, register-contained). If it exceeds 128 bits, it is promoted to U256 (256-bit stack computation), and if it overflows further, it falls back to pair predicate decomposition (packed scan).
For 3n+1 range verification, nearly all numbers complete within u128, so ON results in approximately 84x speedup.
When OFF, all steps are executed from the start using pair predicate decomposition. Use this for verifying pair scan behavior or for obtaining GPK statistics at low cost.
| Condition | Speed (3n+1, 50M odd numbers) | Use Case |
|---|---|---|
| Phase1 ON, GPK OFF | ~442M nums/s | High-speed verification of large ranges |
| Phase1 ON, GPK ON | ~22M nums/s | Range verification with GPK statistics |
| Phase1 OFF, GPK OFF | ~5.3M nums/s | Pair scan speed measurement |
| Phase1 OFF, GPK ON | ~4.0M nums/s | Pair scan + GPK (low overhead as a byproduct) |
⚠ Important Note Regarding max_steps (Divergent Series Such as 5n+1)
Maps other than 3n+1 (5n+1, 9n+1, 17n+1, etc.) are not guaranteed to converge. For many initial values, the numbers grow without bound (diverge) and never reach a stopping time.
Setting max_steps to a large value for diverging numbers causes the bit length of the values to grow exponentially, leading to a rapid increase in memory consumption and computation time. For 5n+1, there are examples where the trajectory starting from 999,999,999 reaches over 3,000 digits.
Recommendation:
Performs a detailed analysis of a single odd number n using pair predicate decomposition.
Performs stopping time verification (sweep) for all odd numbers in the specified range. You can run exhaustive verification on your PC using the same method as world records.
Browse past execution logs (output/ folder) and re-display GPK graphs and carry chain length histograms.
In the trajectory tracking of single analysis, results are automatically saved as a CSV file. The following data is recorded for each step:
| Column | Content |
|---|---|
| step, n, d, exchanged | Step number, value, number of ÷2 operations, whether m4/m6 exchange occurred |
| m1 ~ m16 | The 16 predicates (all 16 Boolean functions of pair bits) of the odd number n' as bit strings |
| raw_m1 ~ raw_m16 | 16-predicate bit strings of the even number xn+1 (before division) |
| gpk, G, P, K | GPK classification sequence and respective counts |
| max_carry_chain | Maximum carry chain length |
Utilizing the CSV
Since the complete bit patterns of all 16 predicates are recorded at each step, this is ideal for tracking a single large number to observe how the GPK ratio fluctuates step by step, analyzing correlations between predicates, or exploring structural laws not yet known. The CSV can be loaded into Excel or Python (pandas) for free-form analysis.
In range analysis, three tiers of computation paths are automatically switched depending on the magnitude of the numbers.
| Phase | Bit Width | Computation Method | Instructions/Step | Memory |
|---|---|---|---|---|
| Phase 1 (u128) | ~128bit | CPU native multiplication | ~4 | Register-contained |
| Phase 1.5 (U256) | ~256bit | Stack-allocated 4×u64 multiplication | ~8 | Stack-contained |
| Phase 2 (packed scan) | Arbitrary length | Kogge-Stone pair predicate decomposition | ~25/128bit | Heap (Vec<u64>) |
Phase 1 / 1.5 is controlled by the u128 Phase1 checkbox ON/OFF.
When OFF, all steps are executed from the start using Phase 2 (pair predicate decomposition).
In pair predicate decomposition, one step of the Collatz map xn+1 is executed as carry propagation of an adder. The behavior of the carry at each pair position is classified as GPK:
| Classification | Meaning | Effect on Carry |
|---|---|---|
| G (Generate) | This pair newly generates a carry | Output carry = 1 regardless of input carry |
| P (Propagate) | This pair propagates the input carry as-is | Output = 1 if input carry exists, = 0 otherwise |
| K (Kill) | This pair extinguishes the carry | Output carry = 0 regardless of input carry |
If G > K, the value tends to grow (divergence direction); if G < K, it tends to shrink (convergence direction). For 3n+1, G ≈ 38% and K ≈ 35%, so G > K; however, the effect of ÷2d outweighs the contribution of G, so all numbers converge.
Carry chain length indicates the length of consecutive runs of P. When P is consecutive, the carry propagates over long distances, affecting the upper bits of the value. In the 233-scale verification of 3n+1, the chain length peaked at 4-5 with a maximum of 26. Long-distance propagation is exponentially rare, statistically demonstrating that carries tend to remain localized.
All results are automatically saved to the output/ folder in the same directory as the executable.
| Type | File Name Example | Content |
|---|---|---|
| Single CSV | gui_trace_3n1_27_s10000_gpk.csv | Values, d, 16 predicates, and GPK for all steps (analyzable in spreadsheets) |
| Single Summary | gui_trace_3n1_27_s10000_gpk_2026051_174112.txt | GPK aggregation and carry chain length histogram |
| Range Summary | gui_verify_3n1_3-9999999999_s1000_gpk_2026051_174112.txt | Verification results, GPK statistics, and carry chain length distribution |
By selecting a past log file in the "Analysis" tab, you can re-display GPK graphs and carry chain length histograms.