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). – Erick Wong Mar 22 '15 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 – Erick Wong Mar 22 '15 at 14:54
• That is exactly what I wanted to know. Thank you for your answers Erick! – user225556 Mar 22 '15 at 14:59

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}.$$