Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Do all primes can be written in form of Mersenne prime? If not, why Mersenne form is important?

share|cite|improve this question
up vote 11 down vote accepted

Trivially, the answer to the first question is no, since for example $13$ is a prime which cannot be written in the form $2^n-1$.

For the second question, one of the reasons that they are considered useful is that there is a relatively straightforward way of testing if a Mersenne number is actually a prime or not. This process, the Lucas-Lehmer test is not difficult to turn into a computer algorithm, and it can be used to search for Mersenne primes of enormous size, so that almost all the numbers which have ever held the title of "Largest Known Prime" have been Mersenne numbers.

share|cite|improve this answer

If all primes were Mersenne primes then there would be no need for the term "Mersenne prime" to even exist. Mersenne primes are special primes that are of the form $2^n - 1$ for some positive integer $n$.

Actually it turns out that the only way such numbers can be prime is if $n$ itself is prime (but the converse is not true, e.g. $2^{11} - 1$ is not prime).

The prime $5$ cannot be a Mersenne prime since $6 = 5+1$ is not a power of $2$.

As for your second question, the answer above tells you the applications to primality testing, it is easier to study the primality of such numbers in general.

Another application is to do with perfect numbers. A number is perfect if the sum of its proper divisors is the number itself. So for example the numbers $6$ and $28$ are perfect.

Now it is possible to show that an even positive integer $n$ is perfect if and only if $n$ is of the form $2^{p-1}(2^p - 1)$ for a prime $p$ such that $2^p-1$ is prime. So finding Mersenne primes is exactly the same as finding even perfect numbers.

share|cite|improve this answer
In the last paragraph I think you mean an even positive integer $n$. – Keenan Kidwell Sep 1 '12 at 16:06
Oh yeah :p, I forgot all about the unknown status of odd perfect numbers. – fretty Sep 1 '12 at 16:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.