login
A239681
Primality of Mersenne number 2^prime(n)-1
0
1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
1
COMMENTS
Characteristic function of A016027 = indices of prime Mersenne numbers (A001348). See these sequences for further references.
MATHEMATICA
Table[If[PrimeQ[2^n-1], 1, 0], {n, Prime[Range[120]]}] (* or *) Module[ {mpe = MersennePrimeExponent[Range[15]]}, Table[If[MemberQ[mpe, p], 1, 0], {p, Prime[ Range[120]]}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 10 2021 *)
PROG
(PARI) for(n=1, 199, print1(ispseudoprime(2^prime(n)-1)", "))
CROSSREFS
Sequence in context: A115526 A363343 A336923 * A054524 A110471 A360116
KEYWORD
nonn,changed
AUTHOR
M. F. Hasler, Mar 23 2014
STATUS
approved