The Baillie-PSW primality test combines tests for strong pseudoprimes and Lucas pseudoprimes (Baillie
and Wagstaff 1980, Pomerance et al. 1980, Pomerance 1984). There are a number
of variants, one particular version of which is given by the following algorithm
(Pomerance 1984):
1. Perform a base-2 strong pseudoprime test on . If this test fails, declare composite and halt. If this test succeeds, is probably prime. Proceed to step 2.
2. In the sequence 5, ,
9, , 13, ..., find the first number for which the Jacobi symbol. Then perform a Lucas
pseudoprime test with discriminant on .
If this test fails, declare composite. If it succeeds, is very probably prime.
Zhang (2002, Definition 2.2 and Theorem 4) proposed a related one-parameter quadratic-base test. It uses two independently chosen quadratic bases with opposite Jacobi
symbol values for their discriminants. Zhang derived bounds on the probability
that an odd composite number passes this randomized
test.
Pomerance (1984) originally offered a prize of $30 for discovery of a composite number which passes this test, but the dollar amount of the offer was subsequently
raised to $620 (Guy 1994, p. 28).
As of Oct. 2026, no examples of composite numbers passing the test are known. Baillie et al. (2021) checked Feitsma's complete
list of base-2 Fermat pseudoprimes below . None passed the Lucas
pseudoprime test with their parameter selection method A*. This also rules out
counterexamples in that range for the variant that keeps method A* and uses the stronger
base-2 test.