A365920 Greatest non-subset-sum of the prime indices of n, or 0 if there is none.
0, 0, 1, 0, 2, 0, 3, 0, 3, 2, 4, 0, 5, 3, 4, 0, 6, 0, 7, 0, 5, 4, 8, 0, 5, 5, 5, 3, 9, 0, 10, 0, 6, 6, 6, 0, 11, 7, 7, 0, 12, 0, 13, 4, 6, 8, 14, 0, 7, 5, 8, 5, 15, 0, 7, 0, 9, 9, 16, 0, 17, 10, 7, 0, 8, 4, 18, 6, 10, 6, 19, 0, 20, 11, 7, 7, 8, 5, 21, 0, 7, 12
Offset: 1
Keywords
Examples
The prime indices of 156 are {1,1,2,6}, with subset-sums 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, so a(156) = 5.
Links
- Steven R. Finch, Monoids of natural numbers, March 17, 2009.
Crossrefs
Programs
-
Mathematica
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; nmz[y_]:=Complement[Range[Total[y]],Total/@Subsets[y]]; Table[Max@@Prepend[nmz[prix[n]],0],{n,100}]
Comments