Detecting prime numbers

Prime numbers, whole numbers greater than 1 that cannot be divided evenly by any number other than themselves and 1, have been studied for millennia. Prime numbers continue to be of the utmost importance today, particularly in the field of computer cryptography. This recipe demonstrates how to determine whether a given number is prime.