OFFSET
1,6
COMMENTS
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.
EXAMPLE
The prime indices of 12 are {1,1,2}, so a(12) = 0*1 + 1*1 + 2*2 = 5.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
wts[y_]:=Sum[(i-1)*y[[i]], {i, Length[y]}];
Table[wts[primeMS[n]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 13 2023
STATUS
approved