A088314
Cardinality of set of sets of parts of all partitions of n.
Original entry on oeis.org
1, 1, 2, 3, 5, 6, 10, 12, 18, 22, 30, 37, 51, 61, 79, 96, 124, 148, 186, 222, 275, 326, 400, 473, 575, 673, 811, 946, 1132, 1317, 1558, 1813, 2138, 2463, 2893, 3323, 3882, 4461, 5177, 5917, 6847, 7818, 8994, 10251, 11766, 13334, 15281, 17309, 19732, 22307
Offset: 0
The 7 partitions of 5 and their sets of parts are
[ #] partition set of parts
[ 1] [ 1 1 1 1 1 ] {1}
[ 2] [ 2 1 1 1 ] {1, 2}
[ 3] [ 2 2 1 ] {1, 2} (same as before)
[ 4] [ 3 1 1 ] {1, 3}
[ 5] [ 3 2 ] {2, 3}
[ 6] [ 4 1 ] {1, 4}
[ 7] [ 5 ] {5}
so we have a(5) = |{{1}, {1, 2}, {1, 3}, {2, 3}, {1, 4}, {5}}| = 6.
-
a066186 = sum . concat . ps 1 where
ps _ 0 = [[]]
ps i j = [t:ts | t <- [i..j], ts <- ps t (j - t)]
-- Reinhard Zumkeller, Jul 13 2013
-
list2set := L -> {op(L)};
a:= N -> list2set(map( list2set, combinat[partition](N) ));
seq(nops(a(n)), n=0..30);
# Yogy Namara (yogy.namara(AT)gmail.com), Jan 13 2010
b:= proc(n, i) option remember; `if`(n=0, {{}}, `if`(i<1, {},
{b(n, i-1)[], seq(map(x->{x[],i}, b(n-i*j, i-1))[], j=1..n/i)}))
end:
a:= n-> nops(b(n, n)):
seq(a(n), n=0..40);
# Alois P. Heinz, Aug 09 2012
-
Table[Length[Union[Map[Union,IntegerPartitions[n]]]],{n,1,30}] (* Geoffrey Critzer, Feb 19 2013 *)
(* Second program: *)
b[n_, i_] := b[n, i] = If[n == 0, {{}}, If[i < 1, {},
Union@Flatten@{b[n, i - 1], Table[If[Head[#] == List,
Append[#, i]]& /@ b[n - i*j, i - 1], {j, 1, n/i}]}]];
a[n_] := Length[b[n, n]];
a /@ Range[0, 40] (* Jean-François Alcover, Jun 04 2021, after Alois P. Heinz *)
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@@Array[IntegerPartitions,n], UnsameQ@@#&&combp[n,#]!={}&]], {n,0,15}] (* Gus Wiseman, Sep 11 2023 *)
-
from sympy.utilities.iterables import partitions
def A088314(n): return len({tuple(sorted(set(p))) for p in partitions(n)}) # Chai Wah Wu, Sep 10 2023
A365380
Number of subsets of {1..n} that cannot be linearly combined using nonnegative coefficients to obtain n.
Original entry on oeis.org
1, 1, 2, 2, 6, 4, 16, 12, 32, 32, 104, 48, 256, 208, 448, 448, 1568, 896, 3840, 2368, 6912, 7680, 22912, 10752, 50688, 44800, 104448, 88064, 324096, 165888, 780288, 541696, 1458176, 1519616, 4044800, 2220032, 10838016, 8744960, 20250624, 16433152, 62267392, 34865152
Offset: 1
The set {4,5,6} cannot be linearly combined to obtain 7 so is counted under a(7), but we have 8 = 2*4 + 0*5 + 0*6, so it is not counted under a(8).
The a(1) = 1 through a(8) = 12 subsets:
{} {} {} {} {} {} {} {}
{2} {3} {2} {4} {2} {3}
{3} {5} {3} {5}
{4} {4,5} {4} {6}
{2,4} {5} {7}
{3,4} {6} {3,6}
{2,4} {3,7}
{2,6} {5,6}
{3,5} {5,7}
{3,6} {6,7}
{4,5} {3,6,7}
{4,6} {5,6,7}
{5,6}
{2,4,6}
{3,5,6}
{4,5,6}
A124506 appears to count combination-free subsets, differences of
A326083.
A365046 counts combination-full subsets, first differences of
A364914.
-
combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Select[Subsets[Range[n-1]],combs[n,#]=={}&]],{n,5}]
A365312
Number of strict integer partitions with sum <= n that cannot be linearly combined using nonnegative coefficients to obtain n.
Original entry on oeis.org
0, 0, 0, 1, 1, 3, 2, 6, 4, 8, 7, 16, 6, 24, 17, 24, 20, 46, 22, 62, 31, 63, 57, 106, 35, 122, 90, 137, 88, 212, 74, 262, 134, 267, 206, 345, 121, 476, 294, 484, 232, 698, 242, 837, 389, 763, 571, 1185, 318, 1327, 634, 1392, 727, 1927, 640, 2056, 827, 2233, 1328
Offset: 0
The strict partition (7,3,2) has 19 = 1*7 + 2*3 + 3*2 so is not counted under a(19).
The strict partition (9,6,3) cannot be linearly combined to obtain 19, so is counted under a(19).
The a(0) = 0 through a(11) = 16 strict partitions:
. . . (2) (3) (2) (4) (2) (3) (2) (3) (2)
(3) (5) (3) (5) (4) (4) (3)
(4) (4) (6) (5) (6) (4)
(5) (7) (6) (7) (5)
(6) (7) (8) (6)
(4,2) (8) (9) (7)
(4,2) (6,3) (8)
(6,2) (9)
(10)
(4,2)
(5,4)
(6,2)
(6,3)
(6,4)
(7,3)
(8,2)
The complement for positive coefficients is counted by
A088314.
For positive coefficients we have
A088528.
The complement is counted by
A365311.
A364350 counts combination-free strict partitions, non-strict
A364915.
A364839 counts combination-full strict partitions, non-strict
A364913.
Cf.
A093971,
A237113,
A237668,
A326080,
A363225,
A364272,
A364534,
A364914,
A365043,
A365314,
A365320.
-
combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Select[Select[Join@@Array[IntegerPartitions,n], UnsameQ@@#&],combs[n,#]=={}&]],{n,0,10}]
-
from math import isqrt
from sympy.utilities.iterables import partitions
def A365312(n):
a = {tuple(sorted(set(p))) for p in partitions(n)}
return sum(1 for m in range(1,n+1) for b in partitions(m,m=isqrt(1+(n<<3))>>1) if max(b.values()) == 1 and not any(set(d).issubset(set(b)) for d in a)) # Chai Wah Wu, Sep 13 2023
A365311
Number of strict integer partitions with sum <= n that can be linearly combined using nonnegative coefficients to obtain n.
Original entry on oeis.org
0, 1, 2, 3, 5, 6, 11, 12, 20, 24, 35, 38, 63, 63, 92, 112, 148, 160, 230, 244, 339, 383, 478, 533, 726, 781, 978, 1123, 1394, 1526, 1960, 2112, 2630, 2945, 3518, 3964, 4856, 5261, 6307, 7099, 8464, 9258, 11140, 12155, 14419, 16093, 18589, 20565, 24342, 26597, 30948
Offset: 0
The strict partition (6,3) cannot be linearly combined to obtain 10, so is not counted under a(10).
The strict partition (4,2) has 6 = 1*4 + 1*2 so is counted under a(6), but (4,2) cannot be linearly combined to obtain 7 so is not counted under a(7).
The a(1) = 1 through a(7) = 12 strict partitions:
(1) (1) (1) (1) (1) (1) (1)
(2) (3) (2) (5) (2) (7)
(2,1) (4) (2,1) (3) (2,1)
(2,1) (3,1) (6) (3,1)
(3,1) (3,2) (2,1) (3,2)
(4,1) (3,1) (4,1)
(3,2) (4,3)
(4,1) (5,1)
(4,2) (5,2)
(5,1) (6,1)
(3,2,1) (3,2,1)
(4,2,1)
For positive coefficients we have
A088314.
The positive complement is counted by
A088528.
The version for subsets is
A365073.
The complement is counted by
A365312.
For non-strict partitions we have
A365379.
A364350 counts combination-free strict partitions, non-strict
A364915.
A364839 counts combination-full strict partitions, non-strict
A364913.
Cf.
A093971,
A237113,
A237668,
A326080,
A363225,
A364272,
A364534,
A364914,
A365043,
A365314,
A365320.
-
combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Select[Select[Join@@Array[IntegerPartitions,n],UnsameQ@@#&],combs[n,#]!={}&]],{n,10}]
-
from math import isqrt
from sympy.utilities.iterables import partitions
def A365311(n):
a = {tuple(sorted(set(p))) for p in partitions(n)}
return sum(1 for m in range(1,n+1) for b in partitions(m,m=isqrt(1+(n<<3))>>1) if max(b.values()) == 1 and any(set(d).issubset(set(b)) for d in a)) # Chai Wah Wu, Sep 13 2023
A365322
Number of subsets of {1..n} that cannot be linearly combined using positive coefficients to obtain n.
Original entry on oeis.org
0, 1, 2, 5, 11, 26, 54, 116, 238, 490, 994, 2011, 4045, 8131, 16305, 32672, 65412, 130924, 261958, 524066, 1048301, 2096826, 4193904, 8388135, 16776641, 33553759, 67108053, 134216782, 268434324, 536869595, 1073740266, 2147481835, 4294965158, 8589932129
Offset: 0
The set {1,3} has 4 = 1 + 3 so is not counted under a(4). However, 3 cannot be written as a linear combination of {1,3} using all positive coefficients, so it is counted under a(3).
The a(1) = 1 through a(4) = 11 subsets:
{} {} {} {}
{1,2} {2} {3}
{1,3} {1,4}
{2,3} {2,3}
{1,2,3} {2,4}
{3,4}
{1,2,3}
{1,2,4}
{1,3,4}
{2,3,4}
{1,2,3,4}
The complement is counted by
A088314.
The version for strict partitions is
A088528.
For nonnegative coefficients we have
A365380.
A085489 and
A364755 count subsets without the sum of two distinct elements.
A124506 appears to count combination-free subsets, differences of
A326083.
A364350 counts combination-free strict partitions, non-strict
A364915.
A365046 counts combination-full subsets, first differences of
A364914.
-
b:= proc(n, i) option remember; `if`(n=0, {{}}, `if`(i<1, {},
{b(n, i-1)[], seq(map(x->{x[], i}, b(n-i*j, i-1))[], j=1..n/i)}))
end:
a:= n-> 2^n-nops(b(n$2)):
seq(a(n), n=0..33); # Alois P. Heinz, Sep 04 2023
-
cpu[n_,y_]:=With[{s=Table[{k,i},{k,Union[y]},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Select[Subsets[Range[n]],cpu[n,#]=={}&]],{n,0,10}]
-
from sympy.utilities.iterables import partitions
def A365322(n): return (1<Chai Wah Wu, Sep 14 2023
A365378
Number of integer partitions with sum < n whose distinct parts cannot be linearly combined using nonnegative coefficients to obtain n.
Original entry on oeis.org
0, 0, 0, 1, 1, 4, 2, 9, 5, 13, 10, 28, 7, 45, 25, 51, 32, 101, 31, 148, 50, 166, 106, 291, 47, 374, 176, 450, 179, 721, 121, 963, 285, 1080, 474, 1534, 200, 2140, 712, 2407, 599, 3539, 481, 4546, 1014, 4885
Offset: 0
The partition (5,2,2) has distinct parts {2,5} and has 11 = 3*2 + 1*5, so is not counted under a(11).
The partition (4,2,2) cannot be linearly combined to obtain 9, so is counted under a(9).
The partition (4,2,2) has distinct parts {2,4} and has 10 = 5*2 + 0*4, so is not counted under a(10).
The a(3) = 1 through a(10) = 10 partitions:
(2) (3) (2) (4) (2) (3) (2) (3)
(3) (5) (3) (5) (4) (4)
(4) (4) (6) (5) (6)
(22) (5) (7) (6) (7)
(6) (33) (7) (8)
(22) (8) (9)
(33) (22) (33)
(42) (42) (44)
(222) (44) (63)
(62) (333)
(222)
(422)
(2222)
For positive coefficients we have
A365323.
The complement is counted by
A365379.
The relatively prime case is
A365382.
A364350 counts combination-free strict partitions, non-strict
A364915.
A364839 counts combination-full strict partitions, non-strict
A364913.
-
combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Select[Join@@IntegerPartitions/@Range[n-1],combs[n,Union[#]]=={}&]],{n,0,10}]
-
from sympy.utilities.iterables import partitions
def A365378(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 not any(set(d).issubset(set(b)) for d in a)) # Chai Wah Wu, Sep 13 2023
A365321
Number of pairs of distinct positive integers <= n that cannot be linearly combined with positive coefficients to obtain n.
Original entry on oeis.org
0, 0, 1, 2, 4, 6, 10, 13, 18, 24, 30, 37, 46, 54, 63, 77, 85, 99, 111, 127, 141, 161, 171, 194, 210, 235, 246, 277, 293, 322, 342, 372, 389, 428, 441, 491, 504, 545, 561, 612, 635, 680, 701, 753, 773, 836, 846, 911, 932, 1000, 1017, 1082, 1103, 1176, 1193
Offset: 0
For the pair p = (2,3) we have 4 = 2*2 + 0*3, so p is not counted under A365320(4), but it is not possible to write 4 as a positive linear combination of 2 and 3, so p is counted under a(4).
The a(2) = 1 through a(7) = 13 pairs:
(1,2) (1,3) (1,4) (1,5) (1,6) (1,7)
(2,3) (2,3) (2,4) (2,3) (2,4)
(2,4) (2,5) (2,5) (2,6)
(3,4) (3,4) (2,6) (2,7)
(3,5) (3,4) (3,5)
(4,5) (3,5) (3,6)
(3,6) (3,7)
(4,5) (4,5)
(4,6) (4,6)
(5,6) (4,7)
(5,6)
(5,7)
(6,7)
For all subsets instead of just pairs we have
A365322, complement
A088314.
A004526 counts partitions of length 2, shift right for strict.
A364350 counts combination-free strict partitions.
Cf.
A070880,
A088571,
A088809,
A151897,
A326020,
A365043,
A365073,
A365311,
A365312,
A365378,
A365380.
-
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],{2}], combp[n,#]=={}&]],{n,0,30}]
-
from itertools import count
from sympy import divisors
def A365321(n):
a = set()
for i in range(1,n+1):
for j in count(i,i):
if j >= n:
break
for d in divisors(n-j):
if d>=i:
break
a.add((d,i))
return (n*(n-1)>>1)-len(a) # Chai Wah Wu, Sep 12 2023
A365379
Number of integer partitions with sum <= n whose distinct parts can be linearly combined using nonnegative coefficients to obtain n.
Original entry on oeis.org
0, 1, 3, 5, 10, 14, 27, 35, 61, 83, 128, 166, 264, 327, 482, 632, 882, 1110, 1565, 1938, 2663, 3339, 4401, 5471, 7290, 8921, 11555, 14291, 18280, 22303, 28507, 34507, 43534, 52882, 65798, 79621, 98932, 118629, 146072, 175562, 214708, 256351, 312583, 371779
Offset: 0
The partition (4,2,2) cannot be linearly combined to obtain 9, so is not counted under a(9). On the other hand, the same partition (4,2,2) has distinct parts {2,4} and has 10 = 1*2 + 2*4, so is counted under a(10).
The a(1) = 1 through a(5) = 14 partitions:
(1) (1) (1) (1) (1)
(2) (3) (2) (5)
(11) (11) (4) (11)
(21) (11) (21)
(111) (21) (31)
(22) (32)
(31) (41)
(111) (111)
(211) (211)
(1111) (221)
(311)
(1111)
(2111)
(11111)
For subsets with positive coefficients we have
A088314, complement
A088528.
The case of strict partitions with positive coefficients is also
A088314.
The complement is counted by
A365378.
A364350 counts combination-free strict partitions, non-strict
A364915.
A364839 counts combination-full strict partitions, non-strict
A364913.
-
combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
Table[Length[Select[Join@@Array[IntegerPartitions,n],combs[n,Union[#]]!={}&]],{n,0,10}]
-
from sympy.utilities.iterables import partitions
def A365379(n):
a = {tuple(sorted(set(p))) for p in partitions(n)}
return sum(1 for m in range(1,n+1) for b in partitions(m) if any(set(d).issubset(set(b)) for d in a)) # Chai Wah Wu, Sep 13 2023
A070880
Consider the 2^(n-1)-1 nonempty subsets S of {1, 2, ..., n-1}; a(n) gives number of such S for which it is impossible to partition n into parts from S such that each s in S is used at least once.
Original entry on oeis.org
0, 0, 1, 3, 10, 22, 52, 110, 234, 482, 987, 1997, 4035, 8113, 16288, 32644, 65388, 130886, 261922, 524013, 1048250, 2096752, 4193831, 8388033, 16776543, 33553621, 67107918, 134216596, 268434139, 536869354, 1073740011, 2147481510, 4294964833, 8589931699
Offset: 1
a(4)=3 because there are three different subsets S of {1,2,3} satisfying the condition: {3}, {2,3} & {1,2,3}. For the other subsets S, such as {1,2}, there is a partition of 4 which uses them all (such as 4 = 1+1+2).
From _Gus Wiseman_, Sep 10 2023: (Start)
The a(6) = 22 subsets:
{4} {2,3} {1,2,4} {1,2,3,4} {1,2,3,4,5}
{5} {2,5} {1,2,5} {1,2,3,5}
{3,4} {1,3,4} {1,2,4,5}
{3,5} {1,3,5} {1,3,4,5}
{4,5} {1,4,5} {2,3,4,5}
{2,3,4}
{2,3,5}
{2,4,5}
{3,4,5}
(End)
For sets with sum < n instead of maximum < n we have
A088528.
Allowing empty sets gives
A365045, nonnegative version apparently
A124506.
Without re-usable parts we have
A365377(n) - 1.
For nonnegative (instead of positive) coefficients we have
A365380(n) - 1.
A364350 counts combination-free strict partitions, complement
A364913.
-
combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s], Total[Times@@@#]==n&]];
Table[Length[Select[Rest[Subsets[Range[n-1]]], combp[n,#]=={}&]],{n,7}] (* Gus Wiseman, Sep 10 2023 *)
-
from sympy.utilities.iterables import partitions
def A070880(n): return (1<Chai Wah Wu, Sep 10 2023
A365315
Number of unordered pairs of distinct positive integers <= n that can be linearly combined using positive coefficients to obtain n.
Original entry on oeis.org
0, 0, 0, 1, 2, 4, 5, 8, 10, 12, 15, 18, 20, 24, 28, 28, 35, 37, 42, 44, 49, 49, 60, 59, 66, 65, 79, 74, 85, 84, 93, 93, 107, 100, 120, 104, 126, 121, 142, 129, 145, 140, 160, 150, 173, 154, 189, 170, 196, 176, 208, 193, 223, 202, 238, 203, 241, 227, 267, 235
Offset: 0
We have 19 = 4*3 + 1*7, so the pair (3,7) is counted under a(19).
For the pair p = (2,3), we have 4 = 2*2 + 0*3, so p is counted under A365314(4), but it is not possible to write 4 as a positive linear combination of 2 and 3, so p is not counted under a(4).
The a(3) = 1 through a(10) = 15 pairs:
(1,2) (1,2) (1,2) (1,2) (1,2) (1,2) (1,2) (1,2)
(1,3) (1,3) (1,3) (1,3) (1,3) (1,3) (1,3)
(1,4) (1,4) (1,4) (1,4) (1,4) (1,4)
(2,3) (1,5) (1,5) (1,5) (1,5) (1,5)
(2,4) (1,6) (1,6) (1,6) (1,6)
(2,3) (1,7) (1,7) (1,7)
(2,5) (2,3) (1,8) (1,8)
(3,4) (2,4) (2,3) (1,9)
(2,6) (2,5) (2,3)
(3,5) (2,7) (2,4)
(3,6) (2,6)
(4,5) (2,8)
(3,4)
(3,7)
(4,6)
For all subsets instead of just pairs we have
A088314, complement
A365322.
The case of nonnegative coefficients is
A365314, for all subsets
A365073.
A004526 counts partitions of length 2, shift right for strict.
A364350 counts combination-free strict partitions.
Cf.
A070880,
A088809,
A326020,
A364534,
A365043,
A365311,
A365312,
A365378,
A365379,
A365380,
A365383.
-
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],{2}],combp[n,#]!={}&]],{n,0,30}]
-
from itertools import count
from sympy import divisors
def A365315(n):
a = set()
for i in range(1,n+1):
for j in count(i,i):
if j >= n:
break
for d in divisors(n-j):
if d>=i:
break
a.add((d,i))
return len(a) # Chai Wah Wu, Sep 13 2023
Showing 1-10 of 12 results.
Comments