The simplest way is to download the first million primes, unzip the file and just query the result. The Primes Pages has many information about primes, and the first 50 million are available as files to download.
Comment on Re: Find prime number between 1 to 1000000