Definition:Fermat Pseudoprime/Historical Note

Historical Note on Fermat Pseudoprime
For a long time it was thought that $n$ had to be prime in order for $2^n - 2$ to be divisible by $n$.

This used to be used as a test for primality.

However, it was discovered that $2^{341} \equiv 2 \pmod {341}$.

However, $341 = 31 \times 11$ and so is composite.