Fermat prime (source code)

= Fermat prime
{c}
{title2=$F_k\text{ prime}$}

A <Fermat prime> is a <Fermat number> that is also a <prime number>:
$$
F_k=2^{2^k}+1,\qquad k\geq0.
$$
The defining form alone does not imply <primality>. For example, $65537$ is a <Fermat prime>, while $4294967297$ is a <Fermat number> with proper <divisors>. For $k\geq1$, every <Fermat prime> is one modulo four and two modulo three. <Pépin's test> gives an exact <primality testing> criterion for these candidates, rather than relying on their form.