Sunday, 18 January 2026

Exercise (4.3).13

Prove that if $2^n- 1$ is prime then $n$ is prime.


We'll prove this by proving its contrapositive: if $n$ is composite, then $2^n-1$ is composite.


Assuming $n$ is composite means we can write it as $n=ab$ where $a$ and $b$ are non-trivial factors. Using the difference of powers identity, this means

$$ 2^n -1 = 2^{ab}-1 = (2^a-1) \times \biggl (2^{a(b-1)} + 2^{a(b-2)} + \ldots + 2^a + 1  \biggr )$$

So $2^n-1$ is composite, with a factor $2^a-1$.

By showing 

$$ n \text{ composite } \implies 2^n -1 \text{ composite } $$

we have shown the desired implication

$$ 2^n-1 \text{ prime } \implies n \text{ prime } $$