Fast compact prime number sieves (among others)
Journal of Algorithms
Analytic methods in the analysis and design of number-theoretic algorithms
Analytic methods in the analysis and design of number-theoretic algorithms
The C++ programming language (2nd ed.)
The C++ programming language (2nd ed.)
Two fast parallel prime number sieves
Information and Computation
Mathematics of Computation
A space-efficient fast prime number sieve
Information Processing Letters
Algorithmic number theory
Detecting perfect powers in essentially linear time
Mathematics of Computation
A sublinear additive sieve for finding prime number
Communications of the ACM
Trading Time for Space in Prime Number Sieves
ANTS-III Proceedings of the Third International Symposium on Algorithmic Number Theory
Dissecting a Sieve to Cut Its Need for Space
ANTS-IV Proceedings of the 4th International Symposium on Algorithmic Number Theory
Analytic computation of the prime-counting function
Analytic computation of the prime-counting function
Riemann's hypothesis and tests for primality
Journal of Computer and System Sciences
Doubly-Focused enumeration of pseudosquares and pseudocubes
ANTS'06 Proceedings of the 7th international conference on Algorithmic Number Theory
Approximately counting semismooth integers
Proceedings of the 38th international symposium on International symposium on symbolic and algebraic computation
Hi-index | 0.00 |
We present the pseudosquares prime sieve, which finds all primes up to n. Define p to be the smallest prime such that the pseudosquare Lp n/(π(p)(logn)2); here π(x) is the prime counting function. Our algorithm requires only O(π(p)n) arithmetic operations and O(π(p)logn) space. It uses the pseudosquares primality test of Lukes, Patterson, and Williams. Under the assumption of the Extended Riemann Hypothesis, we have p≤2(logn)2, but it is conjectured that $p\sim \frac{1}{\log 2}\log n \log\log n$. Thus, the conjectured complexity of our prime sieve is O(nlogn) arithmetic operations in O((logn)2) space. The primes generated by our algorithm are proven prime unconditionally. The best current unconditional bound known is $p \le n^{1/(4\sqrt{e}-\epsilon)}$, implying a running time of roughly n1.132 using roughly n0.132 space. Existing prime sieves are generally faster but take much more space, greatly limiting their range (O(n/loglogn) operations with n1/3+ε space, or O(n) operations with n1/4 conjectured space). Our algorithm found all 13284 primes in the interval [1033,1033+106] in about 4 minutes on a 1.3GHz Pentium IV. We also present an algorithm to find all pseudosquares Lp up to n in sublinear time using very little space. Our innovation here is a new, space-efficient implementation of the wheel datastructure.