Prime Numbers

Prime Numbers Prime Numbers

thales.doa.fmph.uniba.sk
from thales.doa.fmph.uniba.sk More from this publisher
10.12.2012 Views

3.5 Probable primes and witnesses 141 odd composite number n has W (n) ≤ B, then the whole subject of testing primality becomes trivial. One would just try each number a ≤ B and if (3.4) holds for each such a, thenn is prime. Unfortunately, there is no such number B. The following result is shown in [Alford et al. 1994b]. Theorem 3.5.11. There are infinitely many odd composite numbers n with W (n) > (ln n) 1/(3 ln ln ln n) . In fact, the number of such composite numbers n up to x is at least when x is sufficiently large. 1/(35 ln ln ln x) x Failing a universal bound B, perhaps there is a slowly growing function of n which is always greater than W (n). Based on [Miller 1976], the following result is proved in [Bach 1985]. Theorem 3.5.12. On the ERH, W (n) < 2ln 2 n for all odd composite numbers n. Proof. Let n be an odd composite. Exercise 3.19 says that W (n) < ln 2 n if n is divisible by the square of a prime, and this result is not conditional on any unproved hypotheses. We thus may assume that n is squarefree. Suppose p is a prime divisor of n with p − 1=2s′ t ′ , t ′ odd. Then the same considerations that were used in the proof of Lemma 3.5.8 imply that if (3.4) holds, then (a/p) =−1 if and only if a 2s′ −1 t ≡−1(modn). Since n is odd, composite, and squarefree, it must be that n is divisible by two different odd primes, say p1,p2. Letpi − 1 = 2 si ti, ti odd, for i = 1, 2, with s1 ≤ s2. Let χ1(m) =(m/p1p2),χ2(m) =(m/p2), so that χ1 is a character to the modulus p1p2 and χ2 is a character to the modulus p2. First, consider the case s1 = s2. Under the assumption of the extended Riemann hypothesis, Theorem 1.4.5 says that there is a positive number m

142 Chapter 3 RECOGNIZING PRIMES AND COMPOSITES is a witness for n. In [Burthe 1997] it is shown that W (n) ≤ n c+o(1) as n → ∞ through the odd composites, where c = 1/(6 √ e). Heath-Brown (see [Balasubramanian and Nagaraj 1997]) has recently shown this with c =1/10.82. We close this section with the Miller primality test. It is based on Theorem 3.5.12 and shows that if the extended Riemann hypothesis holds, then primality can be decided in deterministic polynomial time. Algorithm 3.5.13 (Miller primality test). We are given an odd number n> 1. This algorithm attempts to decide whether n is prime (YES) or composite (NO). If NO is returned, then n is definitely composite. If YES is returned, n is either prime or the extended Riemann hypothesis is false. 1. [Witness bound] W =min{ 2ln 2 n ,n− 1}; 2. [Strong probable prime tests] for(2 ≤ a ≤ W ) { Decide via Algorithm 3.5.2 whether n is a strong probable prime base a; if(n is not a strong probable prime base a) return NO; } return YES; 3.6 Lucas pseudoprimes We may generalize many of the ideas of the past two sections to incorporate finite fields. Traditionally the concept of Lucas pseudoprimes has been cast in the language of binary recurrent sequences. It is profitable to view this pseudoprime construct using the language of finite fields, not just to be fashionable, but because the ideas then seem less ad hoc, and one can generalize easily to higher order fields. 3.6.1 Fibonacci and Lucas pseudoprimes The sequence 0, 1, 1, 2, 3, 5,... of Fibonacci numbers, say uj is the j-th one starting with j = 0, has an interesting rule for the appearance of prime factors. Theorem 3.6.1. If n is prime, then un−εn ≡ 0(modn), (3.7) where εn =1when n ≡±1(mod5), εn = −1 when n ≡±2(mod5),and εn =0when n ≡ 0(mod5). Remark. The reader should recognize the function εn. It is the Legendre symbol n 5 ; see Definition 2.3.2. Definition 3.6.2. We say that a composite number n is a Fibonacci pseudoprime if (3.7) holds. For example, the smallest Fibonacci pseudoprime coprime to 10 is 323.

142 Chapter 3 RECOGNIZING PRIMES AND COMPOSITES<br />

is a witness for n. In [Burthe 1997] it is shown that W (n) ≤ n c+o(1) as<br />

n → ∞ through the odd composites, where c = 1/(6 √ e). Heath-Brown<br />

(see [Balasubramanian and Nagaraj 1997]) has recently shown this with<br />

c =1/10.82.<br />

We close this section with the Miller primality test. It is based on<br />

Theorem 3.5.12 and shows that if the extended Riemann hypothesis holds,<br />

then primality can be decided in deterministic polynomial time.<br />

Algorithm 3.5.13 (Miller primality test). We are given an odd number n><br />

1. This algorithm attempts to decide whether n is prime (YES) or composite (NO).<br />

If NO is returned, then n is definitely composite. If YES is returned, n is either<br />

prime or the extended Riemann hypothesis is false.<br />

1. [Witness bound]<br />

W =min{ 2ln 2 n ,n− 1};<br />

2. [Strong probable prime tests]<br />

for(2 ≤ a ≤ W ) {<br />

Decide via Algorithm 3.5.2 whether n is a strong probable prime base a;<br />

if(n is not a strong probable prime base a) return NO;<br />

}<br />

return YES;<br />

3.6 Lucas pseudoprimes<br />

We may generalize many of the ideas of the past two sections to incorporate<br />

finite fields. Traditionally the concept of Lucas pseudoprimes has been cast<br />

in the language of binary recurrent sequences. It is profitable to view this<br />

pseudoprime construct using the language of finite fields, not just to be<br />

fashionable, but because the ideas then seem less ad hoc, and one can<br />

generalize easily to higher order fields.<br />

3.6.1 Fibonacci and Lucas pseudoprimes<br />

The sequence 0, 1, 1, 2, 3, 5,... of Fibonacci numbers, say uj is the j-th one<br />

starting with j = 0, has an interesting rule for the appearance of prime factors.<br />

Theorem 3.6.1. If n is prime, then<br />

un−εn ≡ 0(modn), (3.7)<br />

where εn =1when n ≡±1(mod5), εn = −1 when n ≡±2(mod5),and<br />

εn =0when n ≡ 0(mod5).<br />

Remark. The reader should recognize the function εn. It is the Legendre<br />

symbol <br />

n<br />

5 ; see Definition 2.3.2.<br />

Definition 3.6.2. We say that a composite number n is a Fibonacci<br />

pseudoprime if (3.7) holds.<br />

For example, the smallest Fibonacci pseudoprime coprime to 10 is 323.

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

Saved successfully!

Ooh no, something went wrong!