Two compact incremental prime sieves
- 1 November 2015
- journal article
- Published by Wiley in LMS Journal of Computation and Mathematics
- Vol. 18 (1) , 675-683
Abstract
A prime sieve is an algorithm that finds the primes up to a bound $n$ . We say that a prime sieve is incremental, if it can quickly determine if $n+1$ is prime after having found all primes up to $n$ . We say a sieve is compact if it uses roughly $\sqrt{n}$ space or less. In this paper, we present two new results. – We describe the rolling sieve, a practical, incremental prime sieve that takes $O(n\log \log n)$ time and $O(\sqrt{n}\log n)$ bits of space. – We also show how to modify the sieve of Atkin and Bernstein from 2004 to obtain a sieve that is simultaneously sublinear, compact, and incremental. The second result solves an open problem given by Paul Pritchard in 1994.
Keywords
All Related Versions
This publication has 19 references indexed in Scilit:
- Prime sieves using binary quadratic formsMathematics of Computation, 2003
- Trading time for space in prime number sieves1998
- Robert Bennion's “hopping sieve”Lecture Notes in Computer Science, 1998
- Linear prime-number sieves: A family treeScience of Computer Programming, 1987
- Fast compact prime number sieves (among others)Journal of Algorithms, 1983
- A sublinear additive sieve for finding prime numberCommunications of the ACM, 1981
- The segmented sieve of eratosthenes and primes in arithmetic progressions to 1012BIT Numerical Mathematics, 1977
- The first occurrence of large gaps between successive primesMathematics of Computation, 1973
- Algorithm 357: an efficient prime number generator [A1]Communications of the ACM, 1969
- The Gaussian Law of Errors in the Theory of Additive Number Theoretic FunctionsAmerican Journal of Mathematics, 1940