primality test

algorithm for determining whether an input number is prime