login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A028335
Number of decimal digits in n-th Mersenne prime.
(Formerly N0189)
20
1, 1, 2, 3, 4, 6, 6, 10, 19, 27, 33, 39, 157, 183, 386, 664, 687, 969, 1281, 1332, 2917, 2993, 3376, 6002, 6533, 6987, 13395, 25962, 33265, 39751, 65050, 227832, 258716, 378632, 420921, 895932, 909526, 2098960, 4053946, 6320430, 7235733, 7816230, 9152052, 9808358, 11185272
OFFSET
1,3
REFERENCES
Albert H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 19.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..48 (terms 1..47 from Ivan Panchenko)
Chris K. Caldwell, Mersenne Primes.
FORMULA
a(n) = floor(A000043(n)*log(2)/log(10)) + 1.
a(n) = A055642(A000668(n)). - Michel Marcus, Apr 07 2018
EXAMPLE
A000668(6) = 2^17-1 = 131071 has 6 decimal digits, so a(6) = 6.
A000668(10) = 2^89-1 = 618,970,019,642,690,137,449,562,111 has 27 digits, so a(10) = 27.
MAPLE
seq(length(numtheory:-mersenne([i])), i=1..45); # Robert Israel, Feb 02 2018
MATHEMATICA
IntegerLength[2^Array[MersennePrimeExponent, 45] - 1] (* Jean-François Alcover, Feb 17 2018 *)
a[n_] := Floor[MersennePrimeExponent[n]/Log2[10]] + 1; Array[a, 48] (* Amiram Eldar, Oct 16 2024 *)
CROSSREFS
See A000043, which is the main entry for this sequence.
Sequence in context: A317491 A332295 A332576 * A346117 A007464 A210733
KEYWORD
nonn,base
EXTENSIONS
More terms from Enoch Haga, Dec 18 2001
a(38) from Harry J. Smith, Apr 17 2003
a(39) from Omar E. Pol, Oct 28 2007
a(40)-a(41) from Jason Kimberley, Jan 05 2012
a(42)-a(45) from Patrick J. McNab, Feb 01 2018
STATUS
approved