Let $n$ be a positive integer. Show that if $2^n -1$ is a prime number, then $n$ is a prime number.
This is how I started to tackle this question:
Assume that instead of $n$ being a prime number, it is a composite number. Let $n=ab$ where a and b are factors. Thus, we have $2^n-1 = 2^a*2^b-1$ When we try to factor out the $2^b$ out, we will get:
$2^b * (2^a-1/2^b)$ Since $2^b$ is one of the factors, this is a contradiction. Therefore n must be a prime number.
I know that the $-1/2^b$ is not correct as it makes one of the factors a fraction. How do I change this a little bit to make sure that my proof is right?