The Fermat and Solovay–Strassen tests are each based on translating a congruence modulo prime numbers, either Fermat’s little theorem or Euler’s congruence, over to the setting of composite numbers and hoping to make it fail there. The Miller–Rabin test uses a similar idea, but involves a system of congruences. For an odd integer n > 1, factor out the largest power of 2 from n− 1, say n− 1 = 2e...