OFFSET
1,5
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..10000
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, 200}]
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 07 2018
STATUS
approved