A332385 Sum of squares of indices of distinct prime factors of n.
0, 1, 4, 1, 9, 5, 16, 1, 4, 10, 25, 5, 36, 17, 13, 1, 49, 5, 64, 10, 20, 26, 81, 5, 9, 37, 4, 17, 100, 14, 121, 1, 29, 50, 25, 5, 144, 65, 40, 10, 169, 21, 196, 26, 13, 82, 225, 5, 16, 10, 53, 37, 256, 5, 34, 17, 68, 101, 289, 14, 324, 122, 20, 1, 45, 30, 361, 50, 85, 26, 400, 5, 441, 145, 13
Offset: 1
Keywords
Examples
a(21) = a(3 * 7) = a(prime(2) * prime(4)) = 2^2 + 4^2 = 20.
Links
Programs
-
Maple
a:= n-> add(numtheory[pi](i[1])^2, i=ifactors(n)[2]): seq(a(n), n=1..80); # Alois P. Heinz, Feb 10 2020
-
Mathematica
nmax = 75; CoefficientList[Series[Sum[k^2 x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest a[n_] := Plus @@ (PrimePi[#[[1]]]^2 & /@ FactorInteger[n]); Table[a[n], {n, 1, 75}]
Formula
G.f.: Sum_{k>=1} k^2 * x^prime(k) / (1 - x^prime(k)).
If n = Product (p_j^k_j) then a(n) = Sum (pi(p_j)^2), where pi = A000720.