OFFSET
1,1
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
MAPLE
A002808 := proc(n) local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; end if; end do; end if; end proc:
A163515 := proc(n) local c; c := A002808(n) ; pfs := ifactors(c)[2] ; add( op(2, p)*numtheory[pi](op(1, p)), p=pfs) ; end:
A163831 := proc(n) A002808(n)-A163515(n) ; end: seq(A163831(n), n=1..100) ; # R. J. Mathar, Aug 05 2009
MATHEMATICA
cmsi[n_]:=n-Total[(PrimePi/@(Flatten[Table[#[[1]], #[[2]]]&/@ FactorInteger[ n]]))]; cmsi/@Select[Range[100], CompositeQ] (* Harvey P. Dale, Dec 15 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 05 2009
EXTENSIONS
Edited and corrected by R. J. Mathar, Aug 05 2009
STATUS
approved