How would you write a program to find if a number is prime?
Implement is_prime(n) to return True when n is prime and False otherwise. Treat all integers less than 2 as non-prime, and use an approach efficient enough for values up to 10^12.
def is_prime(n):