CPKit
v1.6.1

Sieve of Eratosthenes

PrimesEasy

Generate all prime numbers up to a specified limit N using Eratosthenes sieve algorithm.

Alt+Shift+2

Configuration Panel

Complexity Indices

Time ComplexityO(N log log N)
Auxiliary SpaceO(N)
Conceptual Overview

The Sieve of Eratosthenes is an ancient algorithm for finding all prime numbers up to any given limit by iteratively marking composites.

Source: CP-Algorithms reference guide