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
.
@[deprecated Nat.fermatNumber_strictMono]
Alias of Nat.fermatNumber_strictMono
.
@[deprecated Nat.prod_fermatNumber]
Alias of Nat.prod_fermatNumber
.
theorem
Nat.fermatNumber_eq_prod_add_two
(n : ℕ)
:
n.fermatNumber = ∏ k ∈ Finset.range n, k.fermatNumber + 2
theorem
Nat.coprime_fermatNumber_fermatNumber
{m n : ℕ}
(hmn : m ≠ n)
:
m.fermatNumber.Coprime n.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 [JW22].