A359677 Zero-based weighted sum of the reversed (weakly decreasing) prime indices of n.
0, 0, 0, 1, 0, 1, 0, 3, 2, 1, 0, 3, 0, 1, 2, 6, 0, 4, 0, 3, 2, 1, 0, 6, 3, 1, 6, 3, 0, 4, 0, 10, 2, 1, 3, 7, 0, 1, 2, 6, 0, 4, 0, 3, 6, 1, 0, 10, 4, 5, 2, 3, 0, 9, 3, 6, 2, 1, 0, 7, 0, 1, 6, 15, 3, 4, 0, 3, 2, 5, 0, 11, 0, 1, 7, 3, 4, 4, 0, 10, 12, 1, 0, 7, 3
Offset: 1
Keywords
Examples
The reversed prime indices of 12 are (2,1,1), so a(12) = 0*2 + 1*1 + 2*1 = 3.
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[Reverse[primeMS[n]]],{n,100}]
Comments