OFFSET
1,6
LINKS
Felix Huber, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Composite Number
FORMULA
EXAMPLE
Of the first 9 positive integers are three (4, 6, 8) even and one (9) is odd, so a(9) = 3 - 1 = 2.
MATHEMATICA
a[1]:=0; a[n_]:=PrimePi[n]- Mod[n, 2] - 1; Array[a, 74] (* Stefano Spezia, Apr 25 2025 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Felix Huber, Apr 24 2025
STATUS
approved
