English

The combinatorial algorithm for computing $\pi(x)$

Number Theory 2015-06-01 v2 Data Structures and Algorithms

Abstract

This paper describes recent advances in the combinatorial method for computing π(x)\pi(x), the number of primes x\leq x. In particular, the memory usage has been reduced by a factor of logx\log x, and modifications for shared- and distributed-memory parallelism have been incorporated. The resulting method computes π(x)\pi(x) with complexity O(x2/3log2x)O(x^{2/3}\mathrm{log}^{-2}x) in time and O(x1/3log2x)O(x^{1/3}\mathrm{log}^{2}x) in space. The algorithm has been implemented and used to compute π(10n)\pi(10^n) for 1n261 \leq n \leq 26 and π(2m)\pi(2^m) for 1m861\leq m \leq 86. The mathematics presented here is consistent with and builds on that of previous authors.

Keywords

Cite

@article{arxiv.1503.01839,
  title  = {The combinatorial algorithm for computing $\pi(x)$},
  author = {Douglas B. Staple},
  journal= {arXiv preprint arXiv:1503.01839},
  year   = {2015}
}

Comments

12 pages

R2 v1 2026-06-22T08:45:47.574Z