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

A364913 Number of integer partitions of n having a part that can be written as a nonnegative linear combination of the other (possibly equal) parts.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 10, 12, 20, 27, 39, 51, 74, 95, 130, 169, 225, 288, 378, 479, 617, 778, 990, 1239, 1560, 1938, 2419, 2986, 3696, 4538, 5575, 6810, 8319, 10102, 12274, 14834, 17932, 21587, 25963, 31120, 37275, 44513, 53097, 63181, 75092, 89030, 105460, 124647
Offset: 0

Views

Author

Gus Wiseman, Aug 20 2023

Keywords

Comments

Includes all non-strict partitions (A047967).

Examples

			The a(0) = 0 through a(7) = 12 partitions:
  .  .  (11)  (21)   (22)    (41)     (33)      (61)
              (111)  (31)    (221)    (42)      (322)
                     (211)   (311)    (51)      (331)
                     (1111)  (2111)   (222)     (421)
                             (11111)  (321)     (511)
                                      (411)     (2221)
                                      (2211)    (3211)
                                      (3111)    (4111)
                                      (21111)   (22111)
                                      (111111)  (31111)
                                                (211111)
                                                (1111111)
The partition (5,4,3) has no part that can be written as a nonnegative linear combination of the others, so is not counted under a(12).
The partition (6,4,3,2) has 6 = 4+2, or 6 = 3+3, or 6 = 2+2+2, or 4 = 2+2, so is counted under a(15).
		

Crossrefs

The strict case is A364839.
For sums instead of combinations we have A364272, binary A364670.
The complement in strict partitions is A364350.
For subsets instead of partitions we have A364914, complement A326083.
Allowing equal parts gives A365068, complement A364915.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A116861 and A364916 count linear combinations of strict partitions.
A365006 = no strict partitions w/ pos linear combination.

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],!UnsameQ@@#||Or@@Table[combs[#[[k]],Delete[#,k]]!={},{k,Length[#]}]&]],{n,0,15}]

Formula

a(n) + A364915(n) = A000041(n).

A364915 Number of integer partitions of n such that no distinct part can be written as a nonnegative linear combination of other distinct parts.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 8, 12, 10, 16, 16, 19, 21, 29, 25, 37, 35, 44, 46, 60, 55, 75, 71, 90, 90, 114, 110, 140, 138, 167, 163, 217, 201, 248, 241, 298, 303, 359, 355, 425, 422, 520, 496, 594, 603, 715, 706, 834, 826, 968, 972, 1153, 1147, 1334, 1315, 1530
Offset: 0

Views

Author

Gus Wiseman, Aug 22 2023

Keywords

Examples

			The a(1) = 1 through a(10) = 8 partitions (A=10):
  1  2   3    4     5      6       7        8         9          A
     11  111  22    32     33      43       44        54         55
              1111  11111  222     52       53        72         64
                           111111  322      332       333        73
                                   1111111  2222      522        433
                                            11111111  3222       3322
                                                      111111111  22222
                                                                 1111111111
The partition (5,4,3) has no part that can be written as a nonnegative linear combination of the others, so is counted under a(12).
The partition (6,4,3,2) has 6=4+2, or 6=3+3, or 6=2+2+2, or 4=2+2, so is not counted under a(15).
		

Crossrefs

For sums instead of combinations we have A237667, binary A236912.
For subsets instead of partitions we have A326083, complement A364914.
The strict case is A364350.
The complement is A365068, strict A364839.
The positive case is A365072, strict A365006.
A000041 counts integer partitions, strict A000009.
A007865 counts binary sum-free sets w/ re-usable parts, complement A093971.
A008284 counts partitions by length, strict A008289.
A116861 and A364916 count linear combinations of strict partitions.
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]],Delete[ptn,k]]!={}, {k,Length[ptn]}]]@*Union]], {n,0,15}]
  • Python
    from sympy.utilities.iterables import partitions
    def A364915(n):
        if n <= 1: return 1
        alist, c = [set(tuple(sorted(set(p))) for p in partitions(i)) for i in range(n)], 1
        for p in partitions(n,k=n-1):
            s = set(p)
            if not any(set(t).issubset(s-{q}) for q in s for t in alist[q]):
                c += 1
        return c # Chai Wah Wu, Sep 23 2023

Formula

a(n) = A000041(n) - A365068(n).

Extensions

a(37)-a(59) from Chai Wah Wu, Sep 25 2023

A365006 Number of strict integer partitions of n such that no part can be written as a (strictly) positive linear combination of the others.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 2, 4, 4, 8, 4, 11, 9, 16, 14, 25, 20, 37, 31, 49, 47, 73, 64, 101, 96, 135, 133, 190, 181, 256, 253, 336, 342, 453, 452, 596, 609, 771, 803, 1014, 1041, 1309, 1362, 1674, 1760, 2151, 2249, 2736, 2884, 3449, 3661, 4366, 4615, 5486, 5825
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(8) = 2 through a(13) = 11 partitions:
  (8)    (9)      (10)       (11)       (12)       (13)
  (5,3)  (5,4)    (6,4)      (6,5)      (7,5)      (7,6)
         (7,2)    (7,3)      (7,4)      (5,4,3)    (8,5)
         (4,3,2)  (4,3,2,1)  (8,3)      (5,4,2,1)  (9,4)
                             (9,2)                 (10,3)
                             (5,4,2)               (11,2)
                             (6,3,2)               (6,4,3)
                             (5,3,2,1)             (6,5,2)
                                                   (7,4,2)
                                                   (5,4,3,1)
                                                   (6,4,2,1)
		

Crossrefs

The nonnegative version for subsets appears to be A124506.
For sums instead of combinations we have A364349, binary A364533.
The nonnegative version is A364350, complement A364839.
For subsets instead of partitions we have A365044, complement A365043.
The non-strict version is A365072, nonnegative A364915.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A116861 and A364916 count linear combinations of strict partitions.
A364912 counts linear combinations of partitions of k.

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[IntegerPartitions[n],UnsameQ@@#&&And@@Table[combp[#[[k]],Delete[#,k]]=={},{k,Length[#]}]&]],{n,0,30}]
  • Python
    from sympy.utilities.iterables import partitions
    def A365006(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):
            if max(p.values()) == 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(56) from Chai Wah Wu, Sep 20 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
Showing 1-4 of 4 results.