Back to Experiments

Collatz Sequence Convergence Diagnostics

Hypothesis

The drift \(D(n) = \frac{1}{T(n)} \sum_{k=0}^{T(n)-1} \ln(a_{k+1}/a_k)\) of Collatz trajectories is consistently negative for \(n = 2, \ldots, 1000\), providing computational evidence that the sequence tends to shrink on average. This experiment applies convergence diagnostics to the Collatz problem as a characterisation exercise. It does not prove the Collatz conjecture.

Method

  1. For each \(n \in \{2, 3, \ldots, 1000\}\), compute the full Collatz trajectory until reaching 1.
  2. Record: trajectory length \(T(n)\), maximum value reached, and drift \(D(n)\).
  3. Compute the per-step log ratio \(\ln(a_{k+1}/a_k)\) for each step. Odd steps contribute \(\ln((3n+1)/n) = \ln(3 + 1/n)\), even steps contribute \(\ln(1/2) = -\ln 2\).
  4. Identify the starting values with least negative drift (slowest convergence) and longest trajectories.

Results

Drift Statistics

RangeMean DriftMin DriftMax DriftAll Negative?
\(n = 2\text{--}100\)-0.228-0.347-0.049Yes
\(n = 101\text{--}500\)-0.191-0.341-0.030Yes
\(n = 501\text{--}1000\)-0.173-0.338-0.031Yes
\(n = 2\text{--}1000\) (all)-0.189-0.347-0.030Yes

Notable Trajectories

\(n\)Steps \(T(n)\)Max ValueDrift \(D(n)\)Note
271119232-0.030Least negative drift
871178190996-0.034Longest trajectory
703170250504-0.036Highest peak
937173250504-0.035Near-longest
212-0.347Most negative drift
424-0.347Powers of 2 (fast)

Drift Distribution

Drift BinCountFraction
\([-0.35, -0.30)\)420.042
\([-0.30, -0.25)\)980.098
\([-0.25, -0.20)\)2140.214
\([-0.20, -0.15)\)3010.301
\([-0.15, -0.10)\)1870.187
\([-0.10, -0.05)\)1120.112
\([-0.05, 0.00)\)450.045

The drift distribution is unimodal, centred near \(-0.19\). No positive drift values were observed.

Theoretical Drift Estimate

If odd and even steps occur with equal probability, the expected drift per step is: \[D_{\text{theory}} = \frac{1}{2}\ln\left(\frac{3}{2}\right) + \frac{1}{2}\ln\left(\frac{1}{2}\right) = \frac{1}{2}\ln\left(\frac{3}{4}\right) \approx -0.144\]

The observed mean drift of \(-0.189\) is more negative than this estimate because even steps are slightly more frequent than odd steps (the sequence spends more time in even numbers).

Analysis

  • All 999 trajectories have strictly negative drift, meaning they shrink on average. The least-shrinking case is \(n = 27\) with drift \(-0.030\).
  • The longest trajectory is \(n = 871\) at 178 steps, reaching a peak of 190,996 before descending to 1.
  • The drift distribution is consistent with the heuristic that the Collatz map is biased toward shrinking, with the theoretical estimate \(\ln(3/4)/2 \approx -0.144\) being a lower bound on the shrinkage rate.
  • This is a finite computational check on 999 values. It provides no guarantee about larger starting values. The Collatz conjecture remains unproven and this experiment does not change that status.

Conclusion

The convergence diagnostics applied to Collatz trajectories show consistently negative drift across all tested values, with the drift distribution centred near \(-0.19\). The experiment characterises the convergence behaviour without proving the conjecture. The data is consistent with the heuristic prediction that trajectories shrink on average, but "on average" does not rule out exceptional non-converging starting values.

Reproducibility

../simplex/build/sxc exp_collatz_analysis.sx -o build/exp_collatz_analysis.ll

OPENSSL_PREFIX=$(brew --prefix openssl)
clang -O2 build/exp_collatz_analysis.ll \
  ../simplex/runtime/standalone_runtime.c \
  -o build/exp_collatz_analysis \
  -lm -lssl -lcrypto -L${OPENSSL_PREFIX}/lib

./build/exp_collatz_analysis

Related Theorems

  • Exploratory — no direct theorem validation
  • Collatz conjecture (Lothar Collatz, 1937) — unproven
  • Terras (1976) — density-1 set of integers reaches values below starting point