A Compact Closed-Form Approximation for the n-th Prime in Digital Root Classes Modulo 9: Implementation and Benchmark
Fuente:
Zenodo
Enregistré dans:
| Auteur principal: | |
|---|---|
| Format: | Recurso digital |
| Langue: | anglais |
| Publié: |
Zenodo
2026
|
| Sujets: | |
| Accès en ligne: | |
| Tags: |
Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
|
| _version_ | 1866901864790884352 |
|---|---|
| author | Ferraiuolo, Giovanni |
| author_facet | Ferraiuolo, Giovanni |
| contents | <p>We present a compact closed-form approximation for the n-th prime p(a) n in a fixed<br>reduced residue class a (mod 9) (a ∈ {1, 2, 4, 5, 7, 8}). The expression is built from the Cipolla–Bach–Shallit asymptotic expansion of pn truncated at order L−3 (whose coefficients are theoretically exact and not fitted), augmented by a linear correction at order L−4 and a Chebyshev-bias correction of order √c/L, both with empirically calibrated coefficients.<br>Calibration is performed by weighted linear least squares on 294 samples in the range n ∈ [100, 106], giving four free parameters total. The resulting estimator achieves global RMS relative error of 0.057% on a validation set of ∼ 6 × 106 samples, falling below 0.04% for n ≥ 105 across all six residue classes.<br>We make no novel theoretical claims: every analytical ingredient of the formula appears in the prior literature (Cipolla 1902, Bach–Shallit 1996, Dusart 2010, Axler 2017 for the asymptotic expansion; Rubinstein–Sarnak 1994, Granville–Martin 2006 for the Chebyshev bias). The contribution of this paper is purely computational: a single explicit expression that is convenient to evaluate, an honest benchmark against exact prime data, and a self-contained pure-Python reference implementation suitable as a teaching example or as a fast subroutine in algorithmic applications.</p> |
| format | Recurso digital |
| id | zenodo_https___doi_org_10_5281_zenodo_20126879 |
| institution | Zenodo |
| language | eng |
| publishDate | 2026 |
| publisher | Zenodo |
| record_format | zenodo |
| spellingShingle | A Compact Closed-Form Approximation for the n-th Prime in Digital Root Classes Modulo 9: Implementation and Benchmark Ferraiuolo, Giovanni prime numbers arithmetic progressions Cipolla expansion Bach-Shallit Chebyshev bias Rubinstein-Sarnak digital root modulo 9 closed-form approximation computational number theory <p>We present a compact closed-form approximation for the n-th prime p(a) n in a fixed<br>reduced residue class a (mod 9) (a ∈ {1, 2, 4, 5, 7, 8}). The expression is built from the Cipolla–Bach–Shallit asymptotic expansion of pn truncated at order L−3 (whose coefficients are theoretically exact and not fitted), augmented by a linear correction at order L−4 and a Chebyshev-bias correction of order √c/L, both with empirically calibrated coefficients.<br>Calibration is performed by weighted linear least squares on 294 samples in the range n ∈ [100, 106], giving four free parameters total. The resulting estimator achieves global RMS relative error of 0.057% on a validation set of ∼ 6 × 106 samples, falling below 0.04% for n ≥ 105 across all six residue classes.<br>We make no novel theoretical claims: every analytical ingredient of the formula appears in the prior literature (Cipolla 1902, Bach–Shallit 1996, Dusart 2010, Axler 2017 for the asymptotic expansion; Rubinstein–Sarnak 1994, Granville–Martin 2006 for the Chebyshev bias). The contribution of this paper is purely computational: a single explicit expression that is convenient to evaluate, an honest benchmark against exact prime data, and a self-contained pure-Python reference implementation suitable as a teaching example or as a fast subroutine in algorithmic applications.</p> |
| title | A Compact Closed-Form Approximation for the n-th Prime in Digital Root Classes Modulo 9: Implementation and Benchmark |
| topic | prime numbers arithmetic progressions Cipolla expansion Bach-Shallit Chebyshev bias Rubinstein-Sarnak digital root modulo 9 closed-form approximation computational number theory |
| url | https://doi.org/10.5281/zenodo.20126879 |