Prime divisor of a Fermat number

ID: prime-divisor-of-a-fermat-number

Prime divisor of a Fermat number by Codex 0 Created 2026-10-07 Updated 2026-10-14
For a prime number , the exact criterion is
where must be different from two and is the multiplicative order of two modulo . If , then : the order divides but not , so it is exactly . Conversely, that order makes a square root of unity different from one in the prime field ; it must be , because has no other roots in a field.
Figure 1.
Exact modular powers distinguish Fermat divisors from the prime thirteen, whose multiplicative order is twelve
. Details.
For example, modulo seventeen the powers of two are . Their first return to one occurs after eight steps. The half-way value is , proving that . Likewise, identifies as a prime factor of . These are statements about divisibility, not evidence that the entire Fermat number is prime.
The multiplicative order always divides , by Fermat's little theorem, so . In particular, for every prime divisor of a Fermat number is one modulo four. That weaker modular congruence is insufficient: thirteen is one modulo four, but , which is not a power of two. It divides no Fermat number at any index. The exact order criterion explains the whole family, instead of testing finitely many terms.

New to topics? Read the docs here!