change euler problem 10 to use a sieve