# Relationship between Mersenne Primes and Triangular / Perfect Numbers

I'm a new user and have only a college sophomore's understanding of mathematics, so please bear with me.

I was reading a book titled “The Simpsons and their Mathematical Secrets” in which the author briefly discusses Mersenne primes and perfect numbers. Among his statements were two that piqued my interest:

1. Every perfect number is also a triangular number, and
2. Every perfect number contains a Mersenne prime as one of its divisors.

After reading this, and how rare perfect numbers are, I wanted to try and devise a method of generating perfect numbers from Mersenne primes. I thought the best way to do this was to take the sum of a set of consecutive integers which included the Mersenne prime. I hand tested starting with small Mersenne primes:

$$3 + 2 + 1 = 6$$ $$7 + 6 + 5 + … + 2 + 1 = 28$$

And using Gauss’s formula for larger ones:

$$31 \cdot \frac{31+1}{2}=496$$

I had expected to have to add greater consecutive integers to the sum in order to arrive the Mersenne prime’s corresponding perfect number, but after doing this method a few times It seemed like the Mersenne prime was always the largest number in the series of consecutive integers, in other words the “base” of the triangular number.

My question is, is this true for all perfect numbers?

Also, the author made another statement the Mersenne primes can be generated using the formula:

$2^p-1$ where $p$ is any prime number

But the author also stated that this formula does not always generate a prime number. If the number of primes are infinite, Is the problem with finding new perfect numbers that the equation above produced less and less Mersenne primes as larger and larger known primes were plugged into it?

Thanks for taking the time to read this.

• It is true for all even perfect numbers, as proved by Euler long ago. However, no one has ruled out the possibility of a perfect number being odd, and an odd perfect number wouldn't follow rules 1 and 2. At the same time, no one has ever found an odd one, and we know they are quite rare (but then perfect numbers are pretty rare in general). Mar 22, 2015 at 14:50
• To your second question, yes, Mersenne primes get much rarer as you go out, and no one has ruled out the possibility that they might just run dry past a certain point. It takes a long time to test a single 10 million digit Mersenne number to see if it's prime - billions of computer hours have been spent trying millions of $p$s in $2^p-1$ and only 48 Mersenne primes have been found. See mersenne.org Mar 22, 2015 at 14:54
• That is exactly what I wanted to know. Thank you for your answers Erick! Mar 22, 2015 at 14:59
• @ErickWong: Do you have a proof for your assertion that "an odd perfect number would not follow rules $1$ and $2$"? Rule $1$: Every perfect number is also a triangular number, and Rule $2$: Every perfect number contains a Mersenne prime as one of its divisors. Jan 4, 2020 at 4:39
• No odd perfect numbers exist below $10^{1500}$. There are also a whole bunch of conditions an odd number would have to satisfy. Perhaps if contradictory prerequisites were proven, or if an odd perfect number was found by a brute force search.... Jan 31 at 2:46

It is known that even perfect numbers are of the form

$$\dfrac{{M_p}(M_p + 1)}{2}$$

where $M_p = 2^p - 1$ is a Mersenne prime. Thus, even perfect numbers are triangular.

However, it is currently unknown whether an odd perfect number

$$q^k n^2$$

(with Euler prime $q$) can be triangular. (See this MO question for more information.) It is known, however, that such odd perfect numbers must be a nontrivial multiple of the triangular number

$$T(q) = \dfrac{q(q+1)}{2}.$$