Improved prime sieve, but answer is not right.