login
a(n) = prime(n) - A141468(n).
7

%I #29 Mar 22 2022 16:27:44

%S 2,2,1,1,3,4,7,7,9,14,15,19,21,22,25,29,34,35,40,43,43,47,50,55,62,65,

%T 65,68,69,71,83,86,91,91,100,101,106,111,113,118,123,124,133,133,135,

%U 136,147,158,161,161,164,169,169,177,182,187,192,193,197,200,201,209

%N a(n) = prime(n) - A141468(n).

%H Michael De Vlieger, <a href="/A161671/b161671.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael De Vlieger, <a href="/A161671/a161671.png">Scatterplot of a(n)</a>, n = 1..120, showing and labeling primes p (in A214627) in red and blue, the red primes are duplicated and are listed in A220220. We plot in green duplicated composite terms.

%F a(n) = A000040(n) - A141468(n).

%F a(n+2) = A168563(n).

%F a(n) = A000040(n) - A018252(n-1), if n >= 2. - _Omar E. Pol_, Oct 21 2011

%F a(n) ~ n log n. - _Charles R Greathouse IV_, Dec 21 2011

%e 2(=2-0), 2(=3-1), 1(=5-4), 1(=7-6), 3(=11-8), 4(=13-9), 7(=17-10), 7(=19-12), 9(=23-14), 14(=29-15), etc.

%p A161671 := proc(n)

%p ithprime(n)-A141468(n) ;

%p end proc: # _R. J. Mathar_, Aug 08 2012

%t f[n_] := FixedPoint[n + PrimePi@ # &, n + PrimePi@ n]; Array[Prime[#] - f[# - 1] &, 62] (* _Michael De Vlieger_, Mar 22 2022, after _Robert G. Wilson v_ at A141468 *)

%Y Cf. A000040, A002808, A141468, A141559, A168563, A214627, A220220.

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Jun 16 2009, Dec 03 2009.

%E Edited by _N. J. A. Sloane_, Jun 30 2009

%E 207 replaced with 209 by _R. J. Mathar_, Oct 04 2009

%E Edited by _Omar E. Pol_, Oct 21 2011