Mersenne primes (of form 2^p − 1 where p is a prime)

In mathematics, a Mersenne prime is a prime number that is one less than a power of two. That is, it is a prime number of the formM_{n} = 2^{n} − 1 for some integern. They are named after Marin Mersenne, a French Minim friar, who studied them in the early 17th century. If n is a composite number then so is 2^{n} − 1. Therefore, an equivalent definition of the Mersenne primes is that they are the prime numbers of the form M_{p} = 2^{p} − 1 for some prime p.

The exponentsn which give Mersenne primes are 2, 3, 5, 7, 13, 17, 19, 31, ... (sequence A000043 in the OEIS) and the resulting Mersenne primes are 3, 7, 31, 127, 8191, 131071, 524287, 2147483647, ... (sequence A000668 in the OEIS).

Numbers of the form M_{n} = 2^{n} − 1 without the primality requirement may be called Mersenne numbers. Sometimes, however, Mersenne numbers are defined to have the additional requirement that n be prime.
The smallest composite Mersenne number with prime exponent n is 2^{11} − 1 = 2047 = 23 × 89.

Mersenne primes were studied in antiquity because of their close connection to perfect numbers: the Euclid–Euler theorem asserts a one-to-one correspondence between even perfect numbers and Mersenne primes. Many of the largest known primes are Mersenne primes because Mersenne numbers are easier to check for primality.

As of 2023^{[ref]}, 51 Mersenne primes are known. The largest known prime number, 2^{82,589,933} − 1, is a Mersenne prime.^{[1]} Since 1997, all newly found Mersenne primes have been discovered by the Great Internet Mersenne Prime Search, a distributed computing project. In December 2020, a major milestone in the project was passed after all exponents below 100 million were checked at least once.^{[2]}

Many fundamental questions about Mersenne primes remain unresolved. It is not even known whether the set of Mersenne primes is finite or infinite.

The Lenstra–Pomerance–Wagstaff conjecture claims that there are infinitely many Mersenne primes and predicts their order of growth and frequency: For every number n, there should on average be about $e^{\gamma }\cdot \log _{2}(10)$ ≈ 5.92 primes p with n decimal digits (i.e. 10^{n-1} < p < 10^{n}) for which $M_{p}$ is prime.

It is also not known whether infinitely many Mersenne numbers with prime exponents are composite, although this would follow from widely believed conjectures about prime numbers, for example, the infinitude of Sophie Germain primescongruent to 3 (mod 4). For these primes p, 2p + 1 (which is also prime) will divide M_{p}, for example, 23 | M_{11}, 47 | M_{23}, 167 | M_{83}, 263 | M_{131}, 359 | M_{179}, 383 | M_{191}, 479 | M_{239}, and 503 | M_{251} (sequence A002515 in the OEIS). Since for these primes p, 2p + 1 is congruent to 7 mod 8, so 2 is a quadratic residue mod 2p + 1, and the multiplicative order of 2 mod 2p + 1 must divide ${\textstyle {\frac {(2p+1)-1}{2}}=p}$. Since p is a prime, it must be p or 1. However, it cannot be 1 since $\Phi _{1}(2)=1$ and 1 has no prime factors, so it must be p. Hence, 2p + 1 divides $\Phi _{p}(2)=2^{p}-1$ and $2^{p}-1=M_{p}$ cannot be prime.
The first four Mersenne primes are M_{2} = 3, M_{3} = 7, M_{5} = 31 and M_{7} = 127 and because the first Mersenne prime starts at M_{2}, all Mersenne primes are congruent to 3 (mod 4). Other than M_{0} = 0 and M_{1} = 1, all other Mersenne numbers are also congruent to 3 (mod 4). Consequently, in the prime factorization of a Mersenne number ( ≥ M_{2} ) there must be at least one prime factor congruent to 3 (mod 4).

A basic theorem about Mersenne numbers states that if M_{p} is prime, then the exponent p must also be prime. This follows from the identity
${\begin{aligned}2^{ab}-1&=(2^{a}-1)\cdot \left(1+2^{a}+2^{2a}+2^{3a}+\cdots +2^{(b-1)a}\right)\\&=(2^{b}-1)\cdot \left(1+2^{b}+2^{2b}+2^{3b}+\cdots +2^{(a-1)b}\right).\end{aligned}}$
This rules out primality for Mersenne numbers with a composite exponent, such as M_{4} = 2^{4} − 1 = 15 = 3 × 5 = (2^{2} − 1) × (1 + 2^{2}).

Though the above examples might suggest that M_{p} is prime for all primes p, this is not the case, and the smallest counterexample is the Mersenne number

M_{11} = 2^{11} − 1 = 2047 = 23 × 89.

The evidence at hand suggests that a randomly selected Mersenne number is much more likely to be prime than an arbitrary randomly selected odd integer of similar size.^{[3]} Nonetheless, prime values of M_{p} appear to grow increasingly sparse as p increases. For example, eight of the first 11 primes p give rise to a Mersenne prime M_{p} (the correct terms on Mersenne's original list), while M_{p} is prime for only 43 of the first two million prime numbers (up to 32,452,843).

The current lack of any simple test to determine whether a given Mersenne number is prime makes the search for Mersenne primes a difficult task, since Mersenne numbers grow very rapidly. The Lucas–Lehmer primality test (LLT) is an efficient primality test that greatly aids this task, making it much easier to test the primality of Mersenne numbers than that of most other numbers of the same size. The search for the largest known prime has somewhat of a cult following.^{[citation needed]} Consequently, a large amount of computer power has been expended searching for new Mersenne primes, much of which is now done using distributed computing.

Mersenne primes M_{p} are closely connected to perfect numbers. In the 4th century BC, Euclid proved that if 2^{p} − 1 is prime, then 2^{p − 1}(2^{p} − 1) is a perfect number. In the 18th century, Leonhard Euler proved that, conversely, all even perfect numbers have this form.^{[4]} This is known as the Euclid–Euler theorem. It is unknown whether there are any odd perfect numbers.

An alternative form of Perfect Numbers (not affecting the essence):
If $(M=2^{n}-1)$ is a prime number, then $P=M(M+1)/2$ is a Perfect Number.
(Perfect Numbers are Triangular Numbers whose base is a Mersenne Prime.)

History

2

3

5

7

11

13

17

19

23

29

31

37

41

43

47

53

59

61

67

71

73

79

83

89

97

101

103

107

109

113

127

131

137

139

149

151

157

163

167

173

179

181

191

193

197

199

211

223

227

229

233

239

241

251

257

263

269

271

277

281

283

293

307

311

The first 64 prime exponents with those corresponding to Mersenne primes shaded in cyan and in bold, and those thought to do so by Mersenne in red and bold

Mersenne primes take their name from the 17th-century French scholar Marin Mersenne, who compiled what was supposed to be a list of Mersenne primes with exponents up to 257. The exponents listed by Mersenne in 1644 were as follows:

2, 3, 5, 7, 13, 17, 19, 31, 67, 127, 257.

His list replicated the known primes of his time with exponents up to 19. His next entry, 31, was correct, but the list then became largely incorrect, as Mersenne mistakenly included M_{67} and M_{257} (which are composite) and omitted M_{61}, M_{89}, and M_{107} (which are prime). Mersenne gave little indication of how he came up with his list.^{[5]}

Édouard Lucas proved in 1876 that M_{127} is indeed prime, as Mersenne claimed. This was the largest known prime number for 75 years until 1951, when Ferrier found a larger prime, $(2^{148}+1)/17$, using a desk calculating machine.^{[6]}^{: page 22 }M_{61} was determined to be prime in 1883 by Ivan Mikheevich Pervushin, though Mersenne claimed it was composite, and for this reason it is sometimes called Pervushin's number. This was the second-largest known prime number, and it remained so until 1911. Lucas had shown another error in Mersenne's list in 1876 by demonstrating that M_{67} was composite without finding a factor. No factor was found until a famous talk by Frank Nelson Cole in 1903.^{[7]} Without speaking a word, he went to a blackboard and raised 2 to the 67th power, then subtracted one, resulting in the number 147,573,952,589,676,412,927. On the other side of the board, he multiplied 193,707,721 × 761,838,257,287 and got the same number, then returned to his seat (to applause) without speaking.^{[8]} He later said that the result had taken him "three years of Sundays" to find.^{[9]} A correct list of all Mersenne primes in this number range was completed and rigorously verified only about three centuries after Mersenne published his list.

Searching for Mersenne primes

Fast algorithms for finding Mersenne primes are available, and as of June 2023^{[update]}, the six largest known prime numbers are Mersenne primes.

The first four Mersenne primes M_{2} = 3, M_{3} = 7, M_{5} = 31 and M_{7} = 127 were known in antiquity. The fifth, M_{13} = 8191, was discovered anonymously before 1461; the next two (M_{17} and M_{19}) were found by Pietro Cataldi in 1588. After nearly two centuries, M_{31} was verified to be prime by Leonhard Euler in 1772. The next (in historical, not numerical order) was M_{127}, found by Édouard Lucas in 1876, then M_{61} by Ivan Mikheevich Pervushin in 1883. Two more (M_{89} and M_{107}) were found early in the 20th century, by R. E. Powers in 1911 and 1914, respectively.

The most efficient method presently known for testing the primality of Mersenne numbers is the Lucas–Lehmer primality test. Specifically, it can be shown that for prime p > 2, M_{p} = 2^{p} − 1 is prime if and only ifM_{p} divides S_{p − 2}, where S_{0} = 4 and S_{k} = (S_{k − 1})^{2} − 2 for k > 0.

During the era of manual calculation, all the exponents up to and including 257 were tested with the Lucas–Lehmer test and found to be composite. A notable contribution was made by retired Yale physics professor Horace Scudder Uhler, who did the calculations for exponents 157, 167, 193, 199, 227, and 229.^{[10]} Unfortunately for those investigators, the interval they were testing contains the largest known relative gap between Mersenne primes: the next Mersenne prime exponent, 521, would turn out to be more than four times as large as the previous record of 127.

The search for Mersenne primes was revolutionized by the introduction of the electronic digital computer. Alan Turing searched for them on the Manchester Mark 1 in 1949,^{[11]} but the first successful identification of a Mersenne prime, M_{521}, by this means was achieved at 10:00 pm on January 30, 1952, using the U.S. National Bureau of StandardsWestern Automatic Computer (SWAC) at the Institute for Numerical Analysis at the University of California, Los Angeles, under the direction of D. H. Lehmer, with a computer search program written and run by Prof. R. M. Robinson. It was the first Mersenne prime to be identified in thirty-eight years; the next one, M_{607}, was found by the computer a little less than two hours later. Three more — M_{1279}, M_{2203}, and M_{2281} — were found by the same program in the next several months. M_{4,423} was the first prime discovered with more than 1000 digits, M_{44,497} was the first with more than 10,000, and M_{6,972,593} was the first with more than a million. In general, the number of digits in the decimal representation of M_{n} equals ⌊n × log_{10}2⌋ + 1, where ⌊x⌋ denotes the floor function (or equivalently ⌊log_{10}M_{n}⌋ + 1).

In September 2008, mathematicians at UCLA participating in the Great Internet Mersenne Prime Search (GIMPS) won part of a $100,000 prize from the Electronic Frontier Foundation for their discovery of a very nearly 13-million-digit Mersenne prime. The prize, finally confirmed in October 2009, is for the first known prime with at least 10 million digits. The prime was found on a Dell OptiPlex 745 on August 23, 2008. This was the eighth Mersenne prime discovered at UCLA.^{[12]}

On April 12, 2009, a GIMPS server log reported that a 47th Mersenne prime had possibly been found. The find was first noticed on June 4, 2009, and verified a week later. The prime is 2^{42,643,801} − 1. Although it is chronologically the 47th Mersenne prime to be discovered, it is smaller than the largest known at the time, which was the 45th to be discovered.

On January 25, 2013, Curtis Cooper, a mathematician at the University of Central Missouri, discovered a 48th Mersenne prime, 2^{57,885,161} − 1 (a number with 17,425,170 digits), as a result of a search executed by a GIMPS server network.^{[13]}

On January 19, 2016, Cooper published his discovery of a 49th Mersenne prime, 2^{74,207,281} − 1 (a number with 22,338,618 digits), as a result of a search executed by a GIMPS server network.^{[14]}^{[15]}^{[16]} This was the fourth Mersenne prime discovered by Cooper and his team in the past ten years.

On September 2, 2016, the Great Internet Mersenne Prime Search finished verifying all tests below M_{37,156,667}, thus officially confirming its position as the 45th Mersenne prime.^{[17]}

On January 3, 2018, it was announced that Jonathan Pace, a 51-year-old electrical engineer living in Germantown, Tennessee, had found a 50th Mersenne prime, 2^{77,232,917} − 1 (a number with 23,249,425 digits), as a result of a search executed by a GIMPS server network.^{[18]} The discovery was made by a computer in the offices of a church in the same town.^{[19]}^{[20]}

On December 21, 2018, it was announced that The Great Internet Mersenne Prime Search (GIMPS) discovered the largest known prime number, 2^{82,589,933} − 1, having 24,862,048 digits. A computer volunteered by Patrick Laroche from Ocala, Florida made the find on December 7, 2018.^{[21]}

In late 2020, GIMPS began using a new technique to rule out potential Mersenne primes called the Probable prime (PRP) test, based on development from Robert Gerbicz in 2017, and a simple way to verify tests developed by Krzysztof Pietrzak in 2018. Due to the low error rate and ease of proof, this nearly halved the computing time to rule out potential primes over the Lucas-Lehmer test (as two users would no longer have to perform the same test to confirm the other's result), although exponents passing the PRP test still require one to confirm their primality.^{[22]}

Theorems about Mersenne numbers

Mersenne numbers are 0, 1, 3, 7, 15, 31, 63, ... (sequence A000225 in the OEIS).

If a and p are natural numbers such that a^{p} − 1 is prime, then a = 2 or p = 1.

Proof: a ≡ 1 (moda − 1). Then a^{p} ≡ 1 (mod a − 1), so a^{p} − 1 ≡ 0 (mod a − 1). Thus a − 1 | a^{p} − 1. However, a^{p} − 1 is prime, so a − 1 = a^{p} − 1 or a − 1 = ±1. In the former case, a = a^{p}, hence a = 0, 1 (which is a contradiction, as neither −1 nor 0 is prime) or p = 1. In the latter case, a = 2 or a = 0. If a = 0, however, 0^{p} − 1 = 0 − 1 = −1 which is not prime. Therefore, a = 2.

If 2^{p} − 1 is prime, then p is prime.

Proof: Suppose that p is composite, hence can be written p = ab with a and b > 1. Then 2^{p} − 1= 2^{ab} − 1= (2^{a})^{b} − 1= (2^{a} − 1)((2^{a})^{b−1} + (2^{a})^{b−2} + ... + 2^{a} + 1) so 2^{p} − 1 is composite. By contraposition, if 2^{p} − 1 is prime then p is prime.

If p is an odd prime, then every prime q that divides 2^{p} − 1 must be 1 plus a multiple of 2p. This holds even when 2^{p} − 1 is prime.

For example, 2^{5} − 1 = 31 is prime, and 31 = 1 + 3 × (2 × 5). A composite example is 2^{11} − 1 = 23 × 89, where 23 = 1 + (2 × 11) and 89 = 1 + 4 × (2 × 11).

Proof: By Fermat's little theorem, q is a factor of 2^{q−1} − 1. Since q is a factor of 2^{p} − 1, for all positive integers c, q is also a factor of 2^{pc} − 1. Since p is prime and q is not a factor of 2^{1} − 1, p is also the smallest positive integer x such that q is a factor of 2^{x} − 1. As a result, for all positive integers x, q is a factor of 2^{x} − 1 if and only if p is a factor of x. Therefore, since q is a factor of 2^{q−1} − 1, p is a factor of q − 1 so q ≡ 1 (mod p). Furthermore, since q is a factor of 2^{p} − 1, which is odd, q is odd. Therefore, q ≡ 1 (mod 2p).

This fact leads to a proof of Euclid's theorem, which asserts the infinitude of primes, distinct from the proof written by Euclid: for every odd prime p, all primes dividing 2^{p} − 1 are larger than p; thus there are always larger primes than any particular prime.

It follows from this fact that for every prime p > 2, there is at least one prime of the form 2kp+1 less than or equal to M_{p}, for some integer k.

If p is an odd prime, then every prime q that divides 2^{p} − 1 is congruent to ±1 (mod 8).

Proof: 2^{p+1} ≡ 2 (mod q), so 2^{.mw-parser-output .sfrac{white-space:nowrap}.mw-parser-output .sfrac.tion,.mw-parser-output .sfrac .tion{display:inline-block;vertical-align:-0.5em;font-size:85%;text-align:center}.mw-parser-output .sfrac .num{display:block;line-height:1em;margin:0.0em 0.1em;border-bottom:1px solid}.mw-parser-output .sfrac .den{display:block;line-height:1em;margin:0.1em 0.1em}.mw-parser-output .sr-only{border:0;clip:rect(0,0,0,0);clip-path:polygon(0px 0px,0px 0px,0px 0px);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}1/2(p+1)} is a square root of 2 mod q. By quadratic reciprocity, every prime modulus in which the number 2 has a square root is congruent to ±1 (mod 8).

Proof: We show if p = 2^{m} − 1 is a Mersenne prime, then the congruence 2^{p−1} ≡ 1 (mod p^{2}) does not hold. By Fermat's little theorem, m | p − 1. Therefore, one can write p − 1 = mλ. If the given congruence is satisfied, then p^{2} | 2^{mλ} − 1, therefore 0 ≡ 2^{mλ} − 1/2^{m} − 1= 1 + 2^{m} + 2^{2m} + ... + 2^{(λ − 1)m}≡ λ mod (2^{m} − 1). Hence p | λ, and therefore −1 = 0 (mod p) which is impossible.

If m and n are natural numbers then m and n are coprime if and only if 2^{m} − 1 and 2^{n} − 1 are coprime. Consequently, a prime number divides at most one prime-exponent Mersenne number.^{[23]} That is, the set of pernicious Mersenne numbers is pairwise coprime.

If p and 2p + 1 are both prime (meaning that p is a Sophie Germain prime), and p is congruent to 3 (mod 4), then 2p + 1 divides 2^{p} − 1.^{[24]}

Example: 11 and 23 are both prime, and 11 = 2 × 4 + 3, so 23 divides 2^{11} − 1.

Proof: Let q be 2p + 1. By Fermat's little theorem, 2^{2p} ≡ 1 (mod q), so either 2^{p} ≡ 1 (mod q) or 2^{p} ≡ −1 (mod q). Supposing latter true, then 2^{p+1} = (2^{1/2(p + 1)})^{2} ≡ −2 (mod q), so −2 would be a quadratic residue mod q. However, since p is congruent to 3 (mod 4), q is congruent to 7 (mod 8) and therefore 2 is a quadratic residue mod q. Also since q is congruent to 3 (mod 4), −1 is a quadratic nonresidue mod q, so −2 is the product of a residue and a nonresidue and hence it is a nonresidue, which is a contradiction. Hence, the former congruence must be true and 2p + 1 divides M_{p}.

All composite divisors of prime-exponent Mersenne numbers are strong pseudoprimes to the base 2.

With the exception of 1, a Mersenne number cannot be a perfect power. That is, and in accordance with Mihăilescu's theorem, the equation 2^{m} − 1 = n^{k} has no solutions where m, n, and k are integers with m > 1 and k > 1.

The Mersenne number sequence is a member of the family of Lucas sequences. It is U_{n}(3, 2). That is, Mersenne number m_{n} = 3m_{n-1} - 2m_{n-2} with m_{0} = 0 and m_{1} = 1.

Since they are prime numbers, Mersenne primes are divisible only by 1 and themselves. However, not all Mersenne numbers are Mersenne primes. Mersenne numbers are very good test cases for the special number field sieve algorithm, so often the largest number factorized with this algorithm has been a Mersenne number. As of June 2019^{[update]}, 2^{1,193} − 1 is the record-holder,^{[25]} having been factored with a variant of the special number field sieve that allows the factorization of several numbers at once. See integer factorization records for links to more information. The special number field sieve can factorize numbers with more than one large factor. If a number has only one very large factor then other algorithms can factorize larger numbers by first finding small factors and then running a primality test on the cofactor. As of September 2022^{[update]}, the largest completely factored number (with probable prime factors allowed) is 2^{12,720,787} − 1 = 1,119,429,257 × 175,573,124,547,437,977 × 8,480,999,878,421,106,991 × q, where q is a 3,829,294-digit probable prime. It was discovered by a GIMPS participant with nickname "Funky Waddle".^{[26]}^{[27]} As of September 2022^{[update]}, the Mersenne number M_{1277} is the smallest composite Mersenne number with no known factors; it has no prime factors below 2^{68},^{[28]} and is very unlikely to have any factors below 10^{65} (~2^{216}).^{[29]}

The table below shows factorizations for the first 20 composite Mersenne numbers (sequence A244453 in the OEIS).

The number of factors for the first 500 Mersenne numbers can be found at (sequence A046800 in the OEIS).

Mersenne numbers in nature and elsewhere

In the mathematical problem Tower of Hanoi, solving a puzzle with an n-disc tower requires M_{n} steps, assuming no mistakes are made.^{[30]} The number of rice grains on the whole chessboard in the wheat and chessboard problem is M_{64}.^{[31]}

In geometry, an integer right triangle that is primitive and has its even leg a power of 2 ( ≥ 4 ) generates a unique right triangle such that its inradius is always a Mersenne number. For example, if the even leg is 2^{n + 1} then because it is primitive it constrains the odd leg to be 4^{n} − 1, the hypotenuse to be 4^{n} + 1 and its inradius to be 2^{n} − 1.^{[33]}

Mersenne–Fermat primes

A Mersenne–Fermat number is defined as 2^{pr} − 1/2^{pr − 1} − 1 with p prime, r natural number, and can be written as MF(p, r). When r = 1, it is a Mersenne number. When p = 2, it is a Fermat number. The only known Mersenne–Fermat primes with r > 1 are

The simplest generalized Mersenne primes are prime numbers of the form f(2^{n}), where f(x) is a low-degree polynomial with small integer coefficients.^{[35]} An example is 2^{64} − 2^{32} + 1, in this case, n = 32, and f(x) = x^{2} − x + 1; another example is 2^{192} − 2^{64} − 1, in this case, n = 64, and f(x) = x^{3} − x − 1.

It is also natural to try to generalize primes of the form 2^{n} − 1 to primes of the form b^{n} − 1 (for b ≠ 2 and n > 1). However (see also theorems above), b^{n} − 1 is always divisible by b − 1, so unless the latter is a unit, the former is not a prime. This can be remedied by allowing b to be an algebraic integer instead of an integer:

Complex numbers

In the ring of integers (on real numbers), if b − 1 is a unit, then b is either 2 or 0. But 2^{n} − 1 are the usual Mersenne primes, and the formula 0^{n} − 1 does not lead to anything interesting (since it is always −1 for all n > 0). Thus, we can regard a ring of "integers" on complex numbers instead of real numbers, like Gaussian integers and Eisenstein integers.

Gaussian Mersenne primes

If we regard the ring of Gaussian integers, we get the case b = 1 + i and b = 1 − i, and can ask (WLOG) for which n the number (1 + i)^{n} − 1 is a Gaussian prime which will then be called a Gaussian Mersenne prime.^{[36]}

(1 + i)^{n} − 1 is a Gaussian prime for the following n:

Like the sequence of exponents for usual Mersenne primes, this sequence contains only (rational) prime numbers.

As for all Gaussian primes, the norms (that is, squares of absolute values) of these numbers are rational primes:

5, 13, 41, 113, 2113, 525313, 536903681, 140737471578113, ... (sequence A182300 in the OEIS).

Eisenstein Mersenne primes

One may encounter cases where such a Mersenne prime is also an Eisenstein prime, being of the form b = 1 + ω and b = 1 − ω. In these cases, such numbers are called Eisenstein Mersenne primes.

(1 + ω)^{n} − 1 is an Eisenstein prime for the following n:

The other way to deal with the fact that b^{n} − 1 is always divisible by b − 1, it is to simply take out this factor and ask which values of n make

${\frac {b^{n}-1}{b-1}}$

be prime. (The integer b can be either positive or negative.) If, for example, we take b = 10, we get n values of:

2, 19, 23, 317, 1031, 49081, 86453, 109297, 270343, ... (sequence A004023 in the OEIS), corresponding to primes 11, 1111111111111111111, 11111111111111111111111, ... (sequence A004022 in the OEIS).

These primes are called repunit primes. Another example is when we take b = −12, we get n values of:

2, 5, 11, 109, 193, 1483, 11353, 21419, 21911, 24071, 106859, 139739, ... (sequence A057178 in the OEIS), corresponding to primes −11, 19141, 57154490053, ....

It is a conjecture that for every integer b which is not a perfect power, there are infinitely many values of n such that b^{n} − 1/b − 1 is prime. (When b is a perfect power, it can be shown that there is at most one n value such that b^{n} − 1/b − 1 is prime)

Least n such that b^{n} − 1/b − 1 is prime are (starting with b = 2, 0 if no such n exists)

with a, b any coprime integers, a > 1 and −a < b < a. (Since a^{n} − b^{n} is always divisible by a − b, the division is necessary for there to be any chance of finding prime numbers.)^{[a]} We can ask which n makes this number prime. It can be shown that such n must be primes themselves or equal to 4, and n can be 4 if and only if a + b = 1 and a^{2} + b^{2} is prime.^{[b]} It is a conjecture that for any pair (a, b) such that a and b are not both perfect rth powers for any r and −4ab is not a perfect fourth power, there are infinitely many values of n such that a^{n} − b^{n}/a − b is prime.^{[c]} However, this has not been proved for any single value of (a, b).

For more information, see ^{[37]}^{[38]}^{[39]}^{[40]}^{[41]}^{[42]}^{[43]}^{[44]}^{[45]}^{[46]}

a

b

numbers n such that a^{n} − b^{n}/a − b is prime (some large terms are only probable primes, these n are checked up to 100000 for |b| ≤ 5 or |b| = a − 1, 20000 for 5 < |b| < a − 1)

^{*}Note: if b < 0 and n is even, then the numbers n are not included in the corresponding OEIS sequence.

When a = b + 1, it is (b + 1)^{n} − b^{n}, a difference of two consecutive perfect nth powers, and if a^{n} − b^{n} is prime, then a must be b + 1, because it is divisible by a − b.

Least n such that (b + 1)^{n} − b^{n} is prime are

^Since a^{4} − b^{4}/a − b = (a + b)(a^{2} + b^{2}). Thus, in this case the pair (a, b) must be (x + 1, −x) and x^{2} + (x + 1)^{2} must be prime. That is, x must be in OEIS: A027861.

^When a and b are both perfect rth powers for some r > 1 or when −4ab is a perfect fourth power, it can be shown that there are at most two values of n with this property: in these cases, a^{n} − b^{n}/a − b can be factored algebraically.^{[citation needed]}

^Solinas, Jerome A. (1 January 2011). "Generalized Mersenne Prime". In Tilborg, Henk C. A. van; Jajodia, Sushil (eds.). Encyclopedia of Cryptography and Security. Springer US. pp. 509–510. doi:10.1007/978-1-4419-5906-5_32. ISBN978-1-4419-5905-8.

^Zalnezhad, Ali; Zalnezhad, Hossein; Shabani, Ghasem; Zalnezhad, Mehdi (March 2015). "Relationships and Algorithm in order to Achieve the Largest Primes". arXiv:1503.07688 [math.NT].

GIMPS Milestones Report – status page gives various statistics on search progress, typically updated every week, including progress towards proving the ordering of the largest known Mersenne primes