Fermat number

Fermat prime
Named afterPierre de Fermat
No. of known terms5
Conjectured no. of terms5
Subsequence ofFermat numbers
First terms3, 5, 17, 257, 65537
Largest known term65537
OEIS indexA019434

In mathematics, a Fermat number, named after Pierre de Fermat (1607–1665), the first known to have studied them, is a positive integer of the form: where n is a non-negative integer. The first few Fermat numbers are: 3, 5, 17, 257, 65537, 4294967297, 18446744073709551617, ... (sequence A000215 in the OEIS).

If 2k + 1 is prime and k > 0, then k itself must be a power of 2,[1] so 2k + 1 is a Fermat number; such primes are called Fermat primes. As of 2023, the only known Fermat primes are F0 = 3, F1 = 5, F2 = 17, F3 = 257, and F4 = 65537 (sequence A019434 in the OEIS).

  1. ^ For any positive odd number , where .