OFFSET
1,5
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
nonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n+PrimePi@n];
Table[Prime[n] - nonPrime[n], {n, 1, 70}] (* G. C. Greubel, Jun 22 2019 *)
PROG
(Haskell)
a014237 n = a000040 n - a018252 n -- Reinhard Zumkeller, Apr 30 2014
(Python)
from sympy import prime, composite
def A014237(n):
return 1 if n == 1 else prime(n)-composite(n-1) # Chai Wah Wu, Dec 27 2018
CROSSREFS
KEYWORD
sign
AUTHOR
STATUS
approved