A073425 a(0)=0; for n>0, a(n) = number of primes not exceeding n-th composite number.
0, 2, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 8, 9, 9, 9, 9, 9, 10, 11, 11, 11, 11, 11, 12, 12, 12, 13, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 18, 18, 18, 18, 19, 19, 19, 20, 21, 21, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 26
Offset: 0
Keywords
Examples
n=100: composite[100]=133,Pi[133]=32=a(100)
Programs
-
Mathematica
c[x_] := FixedPoint[x+PrimePi[ # ]+1&, x] Table[PrimePi[c[w]], {w, 1, 128}] With[{nn=150},PrimePi/@Complement[Range[nn],Prime[Range[PrimePi[nn]]]]] (* Harvey P. Dale, Jun 26 2013 *)
-
Python
from sympy import composite def A073425(n): return composite(n)-n-1 if n else 0 # Chai Wah Wu, Oct 11 2024
Formula
a(n) ~ n. - Charles R Greathouse IV, Sep 02 2015
a(n) = A002808(n)-n-1 for n > 0. - Chai Wah Wu, Oct 11 2024
Extensions
Edited by N. J. A. Sloane, Jul 04 2009 at the suggestion of R. J. Mathar
Comments