a function that determines if a number is prime. for a gist a day