An Efficient Algorithm for Estimating Prime Counts
이 뉴스, 어떠셨어요?
한 번의 탭으로 반응을 남겨요 · 로그인 불필요
Abstract
We propose an efficient algorithm for approximating the prime counting function $\pi(x)$ using a structured non-uniform partition derived from generalized triangular numbers. The method yields an incremental estimator whose updates require only local computations, resulting in amortized $O(1)$ update complexity and total complexity $O(\sqrt x)$.
A correction term obtained through extensive numerical experimentation significantly improves the approximation accuracy. Computational tests for values up to $10^{19}$
show strong agreement with known values of $\pi(x)$, with accuracy comparable to classical analytic approximations, while maintaining a substantially simpler incremental evaluation scheme. The proposed framework may be useful in large-scale computational number theory applications requiring fast repeated estimates of $\pi(x)$.