OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = n - Abs[A097454(n)].
EXAMPLE
a(11)=10 because the nonprimes not exceeding 11 are 1,4,6,8,9 and 10, the primes not exceeding 11 are 2,3,5,7 and 11 and 11-abs(6-5)=10.
MAPLE
with(numtheory): seq(n-abs(n-2*pi(n)), n=1..73);
MATHEMATICA
Table[n-Abs[2*PrimePi[n]-n], {n, 80}] (* Harvey P. Dale, Oct 08 2015 *)
PROG
(PARI) for(n=1, 50, print1(n - abs(2*primepi(n) - n) , ", ")) \\ G. C. Greubel, Sep 20 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Mar 18 2006
EXTENSIONS
Edited by N. J. A. Sloane, Apr 05 2006
STATUS
approved