The 44thMersenne Prime

Eric W. Weisstein
http://mathworld.wolfram.com/news/2006-09-11/mersenne-44/mersenne44.nb

On September 4, 2006, a member of the GIMPS project discovered the 44th known Mersenne prime.  Evaluate the cell below to caculate its value.

mersenne44=2^32582657 - 1;

Evaluate the cell below to calculate the decimal digits of the prime.

digits=IntegerDigits[mersenne44];//Timing

Evaluate the cell below to compute the number of decimal digits in the prime.

Length[digits]

Evaluate the cell below to see the first and last few digits

ToString[FromDigits[Take[digits,20]]]<>"⋯"<>ToString[FromDigits[Take[digits,-20]]]

Evaluate the following to compute the number of times each decimal digit appears.

counts=Length/@Split[Sort[digits]]

Evaluate the following to generate a nicely formatted table showing the distribution of digits.

DisplayForm[GridBox[
MapIndexed[{#2[[1]]-1,#1}&,counts],GridFrame->True,RowLines->True,ColumnLines->True]]

As can be seen, 3 is the rarest digit, and 8 is the most common.  Evaluate the cell below to show a ranked list of digits by frequency, with the rarest digit appearing first.

Ordering[counts]-1

There are 9,808,358 digits.  Evaluate the cell below to verify that the above counts sum to the total number of digits.

Plus@@counts

Evaluate the cell below to see the full prime

mersenne44

The original algorithm for finding large Mersenne primes was developed in Mathematica by Richard Crandall.  At www.perfsci.com, the product "PrimeKit" is available, which is a precise, one-to-one collection of notebooks for the algorithms in the Crandall and Pomerance's book	Prime Numbers: A Computational Perspective. The IBDWT algorithm is discussed there, and other informationabout the book can be obtained from http://library.wolfram.com/infocenter/Books/953/.