login
A359674
Zero-based weighted sum of the prime indices of n in weakly increasing order.
17
0, 0, 0, 1, 0, 2, 0, 3, 2, 3, 0, 5, 0, 4, 3, 6, 0, 6, 0, 7, 4, 5, 0, 9, 3, 6, 6, 9, 0, 8, 0, 10, 5, 7, 4, 11, 0, 8, 6, 12, 0, 10, 0, 11, 8, 9, 0, 14, 4, 9, 7, 13, 0, 12, 5, 15, 8, 10, 0, 14, 0, 11, 10, 15, 6, 12, 0, 15, 9, 11, 0, 17, 0, 12, 9, 17, 5, 14, 0, 18
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
Positions of last appearances (except 0) are A001248.
Positions of 0's are A008578.
The version for standard compositions is A124757, reverse A231204.
The one-based version is A304818, reverse A318283.
Positions of first appearances are A359675, reverse A359680.
First position of n is A359676(n), reverse A359681.
The reverse version is A359677, firsts A359679.
Number of appearances of positive n is A359678(n).
A053632 counts compositions by zero-based weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.
Sequence in context: A317843 A326689 A334861 * A323248 A324397 A132623
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 13 2023
STATUS
approved