10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

136 Chapter 3 RECOGNIZING PRIMES AND COMPOSITES<br />

2. [Power of 2 in n − 1]<br />

for(j ∈ [1,s− 1]) { // j is a dummy counter.<br />

b = b 2 mod n;<br />

if(b == n − 1) return “n is a strong probable prime base a”;<br />

}<br />

return “n is composite”;<br />

This test was first suggested in [Artjuhov 1966/67], and a decade later,<br />

J. Selfridge rediscovered the test and popularized it.<br />

We now consider the possibility of showing that an odd number n is<br />

composite by showing that (3.4) fails for a particular number a. For example,<br />

we saw in the previous section that 341 is pseudoprime base 2. But (3.4) does<br />

not hold for n = 341 and a =2.Indeed,wehave340=2 2 · 85, 2 85 ≡ 32<br />

(mod 341), and 2 170 ≡ 1 (mod 341). In fact, we see that 32 is a nontrivial<br />

square root of 1 (mod 341).<br />

Now consider the pair n =91anda = 10. We have 90 = 2 1 · 45 and<br />

10 45 ≡−1 (mod 91). So (3.4) holds.<br />

Definition 3.5.3. We say that n is a strong pseudoprime base a if n is an<br />

odd composite, n − 1=2 s t,witht odd, and (3.4) holds.<br />

Thus, 341 is not a strong pseudoprime base 2, while 91 is a strong pseudoprime<br />

base 10. J. Selfridge proposed using Theorem 3.5.1 as a pseudoprime test in<br />

the early 1970s, and it was he who coined the term “strong pseudoprime.” It<br />

is clear that if n is a strong pseudoprime base a, thenn is a pseudoprime base<br />

a. The example with n = 341 and a = 2 shows that the converse is false.<br />

For an odd composite integer n we shall let<br />

S(n) ={a (mod n) :n is a strong pseudoprime base a}, (3.5)<br />

and let S(n) =#S(n). The following theorem was proved independently in<br />

[Monier 1980] and [Rabin 1980].<br />

Theorem 3.5.4. For each odd composite integer n>9 we have S(n) ≤<br />

1<br />

4 ϕ(n).<br />

Recall that ϕ(n) is Euler’s function evaluated at n. Itisthenumberof<br />

integers in [1,n] coprime to n; that is, the order of the group Z∗ n. If we<br />

know the prime factorization of n, it is easy to compute ϕ(n): We have<br />

ϕ(n) =n <br />

p|n<br />

(1 − 1/p), where p runs over the prime factors of n.<br />

Before we prove Theorem 3.5.4, we first indicate why it is a significant<br />

result. If we have an odd number n and we wish to determine whether it<br />

is prime or composite, we might try verifying (3.4) for some number a with<br />

1

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

Saved successfully!

Ooh no, something went wrong!