login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A209385 Values of the first prefixing digits for Mersenne primes. 1
1, 1, 1, 4, 1, 10, 1, 36, 15, 58, 57, 55, 310, 177, 51, 2389, 973, 532, 1750, 63, 1032, 1240, 3757, 9994, 5854, 12870, 46147, 11923, 17113, 10296, 5977 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Table of n, a(n) for n=1..31.

Henri Lifchitz and Renaud Lifchitz, PRP Top Records

EXAMPLE

For Mersenne 5, i.e., 8191, the first computed prefix is equal to 1 and gives 18191 which is also a prime, so a(5) = 1.

MATHEMATICA

pfx[n_] := Module[{w = 10^(1+Floor[Log10[n]])}, k=n+w ; While[!PrimeQ[k], k+=w]; Floor[k/w]]; s={}; Do[m = 2^MersennePrimeExponent[n]-1; AppendTo[s, pfx[m]], {n, 1, 12}]; s (* Amiram Eldar, Nov 22 2018 based on Andrew Howroyd's pari code *)

PROG

(PARI)

pfx(n)={my(w=10^(1+logint(n, 10)), k=n+w); while(!ispseudoprime(k), k+=w); k\w}

{ for(n=1, 500, my(p=1<<prime(n)-1); if(ispseudoprime(p), print1(pfx(p), ", "))) } \\ Andrew Howroyd, Nov 17 2018

CROSSREFS

Cf. A000668 (Mersenne primes), A202136.

Sequence in context: A059926 A306546 A138775 * A121529 A304429 A347115

Adjacent sequences:  A209382 A209383 A209384 * A209386 A209387 A209388

KEYWORD

nonn,base,more

AUTHOR

Gilbert Mozzo, Mar 07 2012, Mar 18 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 13:24 EDT 2022. Contains 353975 sequences. (Running on oeis4.)