Sieve of Eratosthenes
Informacija: Sieve of Eratosthenes