isprime functions using a table of primes in py.