# Fermat number

Named after Pierre de Fermat 5 5 Fermat numbers 3, 5, 17, 257, 65537 65537

In mathematics a Fermat number, named after Pierre de Fermat who first studied them, is a positive integer of the form

${\displaystyle F_{n}=2^{2^{n}}+1,}$

where n is a nonnegative 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, it can be shown that k must be a power of two. (If k = ab where 1 ≤ a, bk and b is odd, then 2k + 1 = (2a)b + 1 ≡ (−1)b + 1 = 0 (mod 2a + 1). See below for a complete proof.) In other words, every prime of the form 2k + 1 (other than 2 = 20 + 1) is a Fermat number, and such primes are called Fermat primes. As of 2019, the only known Fermat primes are F0, F1, F2, F3, and F4 (sequence A019434 in the OEIS).

## Basic properties

The Fermat numbers satisfy the following recurrence relations:

${\displaystyle F_{n}=(F_{n-1}-1)^{2}+1}$

for n ≥ 1,

${\displaystyle F_{n}=F_{n-1}+2^{2^{n-1}}F_{0}\cdots F_{n-2}}$
${\displaystyle F_{n}=F_{n-1}^{2}-2(F_{n-2}-1)^{2}}$
${\displaystyle F_{n}=F_{0}\cdots F_{n-1}+2}$

for n ≥ 2. Each of these relations can be proved by mathematical induction. From the last equation, we can deduce Goldbach's theorem (named after Christian Goldbach): no two Fermat numbers share a common integer factor greater than 1. To see this, suppose that 0 ≤ i < j and Fi and Fj have a common factor a > 1. Then a divides both

${\displaystyle F_{0}\cdots F_{j-1}}$

and Fj; hence a divides their difference, 2. Since a > 1, this forces a = 2. This is a contradiction, because each Fermat number is clearly odd. As a corollary, we obtain another proof of the infinitude of the prime numbers: for each Fn, choose a prime factor pn; then the sequence {pn} is an infinite sequence of distinct primes.

Further properties:

Other Languages
Ænglisc: Fermat tæl
العربية: عدد فيرما
azərbaycanca: Ferma ədədləri
български: Число на Ферма
Deutsch: Fermat-Zahl
Ελληνικά: Αριθμός Φερμά
Esperanto: Nombro de Fermat
français: Nombre de Fermat
한국어: 페르마 수
հայերեն: Ֆերմայի թիվ
עברית: מספר פרמה
Nederlands: Fermatgetal
norsk nynorsk: Fermattal
Piemontèis: Nùmer ëd Fermat
português: Número de Fermat
русский: Число Ферма
Simple English: Fermat number
slovenščina: Fermatovo praštevilo
svenska: Fermattal
українська: Числа Ферма
Tiếng Việt: Số Fermat