OFFSET
0,2
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 weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.
EXAMPLE
The 5 numbers with weighted sum of prime indices 12, together with their prime indices:
20: {1,1,3}
27: {2,2,2}
33: {2,5}
37: {12}
49: {4,4}
Hence a(12) = 20.
MATHEMATICA
nn=20;
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
ots[y_]:=Sum[i*y[[i]], {i, Length[y]}];
seq=Table[ots[primeMS[n]], {n, 1, Prime[nn]^2}];
Table[Position[seq, k][[1, 1]], {k, 0, nn}]
CROSSREFS
The reverse version is A359679.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 15 2023
STATUS
approved