Proof. Assume that for all positive integers not exceeding n and relatively prime to n, that
b(n−1)/2≡(nb)(modn)
Squaring both sides of this congruence tells us that
bn−1≡(nb)2≡(±1)2=1(modn)
if (b,n)=1. Hence, n must be a Carmichael number. Therefore, from Theorem 8.21, we know that n=q1q2⋯qr, where q1,q2,…,qr are distinct odd primes.
We will now show that
b(n−1)/2≡1(modn)
for all integers b with 1⩽b⩽n and (b,n)=1. Suppose that b is an integer such that
b(n−1)/2≡−1(modn)
We use the Chinese remainder theorem to find an integer a with 1<a<n,(a,n)=1, and
aa≡b(modq1)≡1(modq2q3⋯qr)
Then, we observe that
a(n−1)/2≡b(n−1)/2≡−1(modq1)
while
a(n−1)/2≡1(modq2q3⋯qr)
From congruences (9.12) and (9.13), we see that
a(n−1)/2≡±1(modn)
contradicting congruence (9.11). Hence, we must have
b(n−1)/2≡1(modn)
for all b with 1⩽b⩽n and (b,n)=1. Consequently, from the definition of an Euler pseudoprime, we know that
b(n−1)/2≡(nb)=1(modn)
for all b with 1⩽b⩽n and (b,n)=1. However, Lemma 9.3 tells us that this is impossible. Hence, the original assumption is false. There must be at least one integer b with 1<b<n,(b,n)=1, and
b(n−1)/2≡(nb)(modn)