OFFSET
2,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 2..10000
MATHEMATICA
Table[If[PrimeQ[n], PrimePi[n], n-1-PrimePi[n]], {n, 2, 70}] (* Harvey P. Dale, Jun 06 2017 *)
PROG
(Haskell)
a026238 n = a049084 n + a066246 n -- Reinhard Zumkeller, Jan 29 2014
(PARI) first(n)=my(c, p); vector(n-1, k, if(isprime(k+1), p++, c++)) \\ Charles R Greathouse IV, Sep 02 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved