Skip to content

MersennePrimes ​

The Mersenne primes 3,7,31,127,8191,…3, 7, 31, 127, 8191, …: primes of the form 2p−12^p - 1.

MersennePrimesthe primes 2p−12^p-1 for a prime exponent pp, an indexed collection of open infinitude -- only finitely many are known at any time.

Domain: Collections

Details
  • A lazy indexed collection; whether there are infinitely many is the open Lenstra-Pomerance-Wagstaff conjecture, so Count(MersennePrimes)=NaNCount(MersennePrimes) = NaN. OEIS A000668.
  • At(MersennePrimes,k)At(MersennePrimes, k) unranks from a table of exponents verified by the Lucas-Lehmer test, not a search -- the known terms grow to tens of millions of digits, so past the point a value would exceed what a numeric collection element can represent exactly (253−12^{53}-1), AtAt answers NaNNaN rather than hang looking for more: At(MersennePrimes,4)=127At(MersennePrimes, 4) = 127 (p=7p=7), and At(MersennePrimes,9)At(MersennePrimes, 9) is NaNNaN (the 9th, 261−12^{61}-1, exists and is known, but doesn't fit).
  • Membership goes through Element: Element(127,MersennePrimes)Element(127, MersennePrimes) is true, Element(63,MersennePrimes)Element(63, MersennePrimes) is false (26−1=63=32×72^6-1=63=3^2 \times 7, and 6 isn't even prime).

Enumeration

Examples

1 more kept as data, checked against the oracles
About
Examples1
CrosswalkOEISmathlib4

See also: Count, At, Element, PrimeNumbers, FibonacciPrimes