initial version of is_prime_miller_rabin