Project Euler problem: Prime generating integers