login
Sum of indices of n's distinct prime factors below n.
0

%I #4 Apr 13 2021 19:23:40

%S 0,0,0,1,0,3,0,1,2,4,0,3,0,5,5,1,0,3,0,4,6,6,0,3,3,7,2,5,0,6,0,1,7,8,

%T 7,3,0,9,8,4,0,7,0,6,5,10,0,3,4,4,9,7,0,3,8,5,10,11,0,6,0,12,6,1,9,8,

%U 0,8,11,8,0,3,0,13,5,9,9,9,0,4,2,14,0,7,10,15,12,6,0,6

%N Sum of indices of n's distinct prime factors below n.

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F G.f.: Sum_{k>=1} k * x^(2*prime(k)) / (1 - x^prime(k)).

%F a(n) = 0 if n is prime, A066328(n) otherwise.

%e a(7) = a(prime(4)) = 0.

%e a(21) = a(3 * 7) = a(prime(2) * prime(4)) = 2 + 4 = 6.

%t nmax = 90; CoefficientList[Series[Sum[k x^(2 Prime[k])/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest

%t a[n_] := If[PrimeQ[n], 0, Plus @@ (PrimePi[#[[1]]] & /@ FactorInteger[n])]; Table[a[n], {n, 90}]

%Y Cf. A066328, A087624, A105221.

%K nonn

%O 1,6

%A _Ilya Gutkovskiy_, Apr 13 2021