OFFSET
1,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 zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.
EXAMPLE
The terms together with their prime indices begin:
1: {}
4: {1,1}
6: {1,2}
8: {1,1,1}
14: {1,4}
12: {1,1,2}
16: {1,1,1,1}
20: {1,1,3}
30: {1,2,3}
24: {1,1,1,2}
32: {1,1,1,1,1}
36: {1,1,2,2}
40: {1,1,1,3}
52: {1,1,6}
48: {1,1,1,1,2}
MATHEMATICA
nn=20;
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]}];
seq=Table[wts[primeMS[n]], {n, 1, Prime[nn]^2}];
Table[Position[seq, k][[1, 1]], {k, 0, nn}]
KEYWORD
nonn,look
AUTHOR
Gus Wiseman, Jan 14 2023
STATUS
approved