# $2^n-1$ is composite [duplicate]

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 StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jul 1 '18 at 13:07

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$.