A359674 Zero-based weighted sum of the prime indices of n in weakly increasing order.
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
Keywords
Examples
The prime indices of 12 are {1,1,2}, so a(12) = 0*1 + 1*1 + 2*2 = 5.
Crossrefs
Programs
-
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}]
Comments