# Is it true that in $2^n-1$, when $n$ is a prime number, you don't always get a Mersenne prime?

For $2^n-1$, where $n$ is a prime number, is it true that you don't always get a Mersenne prime? Remember, a Mersenne prime is a number that has a power of two subtracted by one and is then prime:$$n|2^n-1$$$$2|2^2-1$$$$=3$$$$3|2^3-1$$$$=7$$$$5|2^5-1$$$$=31$$$$7|2^7-1$$$$=127$$$$11|2^{11}-1$$$$=2,047$$ Well, $2,047=23\times89$
So, 11 can't be used for $n$, even though it's a prime number. How does this happen that $n$ can't always be a prime number to fit into $2^n-1$ to give out a Mersenne prime?

• No proof but reasonable: If you're hypothesis would hold, we could calculate endlessly many Mersenne primes just by taking the last calculated prime $p$ and using it to create $2^p - 1$. Since people try hard to find these primes, you could follow that your hypothesis won't stand. Jan 12 '15 at 21:49
• What we know is that often when we plug a prime into the equation $f(n)=2^n-1$ we find another prime. It is unknown whether there are even an infinite number of such primes.
– Joel
Jan 12 '15 at 21:49
• Look at the Wikipedia entry. Jan 12 '15 at 21:50
• The inclusion holds the other way around. If we have got a Mersenne prime $2^p - 1$ we can conclude that $p$ is a prime. Jan 12 '15 at 21:51
• Sorry. Editing right now. Jan 12 '15 at 21:51

This is a bit challenging to answer. In short, there is no reason why $2^p - 1$ would always give a prime number. You have just given evidence to this fact.
A Mersenne prime is a prime of the form $2^p - 1$. This definition does not mean that every number of the form $2^p - 1$ is prime.