login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A332385
Sum of squares of indices of distinct prime factors of n.
1
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,3
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.
EXAMPLE
a(21) = a(3 * 7) = a(prime(2) * prime(4)) = 2^2 + 4^2 = 20.
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}]
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 10 2020
STATUS
approved