Solution by Steve G Lynn CAVEAT: I have not quite followed the instructions for challenge 1, which require the set of primes to be distinct ("No duplicates"). My solution also finds repeated primes.