Prime Numbers
Prime Numbers Prime Numbers
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.
- Page 104 and 105: 90 Chapter 2 NUMBER-THEORETICAL TOO
- Page 106 and 107: 92 Chapter 2 NUMBER-THEORETICAL TOO
- Page 108 and 109: 94 Chapter 2 NUMBER-THEORETICAL TOO
- Page 110 and 111: 96 Chapter 2 NUMBER-THEORETICAL TOO
- Page 112 and 113: 98 Chapter 2 NUMBER-THEORETICAL TOO
- Page 114 and 115: 100 Chapter 2 NUMBER-THEORETICAL TO
- Page 116 and 117: 102 Chapter 2 NUMBER-THEORETICAL TO
- Page 118 and 119: 104 Chapter 2 NUMBER-THEORETICAL TO
- Page 120 and 121: 106 Chapter 2 NUMBER-THEORETICAL TO
- Page 122 and 123: 108 Chapter 2 NUMBER-THEORETICAL TO
- Page 124 and 125: 110 Chapter 2 NUMBER-THEORETICAL TO
- Page 126 and 127: 112 Chapter 2 NUMBER-THEORETICAL TO
- Page 128 and 129: 114 Chapter 2 NUMBER-THEORETICAL TO
- Page 130 and 131: Chapter 3 RECOGNIZING PRIMES AND CO
- Page 132 and 133: 3.1 Trial division 119 d =3; while(
- Page 134 and 135: 3.2 Sieving 121 3.2 Sieving Sieving
- Page 136 and 137: 3.2 Sieving 123 this number’s ent
- Page 138 and 139: 3.2 Sieving 125 noticed that it was
- Page 140 and 141: 3.2 Sieving 127 } S = S \ (pS ∩ [
- Page 142 and 143: 3.3 Recognizing smooth numbers 129
- Page 144 and 145: 3.4 Pseudoprimes 131 } g =gcd(s, x)
- Page 146 and 147: 3.4 Pseudoprimes 133 Theorem 3.4.4.
- Page 148 and 149: 3.5 Probable primes and witnesses 1
- Page 150 and 151: 3.5 Probable primes and witnesses 1
- Page 152 and 153: 3.5 Probable primes and witnesses 1
- Page 156 and 157: 3.6 Lucas pseudoprimes 143 The Fibo
- Page 158 and 159: 3.6 Lucas pseudoprimes 145 Because
- Page 160 and 161: 3.6 Lucas pseudoprimes 147 use (3.1
- Page 162 and 163: 3.6 Lucas pseudoprimes 149 gcd(n, 2
- Page 164 and 165: 3.6 Lucas pseudoprimes 151 Theorem
- Page 166 and 167: 3.7 Counting primes 153 Label the c
- Page 168 and 169: 3.7 Counting primes 155 for b ≥ 2
- Page 170 and 171: 3.7 Counting primes 157 The heart o
- Page 172 and 173: 3.7 Counting primes 159 t =Im(s) ra
- Page 174 and 175: 3.7 Counting primes 161 Indeed, the
- Page 176 and 177: 3.8 Exercises 163 3.3. Prove that i
- Page 178 and 179: 3.8 Exercises 165 3.12. Show that a
- Page 180 and 181: 3.8 Exercises 167 3.28. Show that t
- Page 182 and 183: 3.9 Research problems 169 with W (n
- Page 184 and 185: 3.9 Research problems 171 3.50. The
- Page 186 and 187: 174 Chapter 4 PRIMALITY PROVING Rem
- Page 188 and 189: 176 Chapter 4 PRIMALITY PROVING sma
- Page 190 and 191: 178 Chapter 4 PRIMALITY PROVING Sin
- Page 192 and 193: 180 Chapter 4 PRIMALITY PROVING Let
- Page 194 and 195: 182 Chapter 4 PRIMALITY PROVING Rec
- Page 196 and 197: 184 Chapter 4 PRIMALITY PROVING (mo
- Page 198 and 199: 186 Chapter 4 PRIMALITY PROVING pol
- Page 200 and 201: 188 Chapter 4 PRIMALITY PROVING if
- Page 202 and 203: 190 Chapter 4 PRIMALITY PROVING 4.3
3.5 Probable primes and witnesses 141<br />
odd composite number n has W (n) ≤ B, then the whole subject of testing<br />
primality becomes trivial. One would just try each number a ≤ B and if (3.4)<br />
holds for each such a, thenn is prime. Unfortunately, there is no such number<br />
B. The following result is shown in [Alford et al. 1994b].<br />
Theorem 3.5.11. There are infinitely many odd composite numbers n with<br />
W (n) > (ln n) 1/(3 ln ln ln n) .<br />
In fact, the number of such composite numbers n up to x is at least<br />
when x is sufficiently large.<br />
1/(35 ln ln ln x)<br />
x<br />
Failing a universal bound B, perhaps there is a slowly growing function of<br />
n which is always greater than W (n). Based on [Miller 1976], the following<br />
result is proved in [Bach 1985].<br />
Theorem 3.5.12. On the ERH, W (n) < 2ln 2 n for all odd composite<br />
numbers n.<br />
Proof. Let n be an odd composite. Exercise 3.19 says that W (n) < ln 2 n if<br />
n is divisible by the square of a prime, and this result is not conditional<br />
on any unproved hypotheses. We thus may assume that n is squarefree.<br />
Suppose p is a prime divisor of n with p − 1=2s′ t ′ , t ′ odd. Then the same<br />
considerations that were used in the proof of Lemma 3.5.8 imply that if (3.4)<br />
holds, then (a/p) =−1 if and only if a 2s′ −1 t ≡−1(modn). Since n is odd,<br />
composite, and squarefree, it must be that n is divisible by two different odd<br />
primes, say p1,p2. Letpi − 1 = 2 si ti, ti odd, for i = 1, 2, with s1 ≤ s2.<br />
Let χ1(m) =(m/p1p2),χ2(m) =(m/p2), so that χ1 is a character to the<br />
modulus p1p2 and χ2 is a character to the modulus p2. First, consider the<br />
case s1 = s2. Under the assumption of the extended Riemann hypothesis,<br />
Theorem 1.4.5 says that there is a positive number m