Deepak and primes


Can anyone please help me in identifying the error?
The required number of primes should be 500000, how many numbers shall I check to get this much required primes?