cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A359674 #9 Jan 14 2023 22:00:30
%S A359674 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 A359674 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 A359674 10,15,6,12,0,15,9,11,0,17,0,12,9,17,5,14,0,18
%N A359674 Zero-based weighted sum of the prime indices of n in weakly increasing order.
%C A359674 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 A359674 The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.
%e A359674 The prime indices of 12 are {1,1,2}, so a(12) = 0*1 + 1*1 + 2*2 = 5.
%t A359674 primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
%t A359674 wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
%t A359674 Table[wts[primeMS[n]],{n,100}]
%Y A359674 Positions of last appearances (except 0) are A001248.
%Y A359674 Positions of 0's are A008578.
%Y A359674 The version for standard compositions is A124757, reverse A231204.
%Y A359674 The one-based version is A304818, reverse A318283.
%Y A359674 Positions of first appearances are A359675, reverse A359680.
%Y A359674 First position of n is A359676(n), reverse A359681.
%Y A359674 The reverse version is A359677, firsts A359679.
%Y A359674 Number of appearances of positive n is A359678(n).
%Y A359674 A053632 counts compositions by zero-based weighted sum.
%Y A359674 A112798 lists prime indices, length A001222, sum A056239.
%Y A359674 A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.
%Y A359674 Cf. A029931, A055932, A243055, A359043, A358194, A359360, A359497, A359681, A359682, A359755.
%K A359674 nonn
%O A359674 1,6
%A A359674 _Gus Wiseman_, Jan 13 2023