login
A332220
a(n) is the number of Mersenne exponents (terms of A000043) <= n.
4
0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11
OFFSET
1,3
LINKS
FORMULA
a(1) = 0; and for n > 1, a(n) = A332219(n) + a(n-1).
For all n >= 1, a(A000043(n)) = n.
MATHEMATICA
Accumulate@ Array[Boole@ PrimeQ[2^# - 1] &, 107] (* Michael De Vlieger, Feb 09 2020 *)
With[{mpe=MersennePrimeExponent[Range[47]]}, Accumulate[Table[If[ MemberQ[ mpe, n], 1, 0], {n, 120}]]] (* Harvey P. Dale, Aug 22 2021 *)
PROG
(PARI)
A332219(n) = (isprime(n)&&isprime((2^n)-1));
A332220(n) = if(1==n, 0, A332219(n)+A332220(n-1));
CROSSREFS
A left inverse of A000043, partial sums of A332219.
Sequence in context: A286105 A061071 A122258 * A263089 A340611 A068509
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 09 2020
STATUS
approved