A326034 Number of knapsack partitions of n with largest part 3.
0, 0, 0, 1, 1, 2, 1, 2, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2, 2, 2, 3, 1, 3, 2
Offset: 0
Keywords
Examples
The initial values count the following partitions: 3: (3) 4: (3,1) 5: (3,2) 5: (3,1,1) 6: (3,3) 7: (3,3,1) 7: (3,2,2) 8: (3,3,2) 8: (3,3,1,1) 9: (3,3,3) 9: (3,2,2,2) 10: (3,3,3,1) 10: (3,3,2,2) 11: (3,3,3,2) 11: (3,3,3,1,1) 11: (3,2,2,2,2) 12: (3,3,3,3) 13: (3,3,3,3,1) 13: (3,3,3,2,2) 13: (3,2,2,2,2,2) 14: (3,3,3,3,2) 14: (3,3,3,3,1,1) 15: (3,3,3,3,3) 15: (3,2,2,2,2,2,2)
Crossrefs
Programs
-
Mathematica
sums[ptn_]:=sums[ptn]=If[Length[ptn]==1,ptn,Union@@(Join[sums[#],sums[#]+Total[ptn]-Total[#]]&/@Union[Table[Delete[ptn,i],{i,Length[ptn]}]])]; kst[n_]:=Select[IntegerPartitions[n,All,{1,2,3}],Length[sums[Sort[#]]]==Times@@(Length/@Split[#]+1)-1&]; Table[Length[Select[kst[n],Max@@#==3&]],{n,0,30}]
Comments