Primality Testing. Recall Fermat's Little Theorem from Chapter 6. Let p be prime with gcd(a,p)=1. Then ap−1≡1(modp). We can use Fermat's Little Theorem as a screening test for primes. For example, 15 cannot be prime since
215−1≡214≡4(mod15).
However, 17 is a potential prime since
217−1≡216≡1(mod17).
We say that an odd composite number n is a pseudoprime if
2n−1≡1(modn).
Which of the following numbers are primes and which are pseudoprimes?
(a) 342 (b) 811 (c) 601 (d) 561 (e) 771 (f) 631