login
A161671
a(n) = prime(n) - A141468(n).
7
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, 65, 68, 69, 71, 83, 86, 91, 91, 100, 101, 106, 111, 113, 118, 123, 124, 133, 133, 135, 136, 147, 158, 161, 161, 164, 169, 169, 177, 182, 187, 192, 193, 197, 200, 201, 209
OFFSET
1,1
LINKS
Michael De Vlieger, Scatterplot of a(n), 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.
FORMULA
a(n) = A000040(n) - A141468(n).
a(n+2) = A168563(n).
a(n) = A000040(n) - A018252(n-1), if n >= 2. - Omar E. Pol, Oct 21 2011
a(n) ~ n log n. - Charles R Greathouse IV, Dec 21 2011
EXAMPLE
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.
MAPLE
A161671 := proc(n)
ithprime(n)-A141468(n) ;
end proc: # R. J. Mathar, Aug 08 2012
MATHEMATICA
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 *)
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jun 16 2009, Dec 03 2009.
EXTENSIONS
Edited by N. J. A. Sloane, Jun 30 2009
207 replaced with 209 by R. J. Mathar, Oct 04 2009
Edited by Omar E. Pol, Oct 21 2011
STATUS
approved