Faster enumeration of primes

Abstract

We describe several new algorithms for finding all prime numbers up to a given bound N, achieving the first ever speedup by a positive power of N over the ancient sieve of Eratosthenes. The fastest version, which is not fully rigorous, runs in \[ N ( N)1+o(1) \] bit operations when analysed in the multitape Turing model. This improves on the best existing algorithms due to Pritchard (1981), Atkin--Bernstein (2004) and Sergeev (2016) by a factor of almost N. We also present a rigorous randomised (Las Vegas) variant that is slower by a factor of ( N)1+o(1), and a rigorous deterministic variant that is slower by a factor of ( N)1/2+o(1). The new algorithms make heavy use of fast polynomial arithmetic over finite fields, and also involve ideas from the theory of error-correcting codes.

0

Turn this paper into a full lesson

ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…