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.

A325862 Number of integer partitions of n such that every set of distinct parts has a different sum.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 10, 14, 19, 26, 34, 46, 58, 77, 93, 122, 146, 188, 217, 282, 327, 410, 470, 596, 673, 848, 947, 1178, 1325, 1629, 1798, 2213, 2444, 2962, 3247, 3935, 4292, 5149, 5579, 6674, 7247, 8590, 9221, 10964, 11804, 13870, 14843, 17480, 18675, 21866
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Comments

A knapsack partition (A108917, A299702) is an integer partition such that every submultiset has a different sum. The one non-knapsack partition counted under a(4) is (2,1,1).

Examples

			The a(1) = 1 through a(7) = 14 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (32)     (33)      (43)
             (111)  (31)    (41)     (42)      (52)
                    (211)   (221)    (51)      (61)
                    (1111)  (311)    (222)     (322)
                            (2111)   (411)     (331)
                            (11111)  (2211)    (421)
                                     (3111)    (511)
                                     (21111)   (2221)
                                     (111111)  (4111)
                                               (22111)
                                               (31111)
                                               (211111)
                                               (1111111)
The three non-knapsack partitions counted under a(6) are:
  (2,2,1,1)
  (3,1,1,1)
  (2,1,1,1,1)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Plus@@@Subsets[Union[#]]&]],{n,0,20}]

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

A325879 Number of maximal subsets of {1..n} such that every ordered pair of distinct elements has a different difference.

Original entry on oeis.org

1, 1, 1, 3, 3, 6, 14, 20, 24, 36, 64, 110, 176, 238, 294, 370, 504, 736, 1086, 1592, 2240, 2982, 3788, 4700, 5814, 7322, 9396, 12336, 16552, 22192, 29310, 38046, 48368, 60078, 73722, 89416, 108208, 131310, 160624, 198002, 247408, 310410, 390924, 490818, 613344, 758518
Offset: 0

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Comments

Also the number of maximal subsets of {1..n} such that every orderless pair of (not necessarily distinct) elements has a different sum.

Examples

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

Crossrefs

The subset case is A143823.
The integer partition case is A325858.
The strict integer partition case is A325876.
Heinz numbers of the counterexamples are given by A325992.

Programs

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

Extensions

a(21)-a(45) from Fausto A. C. Cariboni, Feb 08 2022

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

A325863 Number of integer partitions of n such that every distinct non-singleton submultiset has a different sum.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 11, 15, 17, 24, 29, 31, 41, 51, 58, 67, 84, 91, 117, 117
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Comments

A knapsack partition (A108917, A299702) is an integer partition such that every submultiset has a different sum. The one non-knapsack partition counted under a(4) is (2,1,1).

Examples

			The partition (2,1,1,1) has non-singleton submultisets {1,2} and {1,1,1} with the same sum, so (2,1,1,1) is not counted under a(5).
The a(1) = 1 through a(8) = 15 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (211)   (221)    (51)      (61)       (62)
                    (1111)  (311)    (222)     (322)      (71)
                            (11111)  (321)     (331)      (332)
                                     (411)     (421)      (422)
                                     (3111)    (511)      (431)
                                     (111111)  (2221)     (521)
                                               (4111)     (611)
                                               (1111111)  (2222)
                                                          (3311)
                                                          (5111)
                                                          (41111)
                                                          (11111111)
The 10 non-knapsack partitions counted under a(12):
  (7,6,1)
  (7,5,2)
  (7,4,3)
  (7,5,1,1)
  (7,4,2,1)
  (7,3,3,1)
  (7,3,2,2)
  (7,4,1,1,1)
  (7,2,2,2,1)
  (7,1,1,1,1,1,1,1)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Plus@@@Union[Subsets[#,{2,Length[#]}]]&]],{n,0,15}]

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

A326115 Number of maximal double-free subsets of {1..n}.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 4, 4, 6, 6, 12, 12, 12, 12, 24, 24, 32, 32, 64, 64, 64, 64, 128, 128, 192, 192, 384, 384, 384, 384, 768, 768, 960, 960, 1920, 1920, 1920, 1920, 3840, 3840, 5760, 5760, 11520, 11520, 11520, 11520, 23040, 23040, 30720, 30720
Offset: 0

Views

Author

Gus Wiseman, Jun 06 2019

Keywords

Comments

A set is double-free if no element is twice any other element.

Examples

			The a(1) = 1 through a(9) = 6 sets:
  {1}  {1}  {13}  {23}   {235}   {235}   {2357}   {13457}  {134579}
       {2}  {23}  {134}  {1345}  {256}   {2567}   {13578}  {135789}
                                 {1345}  {13457}  {14567}  {145679}
                                 {1456}  {14567}  {15678}  {156789}
                                                  {23578}  {235789}
                                                  {25678}  {256789}
		

Crossrefs

Programs

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

Formula

From Charlie Neder, Jun 11 2019: (Start)
a(n) = Product {k < n/2} A000931(8+floor(log_2(n/(2k+1)))).
a(2k+1) = a(2k), a(8k+4) = a(8k+3). (End)

Extensions

a(16)-a(49) from Charlie Neder, Jun 11 2019

A326033 Number of knapsack partitions of n such that no addition of one part equal to an existing part 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, 1, 1, 0, 8, 0, 8, 4, 3, 0, 11, 5, 3, 4, 5, 0, 30, 2, 9, 9, 20, 3, 37, 6, 18, 16, 37, 20, 71, 12, 37, 40
Offset: 1

Views

Author

Gus Wiseman, Jun 03 2019

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum.

Examples

			The partition (10,8,6,6) is counted under a(30) because (10,10,8,6,6), (10,8,8,6,6), and (10,8,6,6,6) are not knapsack.
		

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,Union[#]}],ksQ]=={}&];
    Table[Length[maxks[n]],{n,30}]
Showing 1-9 of 9 results.