Factorizing Mersenne Numbers

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

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

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 M82589933) 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] S. Wagstaff. "The Cunningham Project". (Jul 12, 2015) homes.cerias.purdue.edu/~ssw/cun/index.html.

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.