Comment
Comment by ethan_smith
I can confirm this bug - your random number generation algorithm should ensure at least one prime appears in each set, perhaps by maintaining a pre-computed list of primes within your range and guaranteeing inclusion of at least one.