A Short-Window Closed Formula for the n-th Prime Number: A Refinement of the Ruiz--Sondow Formula with 0.787 n/ln^2 n Terms
Let p(n) be the n-th prime number (OEIS A000040) and pi(x) the prime counting function. The classical closed-form formula of Ruiz and Sondow quoted in A000040 requires the summation of approximately 2*n*ln(n) terms, while the formulas of Willans and of Gandhi, Golomb and Wang require exponentially many terms. We prove that for every pair of integer-valued functions A(n) <= p(n) <= B(n) with A >= 1 and B = 8,009,824, the resulting refined formula requires at most 0.787*n / ln^2(n) + 1 terms, which narrows the summation range of the Ruiz-Sondow formula by a factor of ~2.54*ln^3(n). This constitutes a reduction of 3,500 times for n=10^6 and 23,000 times for n=10^9. The underlying analytical bounds were validated numerically for all n <= 13,161,544, and the formula was cross-verified against independent computations up to n = 10^10. Evaluated exactly via a localized window sieve, it computes p(10^9) in 0.30 s and p(10^10) in 4.2 s in Python.
Authors
- Mark Kim (ORCID: https://orcid.org/0000-0001-7601-831X)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-26
- DOI
- https://doi.org/10.5281/zenodo.23662113
- Primary Topic
- Analytic Number Theory Research
- Type
- preprint