login
A111406
a(n) = f(f(n+1)) - f(f(n)), where f(m) = pi(m) = A000720(m), with f(0) = 0.
2
0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
0,1
COMMENTS
Right-shifted sequence is characteristic function of prime-indexed primes (A006450). - Franklin T. Adams-Watters, Nov 17 2006
PROG
(PARI) A111406(n) = (primepi(primepi(n+1)) - primepi(primepi(n))); \\ Antti Karttunen, Dec 07 2017
CROSSREFS
Sequence in context: A289174 A059125 A189820 * A353463 A260445 A156731
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 12 2005
EXTENSIONS
Missing right parenthesis added to the formula and case f(0) clarified by Antti Karttunen, Dec 07 2017
STATUS
approved