working on problem 31
sieve