<P> For each individual value of a, the Solovay--Strassen test is weaker than the Miller--Rabin test . For example, if n = 1905 and a = 2, then the Miller - Rabin test shows that n is composite, but the Solovay--Strassen test does not . This is because 1905 is an Euler pseudoprime base 2 but not a strong pseudoprime base 2 (this is illustrated in Figure 1 of PSW). </P> <P> The Miller--Rabin and the Solovay--Strassen primality tests are simple and are much faster than other general primality tests . One method of improving efficiency further in some cases is the Frobenius pseudoprimality test; a round of this test takes about three times as long as a round of Miller--Rabin, but achieves a probability bound comparable to seven rounds of Miller--Rabin . </P> <P> The Frobenius test is a generalization of the Lucas pseudoprime test . One can also combine a Miller--Rabin type test with a Lucas pseudoprime test to get a primality test that has no known counterexamples . That is, this combined test has no known composite n for which the test reports that n is probably prime . One such test is the Baillie--PSW primality test, several variations of which exist . </P> <P> Leonard Adleman and Ming - Deh Huang presented an errorless (but expected polynomial - time) variant of the elliptic curve primality test . Unlike the other probabilistic tests, this algorithm produces a primality certificate, and thus can be used to prove that a number is prime . The algorithm is prohibitively slow in practice . </P>

Algorithm to test if a number is prime