Problem 12, more efficient prime number generator