PrimeCheck function

Determines if a integer up to 1,000,000 is prime.