Fermat Primes are prime numbers of the form , where *n* is a non-negative integer and are named after the French Mathematician Pierre de Fermat who studied numbers of this form.

**If 2**^{n} + 1 is a prime, then *n* is a power of 2

For 2^{n} + 1 to be prime, then *n* must not contain an odd factor, or 2^{n} + 1 would be a factorable number of the form:

However, although this condition is necessary, it is not sufficient. Fermat conjectured that all the numbers of this form would be prime, however in 1732, Leonard Euler showed that F5 is a composite (4,294,967,297 = 641 * 6,700,417). Currently, we only know of 5 prime Fermat Numbers:

Pépin’s Test: Théophile Pépin showed that a Fermat number is prime if and only if:

This condition is both necessary and sufficient.

### Properties

**For n ≥ 1, **

This can be proved by induction:

*When n = 1: F0 + 2 = 3 + 2 = F1 *

*Assume: Fn = F0···Fn-1 + 2 is true*

*Then: F0···Fn + 2 *

* = F0···Fn-1· F**n + 2*

* = (Fn – 2)·Fn + 2*

* = (2*^{2^n} – 1)(2^{2^n} + 1) + 2

* = 2*^{2^n+1} + 1 = Fn+1

**For n ≥ 1, **

Proof: (Fn-1 -1)^{2} + 1 = (2^{2^n-1} +1 – 1)^{2 }+ 1 = *2*^{2^n} + 1 = Fn

**No Fermat number is a perfect square. **

F0 and F1 (3 and 5 respectively) are clearly not perfect squares.

For Fn where n ≥ 2, Fn ≡ 7 (mod 10). However, only numbers that are congruent to 0, 1, 4, 5, 6, or 9 (mod 10) can be a perfect square.

**No two Fermat numbers share a common factor greater that 1. **

We will prove this by contradiction. Let’s suppose there exist Fi and Fj (where Fj > Fi) such that there exists an a > 1 that divides both of them. Another property of Fermat numbers that can be shown by induction is:

Hence, .

As Fi divided Fj, *a* also divides Fj-1 and thus F0···Fi···Fj-1. Then, *a* has to divide the difference Fj – F0···Fj-1, which equals 2 (as shown in property 1). It follows that a = 2, but all Fermat numbers are odd, therefore there is a contradiction and so no two Fermat numbers share a common factor greater that 1.

I have only covered a few properties satisfied by Fermat Primes, but this article is very comprehensive and lists a wide selection of their properties.

Little is known about Fermat numbers for large *n*, and in fact the following are all open problems:

- Is
*F*_{n} composite for all *n* > 4? *So far no primes have been found for n > 4.*
- Are there infinitely many Fermat primes?
^{}
- Are there infinitely many composite Fermat numbers?
- Does a Fermat number exist that is divisible by a perfect square other than 1
*i.e. not square-free*?

Sources: 1 | 2

Hope you liked this more mathematics heavy post! Let me know what you think. M x