problem 67 primes, borrowed from Haskell