10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.6 Lucas pseudoprimes 149<br />

gcd(n, 2ab∆) = 1. This algorithm returns “n is a Lucas probable prime with<br />

parameters a, b” if either n is prime or n is a Lucas pseudoprime with respect to<br />

x 2 − ax + b. Otherwise, it returns “n is composite.”<br />

1. [Auxiliary parameters]<br />

A = a 2 b −1 − 2modn;<br />

m = n − <br />

∆<br />

n /2;<br />

2. [Binary Lucas chain]<br />

Using Algorithm 3.6.7 calculate the last two terms of the sequence<br />

(V0,V1,...,Vm,Vm+1), with initial values (V0,V1) =(2,A) and specific<br />

rules V2j = V 2<br />

j − 2modn and V2j+1 = VjVj+1 − A mod n;<br />

3. [Declaration]<br />

if(AVm ≡ 2Vm+1 (mod n)) return “n is a Lucas probable prime with<br />

parameters a, b”;<br />

return “n is composite”;<br />

The algorithm for the Frobenius probable prime test is the same except that<br />

Step [Declaration] is changed to<br />

3’. [Lucas test]<br />

if(AVm ≡ 2Vm+1) return “n is composite”;<br />

and a new step is added:<br />

4. [Frobenius test]<br />

B = b (n−1)/2 mod n;<br />

if(BVm ≡ 2(modn)) return “n is a Frobenius probable prime with<br />

parameters a, b”;<br />

return “n is composite”;<br />

3.6.4 Theoretical considerations and stronger tests<br />

If x 2 − ax + b is irreducible over Z and is not x 2 ± x + 1, then the Lucas<br />

pseudoprimes with respect to x 2 − ax + b are rare compared with the primes<br />

(see Exercise 3.26 for why we exclude x 2 ± x + 1). This result is in [Baillie and<br />

Wagstaff 1980]. The best result in this direction is in [Gordon and Pomerance<br />

1991]. Since the Frobenius pseudoprimes with respect to x 2 − ax + b are a<br />

subset of the Lucas pseudoprimes with respect to this polynomial, they are if<br />

anything rarer still.<br />

It has been proved that for each irreducible polynomial x 2 − ax + b there<br />

are infinitely many Lucas pseudoprimes, and in fact, infinitely many Frobenius<br />

pseudoprimes. This was done in the case of Fibonacci pseudoprimes in [Lehmer<br />

1964], in the general case for Lucas pseudoprimes in [Erdős et al. 1988], and<br />

in the case of Frobenius pseudoprimes in [Grantham 2001]. Grantham’s proof<br />

on the infinitude of Frobenius pseudoprimes works only in the case <br />

∆<br />

n =1.<br />

There are some specific quadratics, for example, the polynomial x2 − x − 1for<br />

the Fibonacci recurrence, for which we know that there are infinitely many<br />

Frobenius pseudoprimes with <br />

∆<br />

n = −1 (see [Parberry 1970] and [Rotkiewicz

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!