A Fermat prime is a Fermat number that is prime. Fermat primes are therefore near-square primes.
Fermat conjectured in 1650 that every Fermat number is prime and Eisenstein in 1844 proposed as a problem the proof that there are an infinite number of Fermat primes (Ribenboim 1996, p. 88). At present, however, the only Fermat numbers for for which primality or compositeness has been established are all composite.
The only known Fermat primes are
(1)
| |||
(2)
| |||
(3)
| |||
(4)
| |||
(5)
|
(OEIS A019434), and it seems unlikely that any more will be found using current computational methods and hardware. It follows that is prime for the special case together with the Fermat prime indices, giving the sequence 2, 3, 5, 17, 257, and 65537 (OEIS A092506).
is a Fermat prime if and only if the period length of is equal to . In other words, Fermat primes are full reptend primes.