finished problem 23.  I could probably benefit from using Sieve of
Eratosthenes to find the primes to make this faster.