Question 10.16: Prove that for any integer p > 1, if p isn’t pseudoprime,...
Prove that for any integer p > 1, if p isn’t pseudoprime, then p fails the Fermat test for at least half of all numbers in Zp+.
Learn more on how we answer questions.
Call a a witness if it fails the Fermat test for p; that is, if ap−1≡1 (mod p).
Let Zp∗ be all numbers in {1, . . . , p − 1} that are relatively prime to p. If p isn’t pseudoprime, it has a witness a in Zp∗.
Use a to get many more witnesses. Find a unique witness in Zp∗ for each nonwitness. If d ∈ Zp∗ is a nonwitness, you have dp−1≡1 (mod p). Hence (da mod p)p−1≡1 and so da mod p is a witness. If d1 and d2 are distinct nonwitnesses in Zp∗, then d1a mod p =d2a mod p. Otherwise, (d1−d2)a≡0 (mod p), and thus (d1−d2)a=cp for some integer c. But d1 and d2 are in Zp∗, and thus (d1−d2)<p, so a=cp/(d1−d2) and p have a factor greater than 1 in common, which is impossible because a and p are relatively prime. Thus, the number of witnesses in Zp∗ must be as large as the number of nonwitnesses in Zp∗, and consequently at least half of the members of Zp∗ are witnesses.
Next, show that every member b of Zp+ that is not relatively prime to p is a witness. If b and p share a factor, then be and p share that factor for any e>0. Hence bp−1≡1 (mod p). Therefore, you can conclude that at least half of the members of Zp+ are witnesses.