login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Zero-based weighted sum of the prime indices of n in weakly increasing order.
17

%I #9 Jan 14 2023 22:00:30

%S 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,

%T 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,

%U 10,15,6,12,0,15,9,11,0,17,0,12,9,17,5,14,0,18

%N Zero-based weighted sum of the prime indices of n in weakly increasing order.

%C 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.

%C The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

%e The prime indices of 12 are {1,1,2}, so a(12) = 0*1 + 1*1 + 2*2 = 5.

%t primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];

%t wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];

%t Table[wts[primeMS[n]],{n,100}]

%Y Positions of last appearances (except 0) are A001248.

%Y Positions of 0's are A008578.

%Y The version for standard compositions is A124757, reverse A231204.

%Y The one-based version is A304818, reverse A318283.

%Y Positions of first appearances are A359675, reverse A359680.

%Y First position of n is A359676(n), reverse A359681.

%Y The reverse version is A359677, firsts A359679.

%Y Number of appearances of positive n is A359678(n).

%Y A053632 counts compositions by zero-based weighted sum.

%Y A112798 lists prime indices, length A001222, sum A056239.

%Y A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

%Y Cf. A029931, A055932, A243055, A359043, A358194, A359360, A359497, A359681, A359682, A359755.

%K nonn

%O 1,6

%A _Gus Wiseman_, Jan 13 2023