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 Mn = 2n − 1 for some integer n. 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 2n − 1. Therefore, an equivalent definition of the Mersenne primes is that they are the prime numbers of the form Mp = 2p − 1 for some prime p. The exponents n that 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 Mn = 2n − 1 without the primality requirement may be called Mersenne numbers. Sometimes, however, Mersenne numbers are defined to have the additional requirement that n should be prime. The smallest composite Mersenne number with prime exponent n is 211 − 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 2025, 52 Mersenne primes are known. The largest known prime number, 2136279841 − 1, 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 A basic theorem about Mersenne numbers states that if Mp is prime, then the exponent p must also be prime. This follows from the identity
2 a b − 1 = ( 2 a − 1 ) ⋅ ( 1 + 2 a + 2 2 a + 2 3 a + ⋯ + 2 ( b − 1 ) a ) = ( 2 b − 1 ) ⋅ ( 1 + 2 b + 2 2 b + 2 3 b + ⋯ + 2 ( a − 1 ) b ) . {\displaystyle {\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 M4 = 24 − 1 = 15 = 3 × 5 = (22 − 1) × (1 + 22). Though the above examples might suggest that Mp is prime for all primes p, this is not the case, and the smallest counterexample is the Mersenne number
M11 = 211 − 1 = 2047 = 23 × 89.
… excerpt ends here. Continue reading the full article.

