isPrime function
problem 41