Persistent Negative Lag-One Dependence in Locally Detrended Prime-Gap Windows up to N = 10^9, with Absence of Significant Positive Autocorrelation up to K = 1024
We study the autocorrelation of consecutive prime gaps g_n = p_n+1 - p_n using an exact segmented sieve up to N = 10^9, yielding 50,847,532 even gaps (excluding the initial odd gap g_1 = 3 - 2 = 1). We show that the lag-one autocorrelation ρ_1 of the locally detrended gap sequence is negative in every one of ten logarithmic windows spanning [10^4, 10^9), with moving-block bootstrap 95% confidence intervals excluding zero in every window. The magnitude decays approximately monotonically from ρ_1 ≈ -0.095 in the smallest window to ρ_1 ≈ -0.031 in the largest, consistent with a power law |ρ_1| ∼ (log p)^-c. A weighted fit on the 8-window subset (log p ≥ 12) gives a point estimate c = 1.28 ± 0.05 (statistical) with bootstrap 95% CI [1.14, 1.57]; varying the window set produces estimates in [1.26, 1.57], indicating systematic sensitivity to the choice of subset. The quadratic decay (c = 2) is excluded in every window-set choice tested, at 3.7σ to 14.4σ, and at 6.6σ on the bootstrap scale. The naive logarithmic decay (c = 1) is excluded at 5.6σ using the weighted-fit standard error, but only at ≈ 2.5σ on the bootstrap scale of that same fit (SE_boot ≈ 0.11), at 2.6σ under the unweighted 8-window fit, 4.1–4.3σ under the two 6-window fits, and 4.9σ under the all-10-window fit: the exclusion holds for every window set we tested, but with a margin ranging from marginal (≈ 2.5σ) to clear (5.6σ), and should be read as suggestive rather than decisive. Extending the analysis to K = 1024 lags on the globally detrended sequence δ_n = g_n - log p_n, we find no significant positive autocorrelation at any individual lag: only 255 of 1024 lags are positive (24.9%), the largest positive value is +3.86 × 10^-4, below the Bonferroni threshold of 5.70 × 10^-4 by a factor of 0.68. A companion analysis of the raw (non-detrended) global autocorrelation reveals a non-stationarity artifact that produces 1016 of 1024 positive lags, with maximum value +4.24 × 10^-3 exceeding the threshold by a factor of 7.45; this artifact disappears entirely upon detrending. We also report a direct test of the Lemke Oliver–Soundararajan (LO-S) conjecture mod 3: the "stay" probability P(p_n+1 ≡ a | p_n ≡ a) for a ∈ {1, 2} is 0.44509 and 0.44514 respectively, deviating from 1/2 by approximately -0.055 at a z-score of approximately -553σ. The suppression is the same in both residue classes (the difference corresponds to z = 0.33), but the corresponding conditional autocorrelations differ between a = 1 and a = 2 by 3.6–4.5 standard errors at k = 1, 2, 3; the symmetry is therefore approximate. This is the strongest signal in the paper, and it confirms the LO-S bias for mod 3; a quantitative test of the conjectured per-class constants is left open. Within the largest window, the lag-k autocorrelations satisfy ρ_k ≈ ρ_1/k for k ≤ 5 to within 8%; the ratio remains approximately monotone at higher lags but with increasing deviation. An inclusion–exclusion extension of the naive Hardy–Littlewood pair-density heuristic reproduces the observed pair ratios to within 0.37% mean absolute error — a nearly tenfold (9.6×) improvement — without any fitted constants. As a byproduct of the analysis, the telescoping identity for δ_n yields ψ(10^9) - 10^9 = +1,595.99, consistent with the explicit bounds of Büthe. Code, data and a READMEhttps://github.com/reddoma742/prime-gaps-autocorrelation LicenceCC BY-NC-SA 4.0, the same licence as the code and data repository. Commercial use is not permitted, and derivatives must carry the same licence. Copyright covers the code, data, figures and text; it does not cover the ideas or the numerical results reported here. PriorityDeposited on 2 October 2026 to establish a public priority date. An arXiv preprint is intended but pending endorsement.
Authors
- Reddouane BERRAMDANE
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-05
- DOI
- https://doi.org/10.5281/zenodo.23111511
- Primary Topic
- Analytic Number Theory Research
- Type
- preprint