The Golomb--Keller formula expresses the next prime $p_{n+1}$ as a recurrence relation in terms of the first $n$ primes $p_1, \ldots, p_n$ using the Riemann zeta function and an Euler product, but requires taking a limit as $s \to \infty$, rendering it non-constructive. We transform this asymptotic formula into an effective recurrence by proving that a finite parameter $s \leq p_n$ suffices when combined with the ceiling function, establishing a constructive method valid for all $n \geq 1$.
The minimal integer parameter $s_n$ (OEIS A389650) reveals deep connections to prime constellations. We prove $\liminf_{n\to\infty} Ï_n = 0$ unconditionally, where $Ï_n = s_n/p_n$. The limit superior $C = \limsup Ï_n$ satisfies $\log Ï\lesssim C \leq 0.4332$, where $Ï\approx 1.46557$ is the supergolden ratio. The lower bound is conditional on the twin prime conjecture; the upper bound is unconditional. The constant $C$ relates to the densest admissible prime constellation, connecting to the Hardy--Littlewood conjectures.
The method extends to Dirichlet L-functions, yielding other effective formulas for calculating $p_{n+1}$ but also for predicting residues of $p_{n+1}$ modulo any integer with reduced precision requirements.
- Paper ID: 2508.02690
- Title: An effective analytic recurrence for prime numbers
- Author: Benoit Cloitre
- Classification: math.NT (Number Theory), math.HO (History and Overview)
- Publication Date: October 12, 2025 (arXiv v2)
- Paper Link: https://arxiv.org/abs/2508.02690v2
The Golomb-Keller formula expresses the next prime pn+1 as a recurrence relation in terms of the first n primes p1,…,pn through the Riemann ζ function and Euler products, but requires taking the limit s→∞, making it non-constructive. This paper transforms this asymptotic formula into an effective recurrence by proving that a finite parameter s≤pn combined with the ceiling function is sufficient, establishing a constructive method valid for all n≥1.
The minimal integer parameter sn (OEIS A389650) reveals deep connections with prime constellations. The author unconditionally proves that liminfn→∞σn=0, where σn=sn/pn. The limit superior C=limsupσn satisfies logψ≲C≤0.4332, where ψ≈1.46557 is the super-golden ratio. The lower bound depends on the twin prime conjecture; the upper bound is unconditional. The constant C relates to the densest admissible prime constellations, connecting to the Hardy-Littlewood conjecture.
The method extends to Dirichlet L-functions, yielding alternative effective formulas for computing pn+1 and enabling prediction of pn+1 modulo arbitrary integers with reduced precision requirements.
Finding explicit formulas for primes is a classical problem in number theory. While direct non-recursive formulas exist (such as Willans' formula, Mills' formula), they are computationally infeasible. This paper focuses on recurrence relations, namely expressing pn+1 in terms of p1,…,pn.
- Gandhi 4 first provided such recurrences using primorials and the Möbius function
- Vanden Eynden 19 simplified the proofs
- Jakimczuk 9 generalized the methods
- Golomb 5 independently discovered the formula using analytic number theory, later rediscovered by Keller 10
The classical Golomb-Keller formula is:
pn+1=lims→∞[(∏k=1n(1−pks1))ζ(s)−1]−1/s
The main problem with this formula is the requirement to take the limit s→∞, making it impractical for actual computation.
This paper adopts the opposite approach: retain the complete ζ function series computation to working precision, but use a finite s. This truncates the exponent rather than the series, making the formula constructive.
- Constructive Recurrence Formula: Proves that for all n≥1, there exists a minimal integer sn such that:
pn+1=⌈(−1+ζ(sn)∏j=1n(1−pjsn1))−1/sn⌉
- Effective Bounds:
- Proves sn≤2pn using Bertrand's postulate (Theorem 10)
- Proves sn≤pn using Nagura's theorem (Theorem 12)
- Asymptotic Behavior Analysis:
- Unconditionally proves liminfn→∞σn=0 (Proposition 13)
- Establishes bounds for C:=limsupn→∞σn: 0.3823≲C≤0.4332
- Connection with Prime Constellations: Discovers the lower bound logψ≈0.3823 (dependent on the twin prime conjecture), where ψ is the super-golden ratio
- Extension to Dirichlet L-functions: Enables prediction of residue properties such as pn+1(mod4)
- Numerical Data: Provides values of sn for n=1 to 200 (OEIS A389650)
Given the first n primes p1,p2,…,pn, constructively compute the next prime pn+1.
Define the key function:
Dn(s)=∑k≥1gcd(k,Pn)=1k−s
where Pn=∏j=1npj is the n-th primorial.
Lemma 3: For ℜ(s)>1,
Dn(s)=ζ(s)∏j=1n(1−pj−s)
Define h(s)=(Dn(s)−1)−1/s, proving:
- h(s)<pn+1 for all s>1
- lims→∞h(s)=pn+1
- h(s) is strictly increasing on (1,∞)
Proposition 6: For each n≥1, there exists a unique sn∗>1 such that h(sn∗)=pn+1−1.
Define sn=⌊sn∗⌋+1 as the minimal integer parameter.
- Precision-Truncation Trade-off: Unlike Keller's approach of truncating series summation, this paper retains the complete ζ function but uses finite s
- Ceiling Function Technique: Cleverly exploits the property that ⌈h(s)⌉=pn+1 if and only if s>sn∗
- Integral Bound Techniques: Uses refined integral comparisons to control tail error terms
- High-precision computation using PARI/GP and Python's mpmath library
- 100-digit precision required for n≤200
- Approximately 2500-digit precision needed for n≈500 (due to enhanced cancellation effects)
Theoretical bounds sn≤pn are verified by direct computation for all n=1,…,200.
Computing p7=17 (starting from n=6):
- Using s=2p6=26: h(26)≈16.941817904, yielding p7=⌈h(26)⌉=17
- Actual minimum value s6=8: h(8)≈16.5189076
- Theorem 10: sn≤2pn holds for all n≥1
- Theorem 12: sn≤pn holds for all n≥1 (via Nagura's theorem)
- Proposition 13: liminfn→∞σn=0 (unconditional)
- Theorem 14: C=limsupn→∞σn≤0.4332 (unconditional)
- Theorem 15: Under the twin prime conjecture, C>logψ≈0.38225
Analysis of data for n=1 to 200 shows:
- After removing five outliers, the distribution of σn resembles a Beta distribution
- Mean ≈ 0.291, median ≈ 0.277, standard deviation ≈ 0.087
- Fitted parameters: Beta(α ≈ 7.64, β ≈ 18.62)
- Theoretical mode ≈ 0.274, consistent with empirical median
Theorem 18: For any c>c0≈0.5956, there exists N0(c) such that for all n≥N0(c), the formula using s=cpn correctly computes pn+1.
- Gandhi (1971): First recurrence using primorials and Möbius function
- Golomb (1976): Introduction of analytic number theory methods
- Keller (2007): Independent rediscovery with alternative derivation
- This paper (2025): First to make the formula constructive
- Willans' formula: Direct but computationally infeasible
- Mills' formula: Based on a constant but requires prior knowledge of primes
- Sieve methods: Practical but do not provide recurrence structure
- This method: Theoretically interesting but computationally complex
- Constructive Breakthrough: First transformation of the Golomb-Keller formula from asymptotic to effectively computable
- Deep Connections: Reveals intrinsic relationships between prime recurrence parameters and prime constellations, gap distributions
- Theoretical Bounds: Establishes precise bounds and asymptotic behavior of parameter sn
- Super-Golden Ratio: Discovers new applications of this constant in prime theory
- Computational Complexity: O(npn3logpn) bit operations—polynomial but practically infeasible
- Precision Requirements: Exponential growth in working precision needed as n increases
- Conditional Results: Some important results depend on unproven conjectures (e.g., twin prime conjecture)
- Computational Optimization: Seek methods to reduce precision requirements
- Theoretical Refinement: Remove dependence on unproven conjectures
- Generalization: Extend to other number-theoretic functions
- Numerical Exploration: Compute sn values over larger ranges to verify conjectures
- Theoretical Innovation: Successfully resolves a long-standing constructivity problem
- Rigorous Methodology: Employs sophisticated analytic number theory techniques
- Deep Connections: Bridges recurrence formulas and prime constellation theory
- Rich Data: Provides detailed numerical verification and statistical analysis
- Limited Practical Utility: While theoretically constructive, computational cost is prohibitive
- Precision Challenges: High precision requirements limit method scalability
- Conditional Results: Some important results depend on unproven conjectures
- Theoretical Contribution: Provides new perspectives on prime recurrence theory
- Methodological Value: Demonstrates how to convert asymptotic formulas into effective algorithms
- Interdisciplinary Connections: Links analytic number theory, computational number theory, and prime geometry
- Theoretical Research: Prime distribution, gap theory, constellation studies
- Numerical Experiments: Small-scale verification and pattern exploration
- Educational Demonstration: Classic applications of analytic number theory methods
Key references include:
- 5 S. W. Golomb, Formulas for the next prime, Pacific J. Math. 63 (1976), 401–404
- 10 J. B. Keller, A recursion equation for prime numbers, arXiv:0711.3940, 2007
- 4 J. M. Gandhi, Formulae for the nth prime, Proc. Washington State Univ. Conf. Number Theory (1971), 96–107
- 12 J. Nagura, On the interval containing at least one prime number, Proc. Japan Acad. 28 (1952), 177–181
This paper holds significant theoretical importance in number theory. While its practical computational applications are limited, its theoretical insights and methodological innovations open new directions for prime theory research. Particularly noteworthy are the discovered connections with the super-golden ratio and prime constellations, revealing unexpected deep structures in number theory.