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.

A326034 Number of knapsack partitions of n with largest part 3.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 04 2019

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.
Appears to repeat the terms (2,2,2,3,1,3) ad infinitum.
I computed terms a(n) for n = 0..5000 and (2,2,2,3,1,3) is repeated continuously starting at a(8). - Fausto A. C. Cariboni, May 14 2021

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}]