Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Sep 07 2018 20:58:35
%S 0,0,1,0,2,1,3,0,2,2,4,1,5,3,3,0,6,2,7,2,4,4,8,1,4,5,3,3,9,3,10,0,5,6,
%T 5,2,11,7,6,2,12,4,13,4,4,8,14,1,6,4,7,5,15,3,6,3,8,9,16,3,17,10,5,0,
%U 7,5,18,6,9,5,19,2,20,11,5,7,7,6,21,2,4,12
%N Totally additive with a(prime(n)) = n - 1.
%H Andrew Howroyd, <a href="/A318995/b318995.txt">Table of n, a(n) for n = 1..10000</a>
%p a:= n-> add((-1+numtheory[pi](i[1]))*i[2], i=ifactors(n)[2]):
%p seq(a(n), n=1..100); # _Alois P. Heinz_, Sep 07 2018
%t Table[Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>(PrimePi[p]-1)*k]//Total,{n,200}]
%o (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
%Y Cf. A000040, A001222, A003963, A056239, A275024, A299757, A302242, A302243, A318994.
%K nonn
%O 1,5
%A _Gus Wiseman_, Sep 07 2018