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-9 of 9 results.

A325864 Number of subsets of {1..n} of which every subset has a different sum.

Original entry on oeis.org

1, 2, 4, 7, 13, 22, 36, 56, 91, 135, 211, 307, 446, 625, 882, 1194, 1677, 2238, 3031, 4001, 5460, 6995, 9302, 11921, 15424, 19554, 25032, 31005, 39170, 48251, 59917, 73093, 90831, 109271, 134049, 160922, 196109, 234179, 284157, 335933, 408390, 482597, 575109
Offset: 0

Views

Author

Gus Wiseman, Jun 01 2019

Keywords

Examples

			The a(0) = 1 through a(4) = 13 subsets:
  {}  {}   {}     {}     {}
      {1}  {1}    {1}    {1}
           {2}    {2}    {2}
           {1,2}  {3}    {3}
                  {1,2}  {4}
                  {1,3}  {1,2}
                  {2,3}  {1,3}
                         {1,4}
                         {2,3}
                         {2,4}
                         {3,4}
                         {1,2,4}
                         {2,3,4}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Plus@@@Subsets[#]&]],{n,0,10}]

Extensions

a(18)-a(42) from Alois P. Heinz, Jun 03 2019

A325878 Number of maximal subsets of {1..n} such that every orderless pair of distinct elements has a different sum.

Original entry on oeis.org

1, 1, 1, 1, 4, 5, 8, 22, 40, 56, 78, 124, 222, 390, 616, 892, 1220, 1620, 2182, 3042, 4392, 6364, 9054, 12608, 16980, 22244, 28482, 36208, 45864, 58692, 75804, 98440, 128694, 168250, 218558, 281210, 357594, 449402, 560034, 693332, 853546, 1050118, 1293458, 1596144, 1975394
Offset: 0

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Examples

			The a(1) = 1 through a(6) = 8 subsets:
  {1}  {1,2}  {1,2,3}  {1,2,3}  {1,2,4}    {1,2,3,5}
                       {1,2,4}  {2,3,4}    {1,2,3,6}
                       {1,3,4}  {2,4,5}    {1,2,4,6}
                       {2,3,4}  {1,2,3,5}  {1,3,4,5}
                                {1,3,4,5}  {1,3,5,6}
                                           {1,4,5,6}
                                           {2,3,4,6}
                                           {2,4,5,6}
		

Crossrefs

The subset case is A196723.
The integer partition case is A325857.
The strict integer partition case is A325877.
Heinz numbers of the counterexamples are given by A325991.

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],UnsameQ@@Plus@@@Subsets[Union[#],{2}]&]]],{n,0,10}]
  • PARI
    a(n)={
       my(ismaxl(b,w)=for(k=1, n, if(!bittest(b,k) && !bitand(w,b< n, ismaxl(b,w),
             my(s=self()(k+1, r, b, w));
             if(!bitand(w,b<Andrew Howroyd, Mar 23 2025

Extensions

a(21) onwards from Andrew Howroyd, Mar 23 2025

A325859 Number of maximal subsets of {1..n} such that every orderless pair of distinct elements has a different product.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 4, 4, 11, 11, 28, 28, 60, 60, 140, 241, 299, 299, 572, 572, 971
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Examples

			The a(1) = 1 through a(9) = 11 subsets:
  {1}  {12}  {123}  {1234}  {12345}  {2356}   {23567}   {123457}  {235678}
                                     {12345}  {123457}  {123578}  {1234579}
                                     {12456}  {124567}  {124567}  {1235789}
                                     {13456}  {134567}  {125678}  {1245679}
                                                        {134567}  {1256789}
                                                        {134578}  {1345679}
                                                        {135678}  {1345789}
                                                        {145678}  {1356789}
                                                        {234578}  {1456789}
                                                        {235678}  {2345789}
                                                        {245678}  {2456789}
		

Crossrefs

The subset case is A196724.
The maximal case is A325859.
The integer partition case is A325856.
The strict integer partition case is A325855.
Heinz numbers of the counterexamples are given by A325993.

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],UnsameQ@@Times@@@Subsets[#,{2}]&]]],{n,0,15}]

A325865 Number of maximal subsets of {1..n} of which every subset has a different sum.

Original entry on oeis.org

1, 1, 1, 3, 3, 6, 14, 23, 27, 40, 64, 104, 180, 275, 399, 554, 679, 872, 1117, 1431, 1920, 2520, 3530, 4751, 6644, 8855, 12021, 15461, 19939, 25109, 31656, 38750, 46204, 55650, 65942, 78045, 91304, 106592, 124761, 145701, 172343, 201217, 238739, 280601, 339746, 400394
Offset: 0

Views

Author

Gus Wiseman, Jun 01 2019

Keywords

Examples

			The a(1) = 1 through a(6) = 14 subsets:
  {1}  {1,2}  {1,2}  {1,3}    {1,2,4}  {1,2,4}
              {1,3}  {1,2,4}  {1,2,5}  {1,2,5}
              {2,3}  {2,3,4}  {1,3,5}  {1,2,6}
                              {2,3,4}  {1,3,5}
                              {2,4,5}  {1,3,6}
                              {3,4,5}  {1,4,6}
                                       {2,3,4}
                                       {2,3,6}
                                       {2,4,5}
                                       {2,5,6}
                                       {3,4,5}
                                       {3,4,6}
                                       {3,5,6}
                                       {4,5,6}
		

Crossrefs

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&)/@y];
    Table[Length[fasmax[Select[Subsets[Range[n]],UnsameQ@@Plus@@@Subsets[#]&]]],{n,0,10}]
  • PARI
    a(n)={
      my(ismaxl(w)=for(k=1, n, if(!bitand(w,w< n, ismaxl(w),
             my(s=self()(k+1, b,w));
             if(!bitand(w,w<Andrew Howroyd, Mar 23 2025

Extensions

a(18) onwards from Andrew Howroyd, Mar 23 2025

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

A325867 Number of maximal subsets of {1..n} containing n such that every subset has a different sum.

Original entry on oeis.org

1, 1, 2, 2, 4, 8, 10, 12, 17, 34, 45, 77, 99, 136, 166, 200, 238, 328, 402, 660, 674, 1166, 1331, 1966, 2335, 3286, 3527, 4762, 5383, 6900, 7543, 9087, 10149, 12239, 13569, 16452, 17867, 22869, 23977, 33881, 33820, 43423, 48090, 68683, 67347, 95176, 97917, 131666, 136205
Offset: 1

Views

Author

Gus Wiseman, Jun 01 2019

Keywords

Comments

These are maximal strict knapsack partitions (A275972, A326015) organized by maximum rather than sum.

Examples

			The a(1) = 1 through a(8) = 12 subsets:
  {1}  {1,2}  {1,3}  {1,2,4}  {1,2,5}  {1,2,6}  {1,2,7}    {1,3,8}
              {2,3}  {2,3,4}  {1,3,5}  {1,3,6}  {1,3,7}    {1,5,8}
                              {2,4,5}  {1,4,6}  {1,4,7}    {5,7,8}
                              {3,4,5}  {2,3,6}  {1,5,7}    {1,2,4,8}
                                       {2,5,6}  {2,3,7}    {1,4,6,8}
                                       {3,4,6}  {2,4,7}    {2,3,4,8}
                                       {3,5,6}  {2,6,7}    {2,4,5,8}
                                       {4,5,6}  {4,5,7}    {2,4,7,8}
                                                {4,6,7}    {3,4,6,8}
                                                {3,5,6,7}  {3,6,7,8}
                                                           {4,5,6,8}
                                                           {4,6,7,8}
		

Crossrefs

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&)/@y];
    Table[Length[fasmax[Select[Subsets[Range[n]],MemberQ[#,n]&&UnsameQ@@Plus@@@Subsets[#]&]]],{n,15}]
  • Python
    def f(p0, n, m, cm):
        full, t, p = True, 0, p0
        while p>k)&1)==0 and ((m<Bert Dobbelaere, Mar 07 2021

Extensions

More terms from Bert Dobbelaere, Mar 07 2021

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

A326018 Heinz numbers of knapsack partitions such that no addition of one part up to the maximum is knapsack.

Original entry on oeis.org

1925, 12155, 20995, 23375, 37145
Offset: 1

Views

Author

Gus Wiseman, Jun 03 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
An integer partition is knapsack if every submultiset has a different sum.
The enumeration of these partitions by sum is given by A326016.

Examples

			The sequence of terms together with their prime indices begins:
   1925: {3,3,4,5}
  12155: {3,5,6,7}
  20995: {3,6,7,8}
  23375: {3,3,3,5,7}
  37145: {3,7,8,9}
		

Crossrefs

Programs

  • Mathematica
    ksQ[y_]:=UnsameQ@@Total/@Union[Subsets[y]];
    Select[Range[2,200],With[{phm=If[#==1,{},Flatten[Cases[FactorInteger[#],{p_,k_}:>Table[PrimePi[p],{k}]]]]},ksQ[phm]&&Select[Table[Sort[Append[phm,i]],{i,Max@@phm}],ksQ]=={}]&]

A325866 Number of subsets of {1..n} containing n such that every subset has a different sum.

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 20, 35, 44, 76, 96, 139, 179, 257, 312, 483, 561, 793, 970, 1459, 1535, 2307, 2619, 3503, 4130, 5478, 5973, 8165, 9081, 11666, 13176, 17738, 18440, 24778, 26873, 35187, 38070, 49978, 51776, 72457, 74207, 92512, 102210, 135571, 136786, 179604
Offset: 1

Views

Author

Gus Wiseman, Jun 01 2019

Keywords

Comments

These are strict knapsack partitions (A275972) organized by maximum rather than sum.

Examples

			The a(1) = 1 through a(6) = 14 subsets:
  {1}  {2}    {3}    {4}      {5}      {6}
       {1,2}  {1,3}  {1,4}    {1,5}    {1,6}
              {2,3}  {2,4}    {2,5}    {2,6}
                     {3,4}    {3,5}    {3,6}
                     {1,2,4}  {4,5}    {4,6}
                     {2,3,4}  {1,2,5}  {5,6}
                              {1,3,5}  {1,2,6}
                              {2,4,5}  {1,3,6}
                              {3,4,5}  {1,4,6}
                                       {2,3,6}
                                       {2,5,6}
                                       {3,4,6}
                                       {3,5,6}
                                       {4,5,6}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&UnsameQ@@Plus@@@Subsets[#]&]],{n,10}]

Extensions

a(18)-a(46) from Alois P. Heinz, Jun 03 2019
Showing 1-9 of 9 results.