Fermat primes: if a^n+1 is prime then n is a power of two
ProvedFamousTheorems.fermat_prime_exponent_power_of_twoFermat primes: if is prime then is a power of two. Let and be integers. If is prime, then for some .
If had an odd factor , then would properly divide . So the only candidates for primes of the form are the Fermat numbers . Fermat conjectured that all of them are prime, and Euler refuted this in 1732 with . By the Gauss–Wantzel theorem, Fermat primes determine which regular polygons are constructible.
Formalization note. Mathlib's Nat.pow_of_pow_add_prime, for natural numbers and .
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem fermat_prime_exponent_power_of_two {a n : ℕ} (ha : 1 < a) (hn : n ≠ 0) (hp : (a ^ n + 1).Prime) : ∃ m : ℕ, n = 2 ^ m := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `Nat.pow_of_pow_add_prime`. Proof here reduces to that Mathlib result.