Baillie and Wagstaff (1980) and Pomerance et al. (1980, Pomerance 1984) proposed a test (or rather a related set of tests) based on a combination of strong pseudoprimes and Lucas pseudoprimes. 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 success,
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. It if succeeds,
is very probably prime.
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).
No examples of composite numbers passing the test are known, and as of June 13, 2009, Jeff Gilchrist has confirmed that there are no Baillie-PSW pseudoprimes up to .
However, the elliptic curve primality
proving program PRIMO checks all intermediate probable primes with this
test, and if any were composite, the certification would necessarily have failed.
Based on the fact that this has not occurred in three years of usage, PRIMO
author M. Martin estimates that there is no composite less than about
digits that can fool this test.