Problem 7
Problem 8
Problem 9
Problem 10 (slow, perhaps write primes to file?)