I have been trying to work my way through Project Euler, and have noticed a handful of problems ask for you to determine a prime number as part of it.
I kno
I'd recommend Fermat's primality test. It is a probabilistic test, but it is correct surprisingly often. And it is incredibly fast when compared with the sieve.