Fermat Pseudoprime/Base 3/Examples/91

Theorem
The smallest Fermat pseudoprime to base $3$ is $91$:
 * $3^{91} \equiv 3 \pmod {91}$

despite the fact that $91$ is not prime:
 * $91 = 7 \times 13$

Proof
We have that:

Here we define Fermat pseudoprime to base $3$ to be a composite number $n$ such that (a slightly stronger result):
 * $3^{n - 1} \equiv 1 \pmod n$

Otherwise we have:
 * $3^6 = 729 \equiv 3 \pmod 6$

Following our definition, we see that a Fermat pseudoprime to base $3$ cannot be divisible by $3$:

neither can it be divisible by $4$:

nor $10$:

Also such a number cannot be equal to twice a prime greater than $3$:

nor five times a prime greater than $5$:

Therefore only the following numbers less than $91$ remain:
 * $25, 49, 77$

and we check:

hence the result.