Table of Contents
Fetching ...

An improved algorithm for checking the Collatz conjecture for all n < 2^N

Vigleik Angeltveit

TL;DR

The paper tackles the problem of verifying the Collatz conjecture for all $n < 2^N$ with an algorithm whose efficiency improves as $N$ grows, by processing numbers in bit-blocks and pruning vast subspaces with four specialized sieves. The core approach combines a recursive, bit-by-bit expansion with precomputed bitvectors and a rational-growth bound to quickly certify many branches while deferring only a small subset to explicit computation, executed efficiently on CPU and GPU. Key contributions include the Descent Sieve, mod $9$ Preimage Sieve, Path-Merging Sieve, and Odd-Even-Even Sieve, plus a detailed high-level workflow (Steps 1–3) and empirical evidence of substantial speedups, including plans to push verification toward $n < 2^{72}$. The work also extends to negative integers using a parallel formulation and demonstrates practical GPU acceleration, underscoring the method’s potential to scale the search more aggressively than prior approaches. Overall, the results indicate a significant leap in feasibility for large-scale Collatz verification and provide actionable design choices for future high-N deployments.

Abstract

We describe a new algorithm for verifying the Collatz conjecture for all n < 2^N for some fixed N. The algorithm takes less than twice as long to verify convergence for all n < 2^{N+1} as it does to verify convergence for all n < 2^N. We also discuss verification of the analogue of the Collatz conjecture for negative numbers.

An improved algorithm for checking the Collatz conjecture for all n < 2^N

TL;DR

The paper tackles the problem of verifying the Collatz conjecture for all with an algorithm whose efficiency improves as grows, by processing numbers in bit-blocks and pruning vast subspaces with four specialized sieves. The core approach combines a recursive, bit-by-bit expansion with precomputed bitvectors and a rational-growth bound to quickly certify many branches while deferring only a small subset to explicit computation, executed efficiently on CPU and GPU. Key contributions include the Descent Sieve, mod Preimage Sieve, Path-Merging Sieve, and Odd-Even-Even Sieve, plus a detailed high-level workflow (Steps 1–3) and empirical evidence of substantial speedups, including plans to push verification toward . The work also extends to negative integers using a parallel formulation and demonstrates practical GPU acceleration, underscoring the method’s potential to scale the search more aggressively than prior approaches. Overall, the results indicate a significant leap in feasibility for large-scale Collatz verification and provide actionable design choices for future high-N deployments.

Abstract

We describe a new algorithm for verifying the Collatz conjecture for all n < 2^N for some fixed N. The algorithm takes less than twice as long to verify convergence for all n < 2^{N+1} as it does to verify convergence for all n < 2^N. We also discuss verification of the analogue of the Collatz conjecture for negative numbers.
Paper Structure (17 sections, 10 theorems, 6 equations, 4 figures, 2 algorithms)

This paper contains 17 sections, 10 theorems, 6 equations, 4 figures, 2 algorithms.

Key Result

Lemma 2.1

The sequence of even and odd applications of $T$ in the $k$-fold composite $T^k(n)$ only depends on the last $k$ bits of the binary representation of $n$.

Figures (4)

  • Figure 2.1: The blue line indicates the starting value $n$, and the red dot indicates the value $n_1 < n$ whose path joins that of $n$.
  • Figure 4.1: The fraction of bits set in each bit vector $BV_i$ for $N = 72$, $A = 6$ and $B = 24$ for $0 \leq i \leq 7$.
  • Figure 5.1: The percentage of all numbers to check for $N = 35,\ldots, 45$.
  • Figure A.1: Path records for $T'$.

Theorems & Definitions (15)

  • Lemma 2.1: Si99
  • Definition 2.2
  • Lemma 2.3: Si99
  • Corollary 2.4
  • Theorem 2.5
  • proof
  • Lemma 2.6
  • Lemma 2.7
  • Lemma 2.8
  • Lemma 2.9: He23
  • ...and 5 more