Fermat numbers¶
Fermat numbers are the integers
They grow extremely quickly and are central to a classic “counterexample” story: Fermat conjectured that all \(F_n\) are prime, but \(F_5\) is composite (Euler). [Kř\'ıžek et al., 2013, Wikipedia contributors, 2025]
Key facts¶
Coprime property: \(\gcd(F_m, F_n)=1\) for \(m \ne n\). In fact, \(F_0F_1\cdots F_{n-1} = F_n - 2\). [Kř\'ıžek et al., 2013]
Fermat primes: If \(F_n\) is prime, it is called a Fermat prime (known: \(n=0..4\)). [The OEIS Foundation Inc., 2025]
Pépin test (primality): For \(n\ge 1\), \(F_n\) is prime iff \(3^{(F_n-1)/2} \equiv -1 \pmod{F_n}\). [Kř\'ıžek et al., 2013]
What to experiment with¶
Factor hunting: Search for small prime factors of \(F_n\) (using modular arithmetic and wheel/primorial filters).
Pépin vs. trial division: Compare performance and failure modes as \(n\) increases.
Structure of known factors: Many known prime factors have the form \(k\cdot 2^{n+2} + 1\); explore how often such candidates appear.
Euclid-style numbers: Explore \(E_n = 1 + \prod_{i=0}^{n} p_i\) and compare “Euclid primes” vs. Fermat primes (they behave very differently).
References¶
See Kř\'ıžek et al. [2013], The OEIS Foundation Inc. [2025], Wikipedia contributors [2025].