login
A318994
Totally additive with a(prime(n)) = n + 1.
6
0, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 8, 8, 8, 10, 9, 8, 9, 9, 9, 11, 9, 12, 10, 9, 10, 9, 10, 13, 11, 10, 10, 14, 10, 15, 10, 10, 12, 16, 11, 10, 10, 11, 11, 17, 11, 10, 11, 12, 13, 18, 11, 19, 14, 11, 12, 11, 11, 20, 12, 13, 11, 21, 12, 22
OFFSET
1,2
LINKS
MAPLE
a:= n-> add((1+numtheory[pi](i[1]))*i[2], i=ifactors(n)[2]):
seq(a(n), n=1..100); # Alois P. Heinz, Sep 07 2018
MATHEMATICA
Table[Cases[If[n==1, {}, FactorInteger[n]], {p_, k_}:>(PrimePi[p]+1)*k]//Total, {n, 100}]
PROG
(PARI) a(n)={my(f=factor(n)); sum(i=1, #f~, my([p, e]=f[i, ]); (primepi(p)+1)*e)} \\ Andrew Howroyd, Sep 07 2018
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 07 2018
STATUS
approved