cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A332220 a(n) is the number of Mersenne exponents (terms of A000043) <= n.

This page as a plain text file.
%I A332220 #10 Aug 22 2021 17:26:52
%S A332220 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,
%T A332220 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,
%U A332220 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
%N A332220 a(n) is the number of Mersenne exponents (terms of A000043) <= n.
%H A332220 Antti Karttunen, <a href="/A332220/b332220.txt">Table of n, a(n) for n = 1..44497</a>
%F A332220 a(1) = 0; and for n > 1, a(n) = A332219(n) + a(n-1).
%F A332220 For all n >= 1, a(A000043(n)) = n.
%t A332220 Accumulate@ Array[Boole@ PrimeQ[2^# - 1] &, 107] (* _Michael De Vlieger_, Feb 09 2020 *)
%t A332220 With[{mpe=MersennePrimeExponent[Range[47]]},Accumulate[Table[If[ MemberQ[ mpe,n],1,0],{n,120}]]] (* _Harvey P. Dale_, Aug 22 2021 *)
%o A332220 (PARI)
%o A332220 A332219(n) = (isprime(n)&&isprime((2^n)-1));
%o A332220 A332220(n) = if(1==n,0,A332219(n)+A332220(n-1));
%Y A332220 A left inverse of A000043, partial sums of A332219.
%K A332220 nonn
%O A332220 1,3
%A A332220 _Antti Karttunen_, Feb 09 2020