# Even Perfect numbers $n$ with $n+1$ prime

The set $S$ of even perfect numbers $n$ such that $n+1$ is a prime number contains $$6,28,33550336,137438691328$$

Latter number found by Joerg Arndt, corresponds to $M_{19}$ (mersenne)

Question: Is $S$ reduced to these $4$ numbers.

New: Joerg Arndt checked up to exponent $110503$ that the corresponding number $n+1$ is composite. (Improved $19$ to $110503$).

Which function of $x$ migh describe well the size of the set of elements in $S$ less than $x$

divided

by the size of the set of all even perfect numbers less than $x$; mainly with big $x.$

So, I am asking for relative size not absolute size. E.g., if I were asking for relative density of the prime numbers congruent to $3$ modulo $4$: I do not want to use the big machinery of the prime number theorem, or Dirichlet's Theorem to deduce how many should be there. I just want (in these case) to know how to describe in terms of $x$

number of primes congruent to $3$ modulo $4$ and less than $x$

divided by

number of primes less than $x$

How many such numbers $n$ we may expect inside the known 47 perfect numbers ?

• One reason not to consider the- 1 version is that almost all such numbers are multiples of 3. It might be prudent to check a few more congruences and see what that says about the Mersenne exponent n before going much farther. Gerhard "Ask Me About System Design" Paseman, 2011.04.23 Apr 24, 2011 at 3:43
• If the Mersenne exponent is 7 mod 10; your number is composite. This takes out about a third of the known perfect numbers. 2 mod 3 takes out about another third. There are other congruences on the exponent that show some of your numbers aren't prime; you can use them to get an upper bound or even a density estimate. Gerhard "Ask Me About System Design" Paseman, 2011.04.25 Apr 25, 2011 at 7:20
• Simulation suggests the next candidate corresponds to Mersenne exponent 61, with at most five more candidates among the known perfect numbers after that. Gerhard "Ask Me About System Design" Paseman, 2011.04.25 Apr 25, 2011 at 8:04
• Based on Tapio Rajala's statements to a parallel (not quite duplicate) question, I now guess that there are four prime candidates among the 47. Gerhard "12 Guesses For 10 Cents" Paseman, 2011.05.07 May 7, 2011 at 17:32

There's a conjecture (for which I can't find a source now) that the number of Mersenne primes $2^n-1$ with $n < x$ is $c \log x$ for some constant $c$. Differentiating this, the "probability" that $2^n-1$ is prime is about $c/n$. (This is unconditional; that is, I'm not assuming $n$ is prime.)

The even perfect numbers are exactly of the form $2^{n-1}(2^n-1)$ with $2^n-1$ prime.

So the "probability" that $2^n-1$ and $2^{n-1} (2^n-1) + 1$ is prime, assuming independence, is $c/n$ times the probability that $2^{n-1} (2^n-1) + 1$ is prime. $2^{n-1} (2^n-1) + 1$ is roughly $2^{2n}$, so by the prime number theorem its "probability" of being prime is about $1/log(2^{2n})$, or again a constant divided by $n$. That is, the "probability" that $2^n-1$ is prime and the corresponding number is one less than a prime is $c/n^2$; since $\sum_{n \ge 1} cn^{-2}$ is finite this leads us to suspect that there are finitely many solutions.

Of course none of this is anywhere near being a proof...

• Based on these heuristics. How many such numbers $n$ we may expect inside the known 47 perfect numbers ? Apr 25, 2011 at 2:23

For dealing with large potential primes a good choice is openpfgw

Using openpfgw I finished the list to $1 3466 917$ in about 20 minutes without finding new primes.

[added] The only prime perfect + 1 candidate from the known Mersenne primes is for $M_{20996011}$ - I am running ECM factoring on it.

[later] François Brunault found that $M_{20996011}$ is divisible by $1552147$ which settles the question for the known perfect numbers.

Here is the log:

./pfgw64 -f10 -lmer1log.txt /tmp/mer.txt

2^0*(2^1-1)+1 is trivially prime!: 2
2^1*(2^2-1)+1 is trivially prime!: 7
2^2*(2^3-1)+1 is trivially prime!: 29
2^4*(2^5-1)+1 trivially factors as: 7*71
2^6*(2^7-1)+1 trivially factors as: 11*739
2^12*(2^13-1)+1 is trivially prime!: 33550337
2^16*(2^17-1)+1 has factors: 7
2^18*(2^19-1)+1 is 3-PRP! (0.0000s+0.0009s)
2^30*(2^31-1)+1 has factors: 29
2^60*(2^61-1)+1 is composite: RES64: [36E090A8C361AD6C] (0.0000s+0.0003s)
2^88*(2^89-1)+1 has factors: 7
2^106*(2^107-1)+1 has factors: 7
2^126*(2^127-1)+1 has factors: 11
2^520*(2^521-1)+1 has factors: 7
2^606*(2^607-1)+1 has factors: 11
2^1278*(2^1279-1)+1 is composite: RES64: [570A6B3FD91E6339] (0.8700s+0.0011s)
2^2202*(2^2203-1)+1 is composite: RES64: [ECB4FE924C674723] (4.6906s+0.0010s)
2^2280*(2^2281-1)+1 has factors: 197
2^3216*(2^3217-1)+1 has factors: 11
2^4252*(2^4253-1)+1 has factors: 7
2^4422*(2^4423-1)+1 is composite: RES64: [F3603EEF4BD4F197] (17.0237s+0.0031s)
2^9688*(2^9689-1)+1 has factors: 7
2^9940*(2^9941-1)+1 has factors: 7
2^11212*(2^11213-1)+1 has factors: 7
2^19936*(2^19937-1)+1 has factors: 7
2^21700*(2^21701-1)+1 has factors: 7
2^23208*(2^23209-1)+1 has factors: 35603
2^44496*(2^44497-1)+1 has factors: 11
2^86242*(2^86243-1)+1 has factors: 7
2^110502*(2^110503-1)+1 has factors: 491
2^132048*(2^132049-1)+1 is composite: RES64: [1B3B60AEC3578817] (744.2790s+111.7145s)
2^216090*(2^216091-1)+1 has factors: 4673
2^756838*(2^756839-1)+1 has factors: 7
2^859432*(2^859433-1)+1 has factors: 7
2^1257786*(2^1257787-1)+1 has factors: 11
2^1398268*(2^1398269-1)+1 has factors: 7
2^2976220*(2^2976221-1)+1 has factors: 7
2^3021376*(2^3021377-1)+1 has factors: 7
2^6972592*(2^6972593-1)+1 has factors: 7
2^13466916*(2^13466917-1)+1 has factors: 11


The rest Mersenne primes lead to small factors:

Format ($p$,factor) (24036583,149),(25964951,7),( 30402457,11),( 32582657,7),( 37156667,7),( 42643801,3593),( 43112609,7)

• The only remaining candidate seems to be divisible by p=1552147 (computed used fast exponentiation mod p). Nov 9, 2011 at 16:08
• @François Indeed, will update the answer.
– joro
Nov 9, 2011 at 16:17
• It's good to confirm Tapio Rajala's findings. Gerhard "Ask Me About System Design" Paseman, 2011.11.09 Nov 9, 2011 at 16:37

The numbers involved are pretty huge - have you tried all the Mersenne primes' perfect numbers yet?

The other answer might be referring to Wagstaff's conjecture about the number of these primes being less than $e^{\gamma}/\log(2) *\log(\log(x))$; see e.g. here, here, or here for some references (some better than others).

I would imagine that this would be helpful in solving this, but gives a sense of just how hard it would be to prove anything.

• Based on these heuristics. How many such numbers $n$ we may expect inside the known 47 perfect numbers ? Apr 25, 2011 at 2:24

I used an awk program to generate congruences on n such that, if the Mersenne exponent n satisfied such a congruence, then the corresponding candidate had a small prime factor, which usually was smaller than the candidate prime. Using moduli up to 4800, I found that the candidate corresponding to 216091 exponent was a multiple of 4673, most of the remaining candidates were divisible by smaller primes. At this writing, 61, 1279, 23209, and 20996011, are the exponents whose corresponding candidates may be prime, if I didn't foul up the coding. So my guess is: at most eight.

• Can I change my guess to at most 5? Gerhard "Ask Me About System Design" Paseman, 2011.04.25 Apr 25, 2011 at 8:49
• Well, the coding might have been good, but the filtering wasn't: some composite moduli slipped in. The latest version (morally just trial factorization) gives pairs $(m,f)$ with $f$ a factor of candidate using exponent $m$: (20996011,1552147), (110503,491), (216091,4673), (23209,35603), (42643801,3593),(4423,2163571) (2203,60449). Most of the rest of the candidates have small factors or are already seen to be prime. Still to crack are 61, 1279, and 132049. Gerhard "Ask Me About System Design" Paseman, 2011.05.03 May 3, 2011 at 18:42

There is a way to get the answer if instead of using the usual formula for perfect numbers $2^{k-1}(2^k-1)$, we use the following one: $(3n+10)*(3n+11)/2$ with n odd and not necessarily a prime. Then we are basically looking for solutions of $$(9n^2 + 63n + 110)/2 + 1 = 3k + 8$$ or $$(9n^2 + 63n + 110)/2 +1 = 3k+10$$ with $(3k+8)$ and $(3k+10)$ primes. Note that $(2^k-1)$ can only be a prime of the form $(3k+10)$.

The first equation becomes $$3n^2 + 21n + 32 - 2k = 0$$ The discriminant $d=24k+57$ and we ask that it be a square $m^2$. To get a prime with $(3k+8)$, we need k to be odd. So we will only consider the odd values of k that make d a square. Basically $d=24k + 57=m^2$.

We can check that $k=7$ provides the a value of $n=-1$ that gets us the prime $p=29$. Another pair of values of $(k,n)=(43,2)$ produces a prime $p=137$ but 136 is not a perfect number, just like the pair $(k,n)=(1,-2)$ which produces the prime $p=11$. We cannot use brute force or guessing ( trial and error ) for large perfect numbers. So we need to find a general solution of the diophantine equation $d=24k+57=m^2$.

When fed to the online Dario Alpertron diophantine solver, we get 4 solutions, two of which must be discarded right away because they provide only even values for k. The two other solutions are given by $$m=24t+9$$ and $$k=24t^2 + 18t +1$$ The other solution is given by $$m=24t + 15$$ and $$k=24t^2 + 30t +7$$ Now, we can start a search for solutions that give both a prime $p=(3k+8)$ and a corresponding value of n that produces a perfect number. This task is better done by writing a program and sadly I can't code.

Keep in mind that the k values that make the discriminant a square do not necessarily make $(3k+8)$ a prime and those that make $(3k+8)$ a prime do not necessarily correspond to a perfect number.

Note: I cannot comment to answer any question since I have no reputation but my email address is on my profile if needed.

• How does your answer relate to perfect numbers in any way -- ??? -- Jan 21, 2017 at 6:52
• It does simply because (3n+10)*(3n+11)/2 gives you all the perfect numbers ( except 6). you can convince yourself if you use the following values of n, n=(-1,7,39,2727...). Jan 21, 2017 at 12:26
• All or all known? Jan 21, 2017 at 13:55
• I have not made any calculation ( I can't code ), but I am pretty convinced that the new formula will give all the known perfect numbers and the unknown. There is no logical reason for it to stop at the last known perfect number. If you set (2^k-1)=(3n+10), everything becomes self-evident, though I did not get it by equating the two. There is also the fact that all primes (2^k-1) must be of the form (3n+10) though I can't prove it. So when searching for new perfect numbers, we don't need to bother with primes of the form (3n+8) and that is cutting the work by half. Jan 21, 2017 at 14:00