Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Jan 15 2023 09:51:36
%S 1,2,3,4,7,6,8,10,15,12,16,18,20,26,24,28,50,36,40,46,48,52,56,62,68,
%T 74,88,76,107,86,92,94,131,106,136,118,124,122,152,134,173,142,164,
%U 146,193,158,199,166,188,178,229,194,239,202,236,206,263,214,271,218
%N Least positive integer whose weakly increasing prime indices have weighted sum (A304818) equal to n.
%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 weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.
%e The 5 numbers with weighted sum of prime indices 12, together with their prime indices:
%e 20: {1,1,3}
%e 27: {2,2,2}
%e 33: {2,5}
%e 37: {12}
%e 49: {4,4}
%e Hence a(12) = 20.
%t nn=20;
%t primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
%t ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
%t seq=Table[ots[primeMS[n]],{n,1,Prime[nn]^2}];
%t Table[Position[seq,k][[1,1]],{k,0,nn}]
%Y The version for standard compositions is A089633, zero-based A359756.
%Y First position of n in A304818, reverse A318283.
%Y The greatest instead of least is A359497, reverse A359683.
%Y The sorted zero-based version is A359675, reverse A359680.
%Y The zero-based version is A359676, reverse A359681.
%Y The reverse version is A359679.
%Y The sorted version is A359755, reverse A359754.
%Y A112798 lists prime indices, length A001222, sum A056239.
%Y A320387 counts multisets by weighted sum, zero-based A359678.
%Y A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.
%Y Cf. A001248, A029931, A055932, A243055, A359043, A358194, A359360.
%K nonn
%O 0,2
%A _Gus Wiseman_, Jan 15 2023