The Miller-Rabin primality test is a probabilistic algorithm for determining if a number is prime or not. By its probabilistic nature, it runs fast --- in O(k log3 n) time --- but there is a chance ...