Lably
Skip to content

Fermat number

Positive integer of the form (2^(2^n))+1

  • 11 min read
  • 8 chapters

Related on Lably

Through Mathematics, Natural number and Sign (mathematics)

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

Basic properties

The Fermat numbers satisfy the following recurrence relations:

Fn=(Fn−1−1)2+1
Fn=F0F1⋯Fn−1+2

for n ≥ 1,

Fn=Fn−1+22n−1F0F1⋯Fn−2
Fn=(Fn−1−2Fn−2+1)2+(2(Fn−2−2)(Fn−3−1))2+(2Fn−2−3)2
Fn=Fn−12−2(Fn−2−1)2

for n ≥ 2. Each of these relations can be proved by mathematical induction. From the second 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

F0F1⋯Fj−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

  • No Fermat prime can be expressed as the difference of two pth powers, where p is an odd prime.
  • With the exception of F0 and F1, the last decimal digit of a Fermat number is 7.
  • The sum of the reciprocals of all the Fermat numbers (sequence A051158 in the OEIS) is irrational. (Solomon W. Golomb, 1963)

Sign in to keep reading

7 more chapters are free with a Lably account.

More in Number theory