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.

Showing 1-10 of 10 results.

A326016 Number of knapsack partitions of n such that no addition of one part up to the maximum is knapsack.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 1, 1, 0, 3, 0, 0, 0, 1, 0, 8, 0, 8, 4, 3, 0, 11, 5, 3, 2, 5, 0, 29, 2, 9, 8, 20, 2
Offset: 1

Views

Author

Gus Wiseman, Jun 03 2019

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.
The Heinz numbers of these partitions are given by A326018.

Examples

			The initial terms count the following partitions:
  15: (5,4,3,3)
  21: (7,6,5,3)
  21: (7,5,3,3,3)
  24: (8,7,6,3)
  25: (7,5,5,4,4)
  27: (9,8,7,3)
  27: (9,7,6,5)
  27: (8,7,3,3,3,3)
  31: (10,8,6,6,1)
  33: (11,9,7,3,3)
  33: (11,8,5,5,4)
  33: (11,7,6,6,3)
  33: (11,7,3,3,3,3,3)
  33: (11,5,5,4,4,4)
  33: (10,9,8,3,3)
  33: (10,8,6,6,3)
  33: (10,8,3,3,3,3,3)
		

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]}]])];
    ksQ[y_]:=Length[sums[Sort[y]]]==Times@@(Length/@Split[Sort[y]]+1)-1;
    maxks[n_]:=Select[IntegerPartitions[n],ksQ[#]&&Select[Table[Sort[Append[#,i]],{i,Range[Max@@#]}],ksQ]=={}&];
    Table[Length[maxks[n]],{n,30}]

A326015 Number of strict knapsack partitions of n such that no superset with the same maximum is knapsack.

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 1, 1, 3, 2, 4, 4, 5, 3, 3, 4, 6, 2, 7, 6, 13, 9, 19, 16, 27, 21, 40, 33, 47, 37, 54, 48, 66, 51, 65, 65, 77, 64, 80, 71, 96, 60, 106, 95, 112, 93, 152, 114, 191, 131, 242, 192, 303, 210, 366, 300, 482, 352, 581, 450, 713, 539, 882, 689, 995
Offset: 1

Views

Author

Gus Wiseman, Jun 03 2019

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.
These are the subsets counted by A325867, ordered by sum rather than maximum.

Examples

			The a(1) = 1 through a(17) = 6 strict knapsack partitions (empty columns not shown):
  {1}  {2,1}  {3,1}  {3,2}  {4,2,1}  {5,2,1}  {4,3,2}  {6,3,1}  {5,4,2}
                                              {5,3,1}  {7,2,1}  {6,3,2}
                                              {6,2,1}           {6,4,1}
                                                                {7,3,1}
.
  {5,4,3}  {6,4,3}  {6,5,3}  {6,5,4}    {7,5,4}    {7,6,4}
  {7,3,2}  {6,5,2}  {8,5,1}  {7,6,2}    {9,4,3}    {9,5,3}
  {7,4,1}  {7,4,2}  {9,3,2}  {8,4,2,1}  {9,6,1}    {9,6,2}
  {8,3,1}  {7,5,1}                      {9,4,2,1}  {8,4,3,2}
           {9,3,1}                                 {9,5,2,1}
                                                   {10,4,2,1}
		

Crossrefs

Programs

  • Mathematica
    ksQ[y_]:=UnsameQ@@Total/@Union[Subsets[y]]
    maxsks[n_]:=Select[Select[IntegerPartitions[n],UnsameQ@@#&&ksQ[#]&],Select[Table[Append[#,i],{i,Complement[Range[Max@@#],#]}],ksQ]=={}&];
    Table[Length[maxsks[n]],{n,30}]

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

A343321 Number of knapsack partitions of n with largest part 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 1, 4, 3, 5, 5, 4, 4, 6, 5, 7, 2, 6, 5, 8, 5, 4, 6, 7, 6, 8, 2, 8, 6, 7, 7, 5, 5, 8, 7, 8, 2, 8, 6, 9, 6, 3, 7, 9, 5, 8, 3, 8, 6, 8, 6, 5, 6, 7, 7, 9, 1, 8, 7, 8, 6, 4, 6, 9, 6, 7, 3, 9, 5, 8, 7, 4, 6, 8, 6, 9, 2, 7, 7, 9, 5, 4, 7
Offset: 0

Views

Author

Fausto A. C. Cariboni, May 14 2021

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.
I computed terms a(n) for n = 0..10000 and (6,7,7,5,5,8,7,8,2,8,6,9,6,3,7,9,5,8,3,8,6,8,6,5,6,7,7,9,1,8,7,8,6,4,6,9,6,7,3,9,5,8,7,4,6,8,6,9,2,7,7,9,5,4,7,8,6,8,2,9) is repeated continuously starting at a(32).

Examples

			The initial values count the following partitions:
   5: (5)
   6: (5,1)
   7: (5,1,1)
   7: (5,2)
   8: (5,1,1,1)
   8: (5,2,1)
   8: (5,3)
		

Crossrefs

A344310 Number of knapsack partitions of n with largest part 4.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 1, 2, 3, 3, 1, 3, 3, 3, 2, 3, 3, 4, 2, 3, 4, 4, 1, 4, 4, 3, 2, 4, 3, 4, 2, 3, 4, 4, 1, 4, 4, 3, 2, 4, 3, 4, 2, 3, 4, 4, 1, 4, 4, 3, 2, 4, 3, 4, 2, 3, 4, 4, 1, 4, 4, 3, 2, 4, 3, 4, 2, 3, 4, 4, 1, 4, 4, 3, 2, 4, 3, 4, 2, 3, 4, 4, 1, 4, 4
Offset: 0

Views

Author

Fausto A. C. Cariboni, May 14 2021

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.
I computed terms a(n) for n = 0..10000 and (3, 4, 2, 3, 4, 4, 1, 4, 4, 3, 2, 4) is repeated continuously starting at a(18).

Examples

			The initial values count the following partitions:
   4: (4)
   5: (4,1)
   6: (4,1,1)
   6: (4,2)
   7: (4,1,1,1)
   7: (4,2,1)
   7: (4,3)
   8: (4,4)
		

Crossrefs

A344340 Number of knapsack partitions of n with largest part 6.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 6, 1, 4, 4, 6, 5, 7, 3, 7, 4, 8, 6, 10, 2, 7, 6, 9, 6, 9, 2, 9, 5, 9, 7, 9, 2, 8, 7, 10, 5, 9, 3, 10, 6, 8, 7, 10, 3, 9, 6, 10, 6, 10, 4, 9, 6, 9, 8, 11, 1, 9, 7, 11, 7, 8, 3, 10, 7, 10, 6, 10, 2, 10, 8, 9, 6, 9, 4, 11, 5, 9, 7
Offset: 0

Views

Author

Fausto A. C. Cariboni, May 15 2021

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.
I computed terms a(n) for n = 0..10000 and (6,10,6,10,4,9,6,9,8,11,1,9,7,11,7,8,3,10,7,10,6,10,2,10,8,9,6,9,4,11,5,9,7,11,3,8,7,10,7,10,2,10,6,10,8,9,2,9,8,11,5,9,3,11,7,8,7,10,3,10) is repeated continuously starting at a(50).

Examples

			The initial values count the following partitions:
   6: (6)
   7: (6,1)
   8: (6,1,1)
   8: (6,2)
   9: (6,1,1,1)
   9: (6,2,1)
   9: (6,3)
		

Crossrefs

A326035 Number of uniform knapsack partitions of n.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 6, 6, 9, 10, 12, 12, 17, 16, 20, 25, 27, 29, 35, 39, 44, 57, 53, 66, 75, 84, 84, 114, 112, 131, 133, 162, 167, 209, 192, 242, 250, 289, 279, 363, 348, 417, 404, 502, 487, 608, 557, 706, 682, 835, 773, 1004, 922, 1149, 1059, 1344, 1257, 1595
Offset: 0

Views

Author

Gus Wiseman, Jun 04 2019

Keywords

Comments

An integer partition is uniform if all parts appear with the same multiplicity, and knapsack if every distinct submultiset has a different sum.

Examples

			The a(1) = 1 through a(8) = 9 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (11111)  (51)      (61)       (62)
                                     (222)     (421)      (71)
                                     (111111)  (1111111)  (521)
                                                          (2222)
                                                          (3311)
                                                          (11111111)
		

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]}]])];
    ks[n_]:=Select[IntegerPartitions[n],Length[sums[Sort[#]]]==Times@@(Length/@Split[#]+1)-1&];
    Table[Length[Select[ks[n],SameQ@@Length/@Split[#]&]],{n,30}]

A344412 Number of knapsack partitions of n with largest part 7.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 6, 7, 1, 6, 5, 8, 7, 10, 8, 8, 9, 11, 8, 13, 11, 13, 5, 14, 8, 13, 10, 17, 12, 8, 10, 14, 13, 14, 12, 18, 3, 15, 11, 15, 14, 17, 12, 8, 12, 15, 13, 20, 12, 14, 5, 17, 15, 17, 10, 18, 14, 9, 13, 18, 13, 15, 15, 18, 5, 18, 11
Offset: 0

Views

Author

Fausto A. C. Cariboni, May 17 2021

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.
I computed terms a(n) for n = 0..25000 and the subsequence a(72)-a(491) of length 420 is repeated continuously.

Examples

			The initial nonzero values count the following partitions:
   7: (7)
   8: (7,1)
   9: (7,1,1), (7,2)
  10: (7,1,1,1), (7,2,1), (7,3)
		

Crossrefs

A344625 Number of knapsack partitions of n with largest part 9.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 6, 7, 11, 12, 1, 10, 7, 11, 10, 17, 12, 18, 16, 12, 15, 19, 13, 25, 20, 17, 22, 29, 6, 25, 20, 22, 20, 28, 16, 31, 21, 14, 23, 33, 15, 24, 22, 25, 28, 30, 8, 31, 20, 22, 22, 36, 16, 34, 26, 14, 23, 26, 22, 33, 25, 24
Offset: 0

Views

Author

Fausto A. C. Cariboni, May 25 2021

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.
I computed terms a(n) for n = 0..50000 and the subsequence a(128)-a(2647) of length 2520 is repeated continuously.

Examples

			The initial nonzero values count the following partitions:
   9: (9)
  10: (9,1)
  11: (9,1,1), (9,2)
  12: (9,1,1,1), (9,2,1), (9,3)
		

Crossrefs

A344635 Number of knapsack partitions of n with largest part 10.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 6, 7, 11, 12, 17, 1, 13, 9, 16, 11, 20, 14, 24, 16, 25, 9, 27, 14, 29, 19, 32, 16, 34, 19, 37, 11, 32, 17, 38, 19, 32, 22, 41, 19, 40, 14, 38, 22, 41, 22, 39, 18, 44, 26, 46, 8, 46, 24, 38, 23, 40, 21, 48, 28, 42, 12
Offset: 0

Views

Author

Fausto A. C. Cariboni, May 25 2021

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.
I computed terms a(n) for n = 0..50000 and the subsequence a(162)-a(2681) of length 2520 is repeated continuously.

Examples

			The initial nonzero values count the following partitions:
  10: (10)
  11: (10,1)
  12: (10,1,1), (10,2)
  13: (10,1,1,1), (10,2,1), (10,3)
		

Crossrefs

Showing 1-10 of 10 results.