login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = f(f(n+1)) - f(f(n)), where f(m) = pi(m) = A000720(m), with f(0) = 0.
2

%I #13 Dec 07 2017 09:48:35

%S 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,

%T 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,

%U 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

%N a(n) = f(f(n+1)) - f(f(n)), where f(m) = pi(m) = A000720(m), with f(0) = 0.

%C Right-shifted sequence is characteristic function of prime-indexed primes (A006450). - _Franklin T. Adams-Watters_, Nov 17 2006

%H Antti Karttunen, <a href="/A111406/b111406.txt">Table of n, a(n) for n = 0..65557</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%o (PARI) A111406(n) = (primepi(primepi(n+1)) - primepi(primepi(n))); \\ _Antti Karttunen_, Dec 07 2017

%Y Cf. A000720, A006450.

%K nonn

%O 0,1

%A _N. J. A. Sloane_, Nov 12 2005

%E Missing right parenthesis added to the formula and case f(0) clarified by _Antti Karttunen_, Dec 07 2017