Hostname: page-component-7b7567c8c-7pwfn Total loading time: 0 Render date: 2026-11-14T17:56:16.369Z Has data issue: false hasContentIssue false

Two compact incremental prime sieves

Published online by Cambridge University Press:  01 November 2015

Jonathan P. Sorenson*
Affiliation:
Computer Science and Software Engineering, Butler University, Indianapolis, IN 46208, USA email sorenson@butler.edu

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

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.

Information

Type
Research Article
Copyright
© The Author 2015