performance enhancement

Instead of iterating over all counting numbers looking for primality,
use the prime Set and List that are already available.