paper

An Efficient Algorithm for Estimating Prime Counts

arXiv:2606.31761

Abstract

We develop the Samojluk--Siemaszko (S--S) estimator for the prime-counting function using a non-uniform partition generated by generalized triangular numbers. A cold-start evaluation uses $\big O(\sqrt{x})$ local terms, whereas consecutive partition nodes can be processed with amortized $\big O(1)$ update cost. Updated computations up to , performed with the correction coefficient , show accuracy comparable with the Riemann approximation ; the two estimators are also asymptotically equivalent at the level of their main term. The correction is written as a one-parameter family . Finite-range experiments indicate that effective coefficients lie near . We prove asymptotic formulas for the natural scale and the accumulated discretization error , obtaining an unconditional transfer relation between the normalized S--S error and the classical normalized prime-number-theorem error. Together with the logarithmic-mean theorem under RH, this identifies the exact coefficient as uniquely asymptotically optimal in the logarithmic-mean centering sense. The converse implication is quoted from a companion manuscript in preparation.

An Efficient Algorithm for Estimating Prime Counts · wovepaper