Prove that if $n$ is a composite, then $2^n-1$ is composite. [duplicate]

Not sure if I'm doing this correctly but this is what I've done:

Assume that $n$ is composite and suppose $2^n-1$ is a prime for $n \gt 2$. Then, $2^n-1 = 2k$ for some $k \in \Bbb Z $, $\forall n$. But this would be a contradiction since $n \gt 2$. I'm not sure if this a correct proof.

EDIT: I realized that it's to prove $2^n - 1$ NOT $2^{n-1}$ so my attempt above is completely wrong.


Solution 1:

$$n=km\Longrightarrow 2^n-1=(2^k)^m-1=\left(2^k-1\right)\left((2^k)^{m-1}+(2^k)^{m-2}+\ldots+2^k+1\right)$$