Mersenne 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 form for some integer. They are named after Marin Mersenne, a French Minim friar, who studied them in the early 17th century. If is a composite number then so is. Therefore, an equivalent definition of the Mersenne primes is that they are the prime numbers of the form for some prime.
The exponents which give Mersenne primes are 2, 3, 5, 7, 13, 17, 19, 31, ... and the resulting Mersenne primes are 3, 7, 31, 127, 8191, 131071, 524287, 2147483647, ....
Numbers of the form without the primality requirement may be called Mersenne numbers. Sometimes, however, Mersenne numbers are defined to have the additional requirement that should be prime.
The smallest composite Mersenne number with prime exponent n is.
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.
, 52 Mersenne primes are known. The largest known prime number,, is a Mersenne prime. 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.

About Mersenne primes

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, there should on average be about primes with decimal digits for which is prime. Here, is the Euler–Mascheroni constant.
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, from the infinitude of Sophie Germain primes congruent to 3. For these primes, will divide, for example,,,,,,,, and . For these primes, is congruent to 7 mod 8, so 2 is a quadratic residue mod, and the multiplicative order of 2 mod must divide. Since is a prime, it must be or 1. However, it cannot be 1 since and 1 has no prime factors, so it must be. Hence, divides and cannot be prime.
The first four Mersenne primes are,, and and because the first Mersenne prime starts at, all Mersenne primes are congruent to 3. Other than and, all other Mersenne numbers are also congruent to 3. Consequently, in the prime factorization of a Mersenne number there must be at least one prime factor congruent to 3.
A basic theorem about Mersenne numbers states that if is prime, then the exponent must also be prime. This follows from the identity
This rules out primality for Mersenne numbers with a composite exponent, such as.
Though the above examples might suggest that is prime for all primes, this is not the case, and the smallest counterexample is the Mersenne number
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. Nonetheless, prime values of appear to grow increasingly sparse as increases. For example, eight of the first 11 primes give rise to a Mersenne prime , while is prime for only 43 of the first two million prime numbers.
Since Mersenne numbers grow very rapidly, the search for Mersenne primes is a difficult task, even though there is a simple efficient test to determine whether a given Mersenne number is prime: the Lucas–Lehmer primality test, which makes 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. Consequently, a large amount of computer power has been expended searching for new Mersenne primes, much of which is now done using distributed computing.
Arithmetic modulo a Mersenne number is particularly efficient on a binary computer, making them popular choices when a prime modulus is desired, such as the Park–Miller random number generator. To find a primitive polynomial of Mersenne number order requires knowing the factorization of that number, so Mersenne primes allow one to find primitive polynomials of very high order. Such primitive trinomials are used in pseudorandom number generators with very large periods such as the Mersenne twister, generalized shift register and Lagged Fibonacci generators.

Perfect numbers

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

History

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:
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 and and omitted,, and . Mersenne gave little indication of how he came up with his list.
Édouard Lucas proved in 1876 that is indeed prime, as Mersenne claimed. This was the largest known prime number for 75 years until 1951, when Aimé Ferrier found a larger prime,, using a desk calculating machine. 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 was composite without finding a factor. No factor was found until a famous talk by Frank Nelson Cole in 1903. Without speaking a word, he went to a blackboard and raised 2 to the 67th power, then subtracted one, resulting in the number. On the other side of the board, he multiplied and got the same number, then returned to his seat without speaking. He later said that the result had taken him "three years of Sundays" to find. 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 2024, the seven largest known prime numbers are Mersenne primes.
The first four Mersenne primes,, and were known in antiquity. The fifth,, was discovered anonymously before 1461; the next two were found by Pietro Cataldi in 1588. After nearly two centuries, was verified to be prime by Leonhard Euler in 1772. The next was, found by Édouard Lucas in 1876, then by Ivan Mikheevich Pervushin in 1883. Two more 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, is prime if and only if divides, where and for.
During the era of manual calculation, all previously untested 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. 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, but the first successful identification of a Mersenne prime,, by this means was achieved at 10:00 pm on January 30, 1952, using the U.S. National Bureau of Standards Western Automatic Computer 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,, was found by the computer a little less than two hours later. Three more —,, and — were found by the same program in the next several months. was the first prime discovered with more than 1000 digits, was the first with more than 10,000, and was the first with more than a million. In general, the number of digits in the decimal representation of equals, where denotes the floor function.
In September 2008, mathematicians at UCLA participating in the Great Internet Mersenne Prime Search 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.
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. 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, , as a result of a search executed by a GIMPS server network.
On January 19, 2016, Cooper published his discovery of a 49th Mersenne prime, , as a result of a search executed by a GIMPS server network. 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, thus officially confirming its position as the 45th Mersenne prime.
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, , as a result of a search executed by a GIMPS server network. The discovery was made by a computer in the offices of a church in the same town.
On December 21, 2018, it was announced that The Great Internet Mersenne Prime Search discovered a new prime number,, having 24,862,048 digits. A computer volunteered by Patrick Laroche from Ocala, Florida made the find on December 7, 2018.
In late 2020, GIMPS began using a new technique to rule out potential Mersenne primes called the Probable prime 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, although exponents passing the PRP test still require one to confirm their primality.
On October 12, 2024, a user named Luke Durant from San Jose, California, found the current largest known Mersenne prime,, having 41,024,320 digits. This marks the first Mersenne prime with an exponent surpassing 8 digits. This was announced on October 21, 2024.