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”).

A335716
a(n) = pi(pi(n)) - pi(Sum_{k=1..n-1} a(k)) with a(1) = 0.
1
0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
1
COMMENTS
Conjecture: a(n) hits every nonnegative integer.
LINKS
Altug Alkan, Andrew R. Booker, and Florian Luca, On a recursively defined sequence involving the prime counting function, arXiv:2006.08013 [math.NT], 2020.
EXAMPLE
a(10861) = pi(pi(10861)) - pi(Sum_{k=1..10860} a(k)) = 216 - 214 = 2.
MATHEMATICA
a[1] = s[1] = 0; a[n_] := a[n] = PrimePi@ PrimePi@ n - PrimePi@ s[n-1]; s[n_] := s[n] = s[n-1] + a[n]; Array[a, 100] (* Giovanni Resta, Jun 19 2020 *)
PROG
(PARI) a=vector(10^2); a[1] = 0; for(n=2, #a, a[n] = primepi(primepi(n)) - primepi(sum(k=1, n-1, a[k]))); a
CROSSREFS
Sequence in context: A354874 A014306 A374220 * A138150 A271591 A287790
KEYWORD
nonn,changed
AUTHOR
Altug Alkan, Jun 18 2020
STATUS
approved