solved problem 10, not optimized, sieve to test prime may be faster