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.

Previous Showing 21-30 of 31 results. Next

A365044 Number of subsets of {1..n} whose greatest element cannot be written as a (strictly) positive linear combination of the others.

Original entry on oeis.org

1, 2, 3, 5, 9, 20, 43, 96, 207, 442, 925, 1913, 3911, 7947, 16061, 32350, 64995, 130384, 261271, 523194, 1047208, 2095459, 4192212, 8386044, 16774078, 33550622, 67104244, 134212163, 268428760, 536862900, 1073732255, 2147472267, 4294953778, 8589918612, 17179850312
Offset: 0

Views

Author

Gus Wiseman, Aug 26 2023

Keywords

Comments

Sets of this type may be called "positive combination-free".
Also subsets of {1..n} such that no element can be written as a (strictly) positive linear combination of the others.

Examples

			The subset S = {3,5,6,8} has 6 = 2*3 + 0*5 + 0*8 and 8 = 1*3 + 1*5 + 0*6 but neither of these is strictly positive, so S is counted under a(8).
The a(0) = 1 through a(5) = 20 subsets:
  {}  {}   {}   {}     {}         {}
      {1}  {1}  {1}    {1}        {1}
           {2}  {2}    {2}        {2}
                {3}    {3}        {3}
                {2,3}  {4}        {4}
                       {2,3}      {5}
                       {3,4}      {2,3}
                       {2,3,4}    {2,5}
                       {1,2,3,4}  {3,4}
                                  {3,5}
                                  {4,5}
                                  {2,3,4}
                                  {2,4,5}
                                  {3,4,5}
                                  {1,2,3,4}
                                  {1,2,3,5}
                                  {1,2,4,5}
                                  {1,3,4,5}
                                  {2,3,4,5}
                                  {1,2,3,4,5}
		

Crossrefs

The binary version is A007865, first differences A288728.
The binary complement is A093971, first differences A365070.
Without re-usable parts we have A151897, first differences A365071.
The nonnegative version is A326083, first differences A124506.
A subclass is A341507.
The nonnegative complement is A364914, first differences A365046.
The complement is counted by A365043, first differences A365042.
First differences are A365045.
A085489 and A364755 count subsets w/o the sum of two distinct elements.
A088809 and A364756 count subsets with the sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],And@@Table[combp[Last[#],Union[Most[#]]]=={},{k,Length[#]}]&]],{n,0,10}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A365044(n):
        mlist = tuple({tuple(sorted(p.keys())) for p in partitions(m,k=m-1)} for m in range(1,n+1))
        return n+1+sum(1 for k in range(2,n+1) for w in combinations(range(1,n+1),k) if w[:-1] not in mlist[w[-1]-1]) # Chai Wah Wu, Nov 20 2023

Formula

a(n) = 2^n - A365043(n).

Extensions

a(15)-a(34) from Chai Wah Wu, Nov 20 2023

A365042 Number of subsets of {1..n} containing n such that some element can be written as a positive linear combination of the others.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 9, 11, 17, 21, 29, 36, 50, 60, 78, 95, 123, 147, 185, 221, 274, 325, 399, 472, 574, 672, 810, 945, 1131, 1316, 1557, 1812, 2137, 2462, 2892, 3322, 3881, 4460, 5176, 5916, 6846, 7817, 8993, 10250, 11765, 13333, 15280, 17308, 19731, 22306
Offset: 0

Views

Author

Gus Wiseman, Aug 23 2023

Keywords

Comments

Sets of this type may be called "positive combination-full".
Also subsets of {1..n} containing n whose greatest element can be written as a positive linear combination of the others.

Examples

			The subset {3,4,10} has 10 = 2*3 + 1*4 so is counted under a(10).
The a(0) = 0 through a(7) = 11 subsets:
  .  .  {1,2}  {1,3}    {1,4}    {1,5}    {1,6}      {1,7}
               {1,2,3}  {2,4}    {1,2,5}  {2,6}      {1,2,7}
                        {1,2,4}  {1,3,5}  {3,6}      {1,3,7}
                        {1,3,4}  {1,4,5}  {1,2,6}    {1,4,7}
                                 {2,3,5}  {1,3,6}    {1,5,7}
                                          {1,4,6}    {1,6,7}
                                          {1,5,6}    {2,3,7}
                                          {2,4,6}    {2,5,7}
                                          {1,2,3,6}  {3,4,7}
                                                     {1,2,3,7}
                                                     {1,2,4,7}
		

Crossrefs

The nonnegative complement is A124506, first differences of A326083.
The binary complement is A288728, first differences of A007865.
First differences of A365043.
The complement is counted by A365045, first differences of A365044.
The nonnegative version is A365046, first differences of A364914.
Without re-usable parts we have A365069, first differences of A364534.
The binary version is A365070, first differences of A093971.
A085489 and A364755 count subsets with no sum of two distinct elements.
A088314 counts sets that can be linearly combined to obtain n.
A088809 and A364756 count subsets with some sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Or@@Table[combp[#[[k]],Union[Delete[#,k]]]!={},{k,Length[#]}]&]],{n,0,10}]

Formula

a(n) = A088314(n) - 1.

A365070 Number of subsets of {1..n} containing n and some element equal to the sum of two other (possibly equal) elements.

Original entry on oeis.org

0, 0, 1, 1, 5, 9, 24, 46, 109, 209, 469, 922, 1932, 3858, 7952, 15831, 32214, 64351, 129813, 259566, 521681, 1042703, 2091626, 4182470, 8376007, 16752524, 33530042, 67055129, 134165194, 268328011, 536763582, 1073523097, 2147268041, 4294505929, 8589506814, 17178978145
Offset: 0

Views

Author

Gus Wiseman, Aug 24 2023

Keywords

Comments

These are binary sum-full sets where elements can be re-used. The complement is counted by A288728. The non-binary version is A365046, complement A124506. For non-re-usable parts we have A364756, complement A085489.

Examples

			The subset {1,3} has no element equal to the sum of two others, so is not counted under a(3).
The subset {3,4,5} has no element equal to the sum of two others, so is not counted under a(5).
The subset {1,3,4} has 4 = 1 + 3, so is counted under a(4).
The subset {2,4,5} has 4 = 2 + 2, so is counted under a(5).
The a(0) = 0 through a(5) = 9 subsets:
  .  .  {1,2}  {1,2,3}  {2,4}      {1,2,5}
                        {1,2,4}    {1,4,5}
                        {1,3,4}    {2,3,5}
                        {2,3,4}    {2,4,5}
                        {1,2,3,4}  {1,2,3,5}
                                   {1,2,4,5}
                                   {1,3,4,5}
                                   {2,3,4,5}
                                   {1,2,3,4,5}
		

Crossrefs

The complement w/o re-usable parts is A085489, first differences of A364755.
First differences of A093971.
The non-binary complement is A124506, first differences of A326083.
The complement is counted by A288728, first differences of A007865.
For partitions (not requiring n) we have A363225, strict A363226.
The case without re-usable parts is A364756, firsts differences of A088809.
The non-binary version is A365046, first differences of A364914.
A116861 and A364916 count linear combinations of strict partitions.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.
A365006 counts no positive combination-full strict ptns.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]], MemberQ[#,n]&&Intersection[#,Total /@ Tuples[#,2]]!={}&]], {n,0,10}]

Formula

First differences of A093971.

Extensions

a(21) onwards added (using A093971) by Andrew Howroyd, Jan 13 2024

A365069 Number of subsets of {1..n} containing n and some element equal to the sum of two or more distinct other elements. A variation of non-binary sum-full subsets without re-usable elements.

Original entry on oeis.org

0, 0, 0, 1, 2, 7, 17, 41, 88, 201, 418, 892, 1838, 3798, 7716, 15740
Offset: 0

Views

Author

Gus Wiseman, Aug 26 2023

Keywords

Comments

The complement is counted by A365071. The binary case is A364756. Allowing elements to be re-used gives A365070. A version for partitions (but not requiring n) is A237668.

Examples

			The subset {2,4,6} has 6 = 4 + 2 so is counted under a(6).
The subset {1,2,4,7} has 7 = 4 + 2 + 1 so is counted under a(7).
The subset {1,4,5,8} has 5 = 4 + 1 so is counted under a(8).
The a(0) = 0 through a(6) = 17 subsets:
  .  .  .  {1,2,3}  {1,3,4}    {1,4,5}      {1,5,6}
                    {1,2,3,4}  {2,3,5}      {2,4,6}
                               {1,2,3,5}    {1,2,3,6}
                               {1,2,4,5}    {1,2,4,6}
                               {1,3,4,5}    {1,2,5,6}
                               {2,3,4,5}    {1,3,4,6}
                               {1,2,3,4,5}  {1,3,5,6}
                                            {1,4,5,6}
                                            {2,3,4,6}
                                            {2,3,5,6}
                                            {2,4,5,6}
                                            {1,2,3,4,6}
                                            {1,2,3,5,6}
                                            {1,2,4,5,6}
                                            {1,3,4,5,6}
                                            {2,3,4,5,6}
                                            {1,2,3,4,5,6}
		

Crossrefs

The complement w/ re-usable parts is A288728, first differences of A007865.
First differences of A364534.
The binary complement is A364755, first differences of A085489.
The binary version is A364756, first differences of A088809.
The version with re-usable parts is A365070, first differences of A093971.
The complement is counted by A365071, first differences of A151897.
A124506 counts nonnegative combination-free subsets, differences of A326083.
A365046 counts nonnegative combination-full subsets, differences of A364914.
Strict partitions: A116861, A364272, A364349, A364350, A364839, A364916.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]], MemberQ[#,n]&&Intersection[#, Total/@Subsets[#, {2,Length[#]}]]!={}&]],{n,0,10}]

Formula

a(n) = 2^(n-1) - A365070(n).
First differences of A364534.

A365068 Number of integer partitions of n with some part that can be written as a nonnegative linear combination of the other distinct parts.

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 7, 10, 16, 23, 34, 44, 67, 85, 119, 157, 210, 268, 360, 453, 592, 748, 956, 1195, 1520, 1883, 2365, 2920, 3628, 4451, 5494, 6702, 8211, 9976, 12147, 14666, 17776, 21389, 25774, 30887, 37035, 44224, 52819, 62836, 74753, 88614, 105062, 124160
Offset: 0

Views

Author

Gus Wiseman, Aug 27 2023

Keywords

Comments

These may be called "non-binary nonnegative combination-full" partitions.
Does not necessarily include all non-strict partitions (A047967).

Examples

			The partition (5,4,3,3) has no part that can be written as a nonnegative linear combination of the others, so is not counted under a(15).
The partition (6,4,3,2) has 6 = 1*2 + 1*4, so is counted under a(15). The combinations 6 = 2*3 = 3*2 and 4 = 2*2 can also be used.
The a(3) = 1 through a(8) = 16 partitions:
  (21)  (31)   (41)    (42)     (61)      (62)
        (211)  (221)   (51)     (331)     (71)
               (311)   (321)    (421)     (422)
               (2111)  (411)    (511)     (431)
                       (2211)   (2221)    (521)
                       (3111)   (3211)    (611)
                       (21111)  (4111)    (3221)
                                (22111)   (3311)
                                (31111)   (4211)
                                (211111)  (5111)
                                          (22211)
                                          (32111)
                                          (41111)
                                          (221111)
                                          (311111)
                                          (2111111)
		

Crossrefs

The complement for sums instead of combinations is A237667, binary A236912.
For sums instead of combinations we have A237668, binary A237113.
The strict case is A364839, complement A364350.
Allowing equal parts in the combination gives A364913.
For subsets instead of partitions we have A364914, complement A326083.
The complement is A364915.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A116861 and A364916 count linear combinations of strict partitions.
A323092 counts double-free partitions, ranks A320340.
A364912 counts linear combinations of partitions of k.

Programs

  • Mathematica
    combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]}, Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[IntegerPartitions[n], Function[ptn,Or@@Table[combs[ptn[[k]], DeleteCases[ptn,ptn[[k]]]]!={}, {k,Length[ptn]}]]]],{n,0,5}]
  • Python
    from sympy.utilities.iterables import partitions
    def A365068(n):
        if n <= 1: return 0
        alist, c = [set(tuple(sorted(set(p))) for p in partitions(i)) for i in range(n)], 0
        for p in partitions(n,k=n-1):
            s = set(p)
            if any(set(t).issubset(s-{q}) for q in s for t in alist[q]):
                c += 1
        return c # Chai Wah Wu, Sep 20 2023

Extensions

a(31)-a(47) from Chai Wah Wu, Sep 20 2023

A365071 Number of subsets of {1..n} containing n such that no element is a sum of distinct other elements. A variation of non-binary sum-free subsets without re-usable elements.

Original entry on oeis.org

0, 1, 2, 3, 6, 9, 15, 23, 40, 55, 94, 132, 210, 298, 476, 644, 1038, 1406, 2149, 2965, 4584, 6077, 9426, 12648, 19067, 25739, 38958, 51514, 78459, 104265, 155436, 208329, 312791, 411886, 620780, 823785, 1224414, 1631815, 2437015, 3217077, 4822991
Offset: 0

Views

Author

Gus Wiseman, Aug 26 2023

Keywords

Comments

The complement is counted by A365069. The binary version is A364755, complement A364756. For re-usable parts we have A288728, complement A365070.

Examples

			The subset {1,3,4,6} has 4 = 1 + 3 so is not counted under a(6).
The subset {2,3,4,5,6} has 6 = 2 + 4 and 4 = 1 + 3 so is not counted under a(6).
The a(0) = 0 through a(6) = 15 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}
                                          {3,4,5,6}
		

Crossrefs

First differences of A151897.
The version with re-usable parts is A288728 first differences of A007865.
The binary version is A364755, first differences of A085489.
The binary complement is A364756, first differences of A088809.
The complement is counted by A365069, first differences of A364534.
The complement w/ re-usable parts is A365070, first differences of A093971.
A108917 counts knapsack partitions, strict A275972.
A124506 counts combination-free subsets, differences of A326083.
A364350 counts combination-free strict partitions, complement A364839.
A365046 counts combination-full subsets, differences of A364914.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]], MemberQ[#,n]&&Intersection[#, Total/@Subsets[#,{2,Length[#]}]]=={}&]], {n,0,10}]

Formula

a(n) + A365069(n) = 2^(n-1).
First differences of A151897.

Extensions

a(14) onwards added (using A151897) by Andrew Howroyd, Jan 13 2024

A365382 Number of relatively prime integer partitions with sum < n that cannot be linearly combined using nonnegative coefficients to obtain n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 4, 2, 4, 12, 8, 20, 11, 14, 26, 43, 19, 38, 53, 51, 48, 101, 48, 124, 96, 121, 159, 134, 103, 241, 261, 244, 175, 401, 229, 488, 358, 328
Offset: 0

Views

Author

Gus Wiseman, Sep 08 2023

Keywords

Examples

			The a(11) = 2 through a(18) = 8 partitions:
  (5,4)  .  (6,5)  (6,5)   (7,6)  (7,5)   (7,4)     (7,5)
  (7,3)     (7,4)  (8,5)   (9,4)  (7,6)   (7,6)     (8,7)
            (7,5)  (9,4)          (9,5)   (8,5)     (10,7)
            (8,3)  (10,3)         (11,3)  (8,7)     (11,4)
                                          (9,5)     (11,5)
                                          (9,7)     (12,5)
                                          (10,3)    (13,4)
                                          (11,4)    (7,5,5)
                                          (11,5)
                                          (13,3)
                                          (7,4,4)
                                          (10,3,3)
		

Crossrefs

Relatively prime partitions are counted by A000837, ranks A289509.
This is the relatively prime case of A365378.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A116861 and A364916 count linear combinations of strict partitions.
A364350 counts combination-free strict partitions, non-strict A364915.
A364839 counts combination-full strict partitions, non-strict A364913.

Programs

  • Mathematica
    combsu[n_,y_]:=With[{s=Table[{k,i},{k,Union[y]},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Join@@IntegerPartitions/@Range[n-1],GCD@@#==1&&combsu[n,#]=={}&]],{n,0,20}]
  • Python
    from math import gcd
    from sympy.utilities.iterables import partitions
    def A365382(n):
        a = {tuple(sorted(set(p))) for p in partitions(n)}
        return sum(1 for m in range(1,n) for b in partitions(m) if gcd(*b.keys()) == 1 and not any(set(d).issubset(set(b)) for d in a)) # Chai Wah Wu, Sep 13 2023

Extensions

a(21)-a(45) from Chai Wah Wu, Sep 13 2023

A365072 Number of integer partitions of n such that no distinct part can be written as a (strictly) positive linear combination of the other distinct parts.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 5, 6, 8, 9, 17, 15, 31, 34, 53, 65, 109, 117, 196, 224, 328, 405, 586, 673, 968, 1163, 1555, 1889, 2531, 2986, 3969, 4744, 6073, 7333, 9317, 11053, 14011, 16710, 20702, 24714, 30549, 36127, 44413, 52561, 63786, 75583, 91377, 107436, 129463
Offset: 0

Views

Author

Gus Wiseman, Aug 31 2023

Keywords

Comments

We consider (for example) that 2x + y + 3z is a positive linear combination of (x,y,z), but 2x + y is not, as the coefficient of z is 0.

Examples

			The a(1) = 1 through a(8) = 6 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (32)     (33)      (43)       (44)
                    (1111)  (11111)  (222)     (52)       (53)
                                     (111111)  (322)      (332)
                                               (1111111)  (2222)
                                                          (11111111)
The a(11) = 17 partitions:
  (11)  (9,2)  (7,2,2)  (5,3,2,1)  (4,3,2,1,1)  (1,1,1,1,1,1,1,1,1,1,1)
        (8,3)  (6,3,2)  (5,2,2,2)  (3,2,2,2,2)
        (7,4)  (5,4,2)  (4,3,2,2)
        (6,5)  (5,3,3)  (3,3,3,2)
               (4,4,3)
		

Crossrefs

The nonnegative version is A364915, strict A364350.
The strict case is A365006.
For subsets instead of partitions we have A365044, complement A365043.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A116861 and A364916 count linear combinations of strict partitions.
A237667 counts sum-free partitions, binary A236912.
A364912 counts positive linear combinations of partitions.
A365068 counts combination-full partitions, strict A364839.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]}, Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Union/@IntegerPartitions[n], Function[ptn,!Or@@Table[combp[ptn[[k]],Delete[ptn,k]]!={}, {k,Length[ptn]}]]@*Union]],{n,0,15}]
  • Python
    from sympy.utilities.iterables import partitions
    def A365072(n):
        if n <= 1: return 1
        alist = [set(tuple(sorted(set(p))) for p in partitions(i)) for i in range(n)]
        c = 1
        for p in partitions(n,k=n-1):
            s = set(p)
            for q in s:
                if tuple(sorted(s-{q})) in alist[q]:
                    break
            else:
                c += 1
        return c # Chai Wah Wu, Sep 20 2023

Extensions

a(31)-a(49) from Chai Wah Wu, Sep 20 2023

A365323 Number of integer partitions with sum < n whose distinct parts cannot be linearly combined using all positive coefficients to obtain n.

Original entry on oeis.org

0, 0, 1, 1, 4, 3, 9, 7, 15, 16, 29, 23, 47, 43, 74, 65, 114, 100, 174, 153, 257, 228, 368, 312, 530, 454, 736, 645, 1025, 902, 1402, 1184, 1909, 1626, 2618, 2184, 3412, 2895, 4551, 3887, 5966, 5055, 7796, 6509, 10244, 8462, 13060, 10881, 16834, 14021, 21471
Offset: 1

Views

Author

Gus Wiseman, Sep 12 2023

Keywords

Examples

			The partition y = (3,3,2) has distinct parts {2,3}, and we have 9 = 3*2 + 1*3, so y is not counted under a(9).
The a(3) = 1 through a(10) = 16 partitions:
  (2)  (3)  (2)    (4)    (2)      (3)    (2)        (3)
            (3)    (5)    (3)      (5)    (4)        (4)
            (4)    (3,2)  (4)      (6)    (5)        (6)
            (2,2)         (5)      (7)    (6)        (7)
                          (6)      (3,3)  (7)        (8)
                          (2,2)    (4,3)  (8)        (9)
                          (3,3)    (5,2)  (2,2)      (3,3)
                          (4,2)           (4,2)      (4,4)
                          (2,2,2)         (4,3)      (5,2)
                                          (4,4)      (5,3)
                                          (5,3)      (5,4)
                                          (6,2)      (6,3)
                                          (2,2,2)    (7,2)
                                          (4,2,2)    (3,3,3)
                                          (2,2,2,2)  (4,3,2)
                                                     (5,2,2)
		

Crossrefs

Complement for subsets: A088314 or A365042, nonnegative A365073 or A365542.
For strict partitions we have A088528, nonnegative coefficients A365312.
For length-2 subsets we have A365321 (we use n instead of n-1).
For subsets we have A365322 or A365045, nonnegative coefficients A365380.
For nonnegative coefficients we have A365378, complement A365379.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A116861 and A364916 count linear combinations of strict partitions.
A364350 counts combination-free strict partitions, non-strict A364915.
A364839 counts combination-full strict partitions, non-strict A364913.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Join@@IntegerPartitions/@Range[n-1],combp[n,Union[#]]=={}&]],{n,10}]
  • Python
    from sympy.utilities.iterables import partitions
    def A365323(n):
        a = {tuple(sorted(set(p))) for p in partitions(n)}
        return sum(1 for k in range(1,n) for d in partitions(k) if tuple(sorted(set(d))) not in a) # Chai Wah Wu, Sep 12 2023

Extensions

a(21)-a(51) from Chai Wah Wu, Sep 12 2023

A365383 Triangle read by rows where T(n,k) is the number of integer partitions of n that can be linearly combined with nonnegative coefficients to obtain k.

Original entry on oeis.org

1, 2, 1, 3, 2, 2, 5, 3, 4, 3, 7, 5, 6, 6, 6, 11, 7, 9, 8, 9, 7, 15, 11, 13, 13, 14, 13, 14, 22, 15, 19, 17, 20, 17, 20, 16, 30, 22, 26, 26, 27, 26, 28, 26, 27, 42, 30, 37, 34, 39, 33, 40, 34, 39, 34, 56, 42, 50, 49, 52, 50, 54, 51, 54, 53, 53
Offset: 0

Views

Author

Gus Wiseman, Sep 08 2023

Keywords

Comments

Conjecture: The rows eventually become periodic with period n if extended further. For example, row n = 8 begins:
22, 15, 19, 17, 20, 17, 20, 16,
22, 17, 20, 17, 21, 17, 20, 17,
22, 17, 20, 17, 21, 17, 20, 17, ...

Examples

			Triangle begins:
   1
   2   1
   3   2   2
   5   3   4   3
   7   5   6   6   6
  11   7   9   8   9   7
  15  11  13  13  14  13  14
  22  15  19  17  20  17  20  16
  30  22  26  26  27  26  28  26  27
  42  30  37  34  39  33  40  34  39  34
  56  42  50  49  52  50  54  51  54  53  53
  77  56  68  64  71  63  73  63  71  65  70  62
 101  77  91  89  95  90  97  93  97  97  98  94  99
 135 101 122 115 127 115 130 114 131 119 130 117 132 116
 176 135 159 156 165 157 170 161 167 168 166 165 172 164 166
Row n = 6 counts the following partitions:
  (6)       (51)      (51)      (51)      (51)      (51)
  (51)      (411)     (42)      (411)     (42)      (411)
  (42)      (321)     (411)     (33)      (411)     (321)
  (411)     (3111)    (321)     (321)     (321)     (3111)
  (33)      (2211)    (3111)    (3111)    (3111)    (2211)
  (321)     (21111)   (222)     (2211)    (222)     (21111)
  (3111)    (111111)  (2211)    (21111)   (2211)    (111111)
  (222)               (21111)   (111111)  (21111)
  (2211)              (111111)            (111111)
  (21111)
  (111111)
		

Crossrefs

Column k = 0 is A000041, strict A000009.
The version for subsets is A365381, main diagonal A365376.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A116861 and A364916 count linear combinations of strict partitions.
A364350 counts combination-free strict partitions, non-strict A364915.
A364839 counts combination-full strict partitions, non-strict A364913.

Programs

  • Mathematica
    combu[n_,y_]:=With[{s=Table[{k,i},{k,Union[y]},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[IntegerPartitions[n],combu[k,#]!={}&]],{n,0,12},{k,0,n-1}]
Previous Showing 21-30 of 31 results. Next