Re: new test for primes
- --- In firstname.lastname@example.org,
"djbroadhurst" <d.broadhurst@...> wrote:
> Here is rough-and-ready Pari-GP code for Bernhard's test:Bernhard follows BPSW in combining a Fermat and Lucas test.
His strong Fermat test has base a, where BPSW have base 2.
His strong Lucas test has parameters (P,Q) = (2,1-a),
where Selfridge suggested (P,Q) = (1,(1-a)/4) with
a the first integer in the sequence
5, -7, 9, -11, 13, -15 ... for which kronecker(a,n) = -1.
I cannot see any reason why Bernhard's test should be
any better or any worse than the BPSW test. Heuristically,
we expect both to have an infinite number of pseudoprimes.
Heuristically, we expect both to require a huge effort
to find a single pseudoprime.