One test case failing

500000th prime number is 7368787, therefore increase your sieve size.