vix.ing · top · new · best · stats · spec

A Note on Algorithms for Computing pn

2025/10/18 by Aggarwal, Ansh
Computer Science · Mathematics · #Analytic Number Theory Research #Coding theory and cryptography #Cryptography and Residue Arithmetic #Data Structures and Algorithms (cs.DS) #FOS: Computer and information sciences #FOS: Mathematics #Number Theory (math.NT)

paper · pdf · doi:10.48550/arxiv.2510.16285

openalex publication_date 2025/10/18 · openalex created_date 2025/10/22 · openalex updated_date 2026/07/28

Abstract

We analyze algorithms for computing the nth prime pn and establish asymptotic bounds for several approaches. Using existing results on the complexity of evaluating the prime-counting function π(x), we show that the binary search approach computes pn in O(√(n) (log n)4) time. Assuming the Riemann Hypothesis and Cramér's conjecture, we construct a tighter interval around li-1(n), leading to an improved sieve-based algorithm running in O(√(n) (log 7/2 n) log log n) time. This improvement, though conditional, suggests that further refinements to prime gap estimates may yield provably faster methods for computing primes.

Citations

Related