login
A163515
If n-th composite is the product of k1-th prime, k2-th prime, ..., kr-th prime then set a(n) = k1 + k2 + ... + kr.
3
2, 3, 3, 4, 4, 4, 5, 5, 4, 5, 5, 6, 6, 5, 6, 7, 6, 6, 6, 5, 7, 8, 7, 6, 9, 8, 6, 7, 7, 7, 10, 6, 8, 7, 9, 8, 7, 8, 7, 10, 11, 7, 12, 8, 6, 9, 8, 9, 11, 8, 7, 13, 8, 10, 9, 9, 7, 8, 14, 8, 10, 15, 12, 8, 8, 10, 11, 13, 16, 11, 7, 9, 9, 8, 10, 9, 9, 17, 8, 9, 14, 8, 11, 12, 12, 10, 18, 11, 8, 10, 19, 15
OFFSET
1,1
LINKS
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
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