Incremental Estimation of the Prime Counting Function via Triangular Number Partitions
The number of primes below x can be estimated by discretizing the logarithmic integral over a non-uniform partition whose nodes are triangular numbers (and their generalizations, rows of 1+(n-1)l points). Because each node contributes one local term to a running cumulative sum, moving from one node to the next costs constant amortized work and only logarithmic memory, so repeated or sequential estimates are cheap even though evaluating from scratch costs O(sqrt x). A student learns how choosing partition nodes that grow polynomially turns an integral approximation into an incrementally updatable estimator, and how an empirically fitted boundary-correction scaling constant can bring such a discrete estimator to the accuracy of classical analytic approximations while leaving its theoretical justification open.
An Efficient Algorithm for Estimating Prime Counts
We propose an efficient algorithm for approximating the prime counting function $π(x)$ using a structured non-uniform partition derived from generalized triangular numbers. The method yields an incre…