OFFSET
1
COMMENTS
Conjecture: a(n) hits every nonnegative integer.
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Altug Alkan, Jun 18 2020
STATUS
approved