Factorizing Mersenne Numbers

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

A number of the form is a Mersenne number, named after Marin Mersenne (1588–1648). If the resulting number is prime, then it is called a Mersenne prime, with (or M74207281) currently the largest known prime.


In 1925, Allan Cunningham published tables of factorizations for numbers of the form , including Mersenne numbers with exponents up to 600. The tables were later extended to exponents up to 1200 by Lehmer and Selfridge. On June 17, 2015, the last gap in the table was filled with the factorization of .

This Demonstration gives factorizations for all Mersenne numbers up to M1206. In binary, a Mersenne number is all ones, 1111...1111. After the factorization, the binary forms of the factors are concatenated to make a pattern.

Numbers of the form are also included, but a few cases like have not been completely factored. In these cases, the composite part is indicated in red.


Contributed by: Ed Pegg Jr (July 2015)
Open content licensed under CC BY-NC-SA




[1] "M991 Press Release". (Jul 23, 2015) www.mersenneforum.org/showthread.php?t=20308.

[2] S. Wagstaff. "The Cunningham Project". (Jul 12, 2015) homes.cerias.purdue.edu/~ssw/cun/index.html.

[3] "2 Minus Tables". (Jul 23, 2015) www.mersennewiki.org/index.php/2_Minus _Tables.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.