Mersenne Number

Author

Eric W. Weisstein
July 28, 2022

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/MersenneNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/MersenneNumber.html.

©2022 Wolfram Research, Inc. except for portions noted otherwise

Definition

Mersenne[n]//TraditionalForm

Enumeration

Mersenne/@Range[20]

BaseForm[#,2]&/@%

Digits

Digits/@Mersenne/@Range[50]

Powers of 10

Table[Digits[Mersenne[10^n]],{n,0,10}]//Timing

Refine[Floor[10^n Log[10,2]]+1,n∈Integers&&n≥0]

Table[Floor[10^n Log[10,2]]+1,{n,0,20}]

Limit[(1+Log[10,Mersenne[n]])/n,n->∞]

N[Log[10,2],100]

Factorizations

MapIndexed[{#1,Mersenne[#1]}&,Take[MersennePrimeIndices,10]]

m=Select[DownValues[MersenneFactors],IntegerQ[#[[1,1,1]]]&];

Checks

Sort/@#==#&[MersenneFactors/@Range[100]]

And@@(Equal[Mersenne[#[[1,1,1]]],Times@@#[[2]]]&/@m)

And@@And@@@(PrimeQ/@#[[2]]&/@Rest[m])

Table of Factors

{#[[1,1,1]],#[[2]]}&/@Take[m,10]//ColumnForm

Flatten[Sort/@MersenneFactors/@Range[20]]

Table[Length[MersenneFactors[i]],{i,100}]

First/@MersenneFactors/@Range[20]

Last/@MersenneFactors/@Range[20]

Perfect Numbers

MersennePrimeIndices

p=PerfectNumber/@Range[Length[MersennePrimeIndices]];

Take[p,5]

StringTake[ToString[#],-2]&/@Rest[p]

Union[%]

Union[Table[StringTake[ToString[(Mersenne[n]+1)Mersenne[n]/2],-2],{n,3,1000}]]

Union[Table[StringTake[ToString[(Mersenne[Prime[n]]+1)Mersenne[Prime[n]]/2],-2],{n,2,2000}]]

Szigmondy's Theorem

MFactors[n_]:=MFactors[n]=First/@FactorInteger[Mersenne[n]]

SzigmondyQ[n_]:=Complement[MFactors[n],Union[Flatten[Table[MFactors[i],{i,n-1}]]]]

Table[SzigmondyQ[n],{n,30}]

Sloane's A064078

Times@@@%

Mersenne number semiprimes

A085724

Cases[Import["http://oeis.org/A046051/b046051.txt","Table"],{n_,2}:>n]

1427 and 1487 are also terms. 1277 is the only remaining unknown below them. - Charles R Greathouse IV, Jun 05 2013