OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
The 1st composite is 4 = 2*2 = prime(1)*prime(1), so a(1) = 1 + 1 = 2;
the 2nd composite is 6 = 2*3 = prime(1)*prime(2), so a(2) = 1 + 2 = 3;
the 3rd composite is 8 = 2*2*2 = prime(1)*prime(1)*prime(1), so a(3) = 1 + 1 + 1 = 3;
the 4th composite is 9 = 3*3 = prime(2)*prime(2), so a(4) = 2 + 2 = 4.
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: seq(A163515(n), n=1..100) ; # R. J. Mathar, Aug 05 2009
MATHEMATICA
kp[c_]:=Total[Times@@@({PrimePi[#[[1]]], #[[2]]}&/@FactorInteger[c])]; kp/@Select[ Range[200], CompositeQ] (* Harvey P. Dale, Nov 03 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jul 30 2009
EXTENSIONS
Corrected by R. J. Mathar, Aug 05 2009
Example edited by Harvey P. Dale, Nov 27 2013
Further edits by Jon E. Schoenfield, Mar 07 2019
STATUS
approved