This question already has an answer here:

Prove that if $n$ is composite, then $2^n$ is composite.

I tried the following:

$$2^n-1 = 2^n-1^b = (2-1)(2^{n-1}+2^{n-2} + \ldots + 1) = 2^{n-1}+2^{n-2} + \ldots + 1$$

This is the summation of $n$ numbers and $n$ is composite, hence $2^n-1$ is composite.

Is this correct?


marked as duplicate by ccorn, Martin Sleziak, Namaste algebra-precalculus Jul 1 '18 at 13:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Any polynomial of the form $x^n-1$ has $x-1$ as a factor, since

$$ \frac{x^n-1}{x-1} = 1+x+ \dots + x^{n-1}. $$

If $n=ab$ is composite, then we may rewrite $x=2^a$, so we have

$$ \frac{x^b-1}{x-1}=1 + x+ \dots + x^{b-1} \implies x^b-1 = (x-1)(1+x+ \dots + x^{b-1}), $$

i.e., $2^n-1 = (2^a-1)(1+ 2 +\dots + 2^{b-1})$.


Let us write $n=ab$ where $a,b>1$. Then $$2^n-1=2^{ab}-1=(2^a)^b-1^b=(2^a-1)\sum_{k=0}^{b-1}(2^a)^k$$

Because $a,b>1$, we must have $(2^a-1)>1$ and $\sum_{k=0}^{b-1}(2^a)^k>1$.


Not the answer you're looking for? Browse other questions tagged or ask your own question.