A367221
Number of strict integer partitions of n whose length (number of parts) cannot be written as a nonnegative linear combination of the parts.
Original entry on oeis.org
0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 5, 5, 7, 7, 10, 10, 13, 14, 17, 18, 23, 24, 29, 32, 37, 41, 49, 54, 63, 72, 82, 93, 108, 122, 139, 159, 180, 204, 231, 261, 293, 331, 370, 415, 464, 518, 575, 641, 710, 789, 871, 965, 1064, 1177, 1294, 1428, 1569, 1729, 1897
Offset: 0
The a(2) = 1 through a(16) = 10 strict partitions (A..G = 10..16):
2 3 4 5 6 7 8 9 A B C D E F G
43 53 54 64 65 75 76 86 87 97
63 73 74 84 85 95 96 A6
83 93 94 A4 A5 B5
542 642 A3 B3 B4 C4
652 752 C3 D3
742 842 654 754
762 862
852 952
942 A42
The following sequences count and rank integer partitions and finite sets according to whether their length is a subset-sum or linear combination of the parts. The current sequence is starred.
sum-full sum-free comb-full comb-free
-------------------------------------------
A124506 appears to count combination-free subsets, differences of
A326083.
A240855 counts strict partitions whose length is a part, complement
A240861.
Triangles:
A046663 counts partitions of n without a subset-sum k, strict
A365663.
A365541 counts subsets containing two distinct elements summing to k.
-
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@@#&&combs[Length[#], Union[#]]=={}&]], {n,0,30}]
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
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).
For subsets instead of partitions we have
A326083, complement
A364914.
A007865 counts binary sum-free sets w/ re-usable parts, complement
A093971.
A364912 counts linear combinations of partitions of k.
-
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}]
-
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
A364755
Number of subsets of {1..n} containing n but not containing the sum of any two distinct elements.
Original entry on oeis.org
0, 1, 2, 3, 6, 9, 15, 24, 41, 60, 99, 149, 236, 355, 552, 817, 1275, 1870, 2788, 4167, 6243, 9098, 13433, 19718, 28771, 42137, 60652, 88603, 127555, 185200, 261781, 382931, 541022, 783862, 1096608, 1595829, 2217467, 3223064, 4441073, 6465800, 8893694
Offset: 0
The subset S = {1,3,6,8} has pair-sums {4,7,9,11,14}, which are disjoint from S, so it is counted under a(8).
The a(1) = 1 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}
With re-usable parts we have
A288728.
The complement with n is counted by
A364756, first differences of
A088809.
Cf.
A007865,
A050291,
A054519,
A093971,
A151897,
A236912,
A326020,
A326080,
A326083,
A364272,
A364349,
A364533.
-
Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Intersection[#,Total/@Subsets[#,{2}]]=={}&]],{n,0,10}]
A364670
Number of strict integer partitions of n with a part equal to the sum of two distinct others. A variation of sum-full strict partitions.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1, 4, 3, 7, 6, 10, 10, 14, 16, 24, 25, 34, 39, 48, 59, 71, 81, 103, 120, 136, 166, 194, 226, 260, 312, 353, 419, 473, 557, 636, 742, 824, 974, 1097, 1266, 1418, 1646, 1837, 2124, 2356, 2717, 3029, 3469, 3830, 4383, 4884, 5547
Offset: 0
The a(6) = 1 through a(16) = 10 strict partitions (A = 10):
321 . 431 . 532 5321 642 5431 743 6432 853
541 651 6421 752 6531 862
4321 5421 7321 761 7431 871
6321 5432 7521 6532
6431 9321 6541
6521 54321 7432
8321 7621
8431
A321
64321
-
Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&Intersection[#, Total/@Subsets[#,{2}]]!={}&]],{n,0,30}]
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
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)
The nonnegative version for subsets appears to be
A124506.
For subsets instead of partitions we have
A365044, complement
A365043.
A364912 counts linear combinations of partitions of k.
-
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}]
-
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
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
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}
The complement w/o re-usable parts is
A085489, first differences of
A364755.
The case without re-usable parts is
A364756, firsts differences of
A088809.
A364350 counts combination-free strict partitions, complement
A364839.
A364913 counts combination-full partitions.
A365006 counts no positive combination-full strict ptns.
-
Table[Length[Select[Subsets[Range[n]], MemberQ[#,n]&&Intersection[#,Total /@ Tuples[#,2]]!={}&]], {n,0,10}]
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
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}
The version with re-usable parts is
A288728 first differences of
A007865.
The complement w/ re-usable parts is
A365070, first differences of
A093971.
A364350 counts combination-free strict partitions, complement
A364839.
-
Table[Length[Select[Subsets[Range[n]], MemberQ[#,n]&&Intersection[#, Total/@Subsets[#,{2,Length[#]}]]=={}&]], {n,0,10}]
Comments