I have also implemented several probable prime tests and included them in this library. They are: isPrp, isStrongPrp, isEulerPrp, isLucasPrp,
isStrongLucasPrp, isSelfridgePrp, isStrongSelfridgePrp, isBPSW, isStrongBPSW. The first 5 Prp tests are all based on the probable prime tests found
in Jon Grantham's 2001 paper "Frobenius Pseudoprimes". You can find a copy by Googling:
Grantham, Jon. Frobenius Pseudoprimes. Math. Comp. 70 (2001), 873-891.
The Selfridge Prp tests are Lucas Prp tests using the parameters suggested by John Selfridge.
The BPSW Prp tests are the Baillie-Pomerance-Selfridge-Wagstaff test. The BPSW test is a combination of the Strong Prp test and a Selfridge Prp test. The Strong BPSW test is a combination of the Strong Prp test and the Strong Selfridge Prp test. You can read more about the BPSW test here.
The following demo will show you the results of various probable prime tests. If a particular test returns a 1, then that test is reporting that the
input number is probably prime. If a test returns a 0, then the input number is definitely composite. If a test returns a 1 for a number that is
composite, then the input number is called a pseudoprime according to that test. Here is a list of a few pseudoprimes that can fool some, but not all,
of the tests:
323, 377, 1159, 1829, 3827, 5459, 5777, 9071, 9179, 10877, 561, 1105, 1729, 2047
(Depending on how you access this web page, it may take a long time to run some of these tests. Since these tests are run on your device, your browser may stop responding while processing numbers with many hundreds, or thousands, of digits.)