[go: up one dir, main page]

login
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
AUTHOR
Altug Alkan, Jun 18 2020
STATUS
approved