I have proved this for prime $n$.
I need help to prove $2^n-1$ is composite when $n$ composite
As far I can think - suppose $2^n-1$ is composite but $n$ is prime. $\\$
Therefore, $1$ divides $$2^n-1=(2-1)(2^{n-1}+2^{n-2}+....+2+1)$$ which means $2^n-1$ is divisible by $1$ and the number itself. Hence $2^{n-1}+2^{n-2}+...+2+1>1$ and it cannot be represented as the product of its factors. Hence $2^n-1$ is prime - a contradiction, hence $n$ is composite.
Am I correct here? I need help. Any help is appreciated.