Fermat numbers #
The Fermat numbers are a sequence of natural numbers defined as Nat.fermatNumber n = 2^(2^n) + 1
,
for all natural numbers n
.
Main theorems #
Nat.coprime_fermatNumber_fermatNumber
: two distinct Fermat numbers are coprime.Nat.pepin_primality
: For 0 < n, Fermat number Fₙ is prime if3 ^ (2 ^ (2 ^ n - 1)) = -1 mod Fₙ
fermat_primeFactors_one_lt
: For 1 < n, Prime factors the Fermat number Fₙ are of formk * 2 ^ (n + 2) + 1
.
theorem
Nat.fermatNumber_eq_prod_add_two
(n : ℕ)
:
n.fermatNumber = ∏ k ∈ Finset.range n, k.fermatNumber + 2
theorem
Nat.coprime_fermatNumber_fermatNumber
{k n : ℕ}
(h : k ≠ n)
:
n.fermatNumber.Coprime k.fermatNumber
Goldbach's theorem : no two distinct Fermat numbers share a common factor greater than one.
From a letter to Euler, see page 37 in [juskevic2022].