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

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