A Note on Algorithms for Computing $p_n$
Number Theory
2025-10-21 v1 Data Structures and Algorithms
Abstract
We analyze algorithms for computing the th prime and establish asymptotic bounds for several approaches. Using existing results on the complexity of evaluating the prime-counting function , we show that the binary search approach computes in time. Assuming the Riemann Hypothesis and Cram\'er's conjecture, we construct a tighter interval around li, leading to an improved sieve-based algorithm running in time. This improvement, though conditional, suggests that further refinements to prime gap estimates may yield provably faster methods for computing primes.
Cite
@article{arxiv.2510.16285,
title = {A Note on Algorithms for Computing $p_n$},
author = {Ansh Aggarwal},
journal= {arXiv preprint arXiv:2510.16285},
year = {2025}
}
Comments
7 pages