Solve some prime-related problems using a sieve (10, 3 and 7)