# Is it possible the density of Mersenne numbers in the primes gets arbitrarily close to $1$?

Let a Mersenne number be $$M_p=2^{p}-1:p\in\text{prime}$$

1. Suppose above some lower bound every Mersenne number were prime and every prime number were a Mersenne number.

Can this conjecture be shown contradictory to the prime number theorem, the properties of Mersenne primes, or any other heuristics?

2. Suppose rather than there being some lower bound, suppose the above conditions represent the limiting behaviour of the primes (i.e. the proportion of primes greater than $$n$$ that are Mersenne tends to 1 as $$n\to\infty$$). Does this contradict currently known asymptotics?

3. What do heuristics show about (2)?

I'm not great at working out Big O notation etc. I'm aware this question would require the density of primes greater than some $$n$$ to approach zero so I conclude question 1 is answered "YES, it would be contradictory." But I don't know how the rate at which the density approaches zero would affect the answer to question 2.

• Just a note: while mfl's answer has shown that it is not possible for all primes above a certain threshold to be Mersenne primes, we still don't know if there are infinitely many Mersenne composites -- that is, if there are infinitely many primes $p$ so that $2^p-1$ is not prime. – Carl Schildkraut Oct 26 '18 at 15:18
• @CarlSchildkraut very interesting - I guess this is the contrapositive! The question of the density of the primes in the Mersenne numbers. – user334732 Oct 26 '18 at 16:11

## 2 Answers

From Bertrand's postulate we know that for every $$n>3$$ there exists a prime $$p$$ such that $$n

So, there exists a prime number $$p$$ between $$M_n=2^n-1$$ and $$M_{n+1}=2^{n+1}-1.$$

Thus, even if for some $$N$$ we have that $$M_n$$ is prime if $$n\ge N$$ then the proportion of prime numbers that are Mersenne cannot tend to $$1.$$

• Thanks, that's fab. I'm probably being daft but I'm getting $M_n<p<2^{n+1}-4$ for $M_n\in\text{prime}$... Actually I realise now, this is inside the bounds you set too. – user334732 Oct 26 '18 at 16:07
• Yes, you are right. – mfl Oct 26 '18 at 16:15

We can say more, that the density of Mersenne primes in the primes goes to zero. Given a number $$N$$, there are about $$\frac N{\log N}$$ primes below $$N$$ but only $$\log_2 N$$ powers of $$2$$, let alone Mersenne primes.

• Fab, thanks. I guess you're saying $\lim_{n\to\infty}\dfrac{\log_2(n)\cdot\log(n)}{n}=0$ – user334732 Oct 26 '18 at 16:05
• Yes, that is correct. – Ross Millikan Oct 26 '18 at 16:07