Search: a161943 -id:a161943
|
|
A232466
|
|
Number of dependent sets with largest element n.
|
|
+10
24
|
|
|
0, 0, 1, 2, 4, 10, 20, 44, 93, 198, 414, 864, 1788, 3687, 7541, 15382, 31200, 63191, 127482, 256857, 516404, 1037104, 2080357, 4170283, 8354078, 16728270
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Let S be a set of positive integers. If S can be divided into two subsets which have equal sums, then S is said to be a dependent set.
Dependent sets are also called biquanimous sets. Biquanimous partitions are counted by A002219 and ranked by A357976. - Gus Wiseman, Apr 18 2024
|
|
REFERENCES
|
J. Bourgain, Λ_p-sets in analysis: results, problems and related aspects. Handbook of the geometry of Banach spaces, Vol. I,195-232, North-Holland, Amsterdam, 2001.
|
|
LINKS
|
|
|
EXAMPLE
|
The a(1) = 0 through a(6) = 10 sets:
. . {1,2,3} {1,3,4} {1,4,5} {1,5,6}
{1,2,3,4} {2,3,5} {2,4,6}
{1,2,4,5} {1,2,3,6}
{2,3,4,5} {1,2,5,6}
{1,3,4,6}
{2,3,5,6}
{3,4,5,6}
{1,2,3,4,6}
{1,2,4,5,6}
{2,3,4,5,6}
(End)
|
|
MAPLE
|
b:= proc(n, i) option remember; `if`(i<1, `if`(n=0, {0}, {}),
`if`(i*(i+1)/2<n, {}, b(n, i-1) union map(p-> p+x^i,
b(n+i, i-1) union b(abs(n-i), i-1))))
end:
a:= n-> nops(b(n, n-1)):
|
|
MATHEMATICA
|
b[n_, i_] := b[n, i] = If[i<1, If[n == 0, {0}, {}], If[i*(i+1)/2 < n, {}, b[n, i-1] ~Union~ Map[Function[p, p+x^i], b[n+i, i-1] ~Union~ b[Abs[n-i], i-1]]]]; a[n_] := Length[b[n, n-1]]; Table[Print[a[n]]; a[n], {n, 1, 24}] (* Jean-François Alcover, Mar 04 2014, after Alois P. Heinz *)
biqQ[y_]:=MemberQ[Total/@Subsets[y], Total[y]/2];
Table[Length[Select[Subsets[Range[n]], MemberQ[#, n]&&biqQ[#]&]], {n, 10}] (* Gus Wiseman, Apr 18 2024 *)
|
|
PROG
|
(PARI) dep(S, k=0)=if(#S<2, return(if(#S, S[1], 0)==k)); my(T=S[1..#S-1]); dep(T, abs(k-S[#S]))||dep(T, k+S[#S])
|
|
CROSSREFS
|
A237258 (aerated) counts biquanimous strict partitions, ranks A357854.
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A058377
|
|
Number of solutions to 1 +- 2 +- 3 +- ... +- n = 0.
|
|
+10
21
|
|
|
0, 0, 1, 1, 0, 0, 4, 7, 0, 0, 35, 62, 0, 0, 361, 657, 0, 0, 4110, 7636, 0, 0, 49910, 93846, 0, 0, 632602, 1199892, 0, 0, 8273610, 15796439, 0, 0, 110826888, 212681976, 0, 0, 1512776590, 2915017360, 0, 0, 20965992017, 40536016030, 0, 0, 294245741167
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
COMMENTS
|
Consider the set { 1,2,3,...,n }. Sequence gives number of ways this set can be partitioned into 2 subsets with equal sums. For example, when n = 7, { 1,2,3,4,5,6,7} can be partitioned in 4 ways: {1,6,7} {2,3,4,5}; {2,5,7} {1,3,4,6}; {3,4,7} {1,2,5,6} and {1,2,4,7} {3,5,6}. - sorin (yamba_ro(AT)yahoo.com), Mar 24 2007
The "equal sums" of Sorin's comment are the positive terms of A074378 (Even triangular numbers halved). In the current sequence a(n) <> 0 iff n is the positive index (A014601) of an even triangular number (A014494). - Rick L. Shepherd, Feb 09 2010
a(n) is the number of partitions of n(n-3)/4 into distinct parts not exceeding n-1. - Alon Amit, Oct 18 2017
a(n) is the coefficient of x^(n*(n+1)/4-1) of Product_{k=2..n} (1+x^k). - Jianing Song, Nov 19 2021
|
|
LINKS
|
|
|
FORMULA
|
a(n) is half the coefficient of q^0 in product('(q^(-k)+q^k)', 'k'=1..n) for n >= 1. - Floor van Lamoen, Oct 10 2005
a(n) = [x^n] Product_{k=1..n-1} (x^k + 1/x^k). - Ilya Gutkovskiy, Feb 01 2024
|
|
EXAMPLE
|
1+2-3=0, so a(3)=1;
1-2-3+4=0, so a(4)=1;
1+2-3+4-5-6+7=0, 1+2-3-4+5+6-7=0, 1-2+3+4-5+6-7=0, 1-2-3-4-5+6+7=0, so a(7)=4.
|
|
MAPLE
|
b:= proc(n, i) option remember; local m; m:= i*(i+1)/2;
`if`(n>m, 0, `if`(n=m, 1, b(abs(n-i), i-1) +b(n+i, i-1)))
end:
a:= n-> `if`(irem(n-1, 4)<2, 0, b(n, n-1)):
|
|
MATHEMATICA
|
f[n_, s_] := f[n, s] = Which[n == 0, If[s == 0, 1, 0], Abs[s] > (n*(n + 1))/2, 0, True, f[n - 1, s - n] + f[n - 1, s + n]]; Table[ f[n, 0]/2, {n, 1, 50}]
|
|
PROG
|
(PARI) list(n) = my(poly=vector(n), v=vector(n)); poly[1]=1; for(k=2, n, poly[k]=poly[k-1]*(1+'x^k)); for(k=1, n, if(k%4==1||k%4==2, v[k]=0, v[k]=polcoeff(poly[k], k*(k+1)/4-1))); v \\ Jianing Song, Nov 19 2021
|
|
CROSSREFS
|
Cf. A000217, A014601, A014494, A025591, A063865, A063866, A063867, A069918, A074378, A111133, A161943, A348639.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A164934
|
|
Number of different ways to select 3 disjoint subsets from {1..n} with equal element sum.
|
|
+10
11
|
|
|
0, 0, 0, 0, 1, 3, 8, 22, 63, 157, 502, 1562, 4688, 15533, 50953, 165054, 562376, 1911007, 6467143, 22447463, 78021923, 271410289, 957082911, 3384587525, 11998851674, 42876440587, 153684701645, 552421854011, 1995875594696, 7231871165277, 26274832876337
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
a(5) = 1, because {1,4}, {2,3}, {5} are disjoint subsets of {1..5} with element sum 5.
a(6) = 3: {1,4}, {2,3}, {5} have element sum 5, {1,5}, {2,4}, {6} have element sum 6, and {1,6}, {2,5}, {3,4} have element sum 7.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
b:= proc(n, k, i) option remember; local m;
m:= i*(i+1)/2;
if k>n then b(k, n, i)
elif k>=0 and n+k>m or k<0 and n-2*k>m then 0
elif [n, k, i] = [0, 0, 0] then 1
else b(n, k, i-1)+b(n+i, k+i, i-1)+b(n-i, k, i-1)+b(n, k-i, i-1)
fi
end:
a:= proc(n) option remember;
`if`(n>2, b(n, n, n-1)/2+ a(n-1), 0)
end:
seq(a(n), n=1..20);
|
|
MATHEMATICA
|
b[n_, k_, i_] := b[n, k, i] = Module[{m = i*(i+1)/2}, Which[k>n , b[k, n, i], k >= 0 && n+k>m || k<0 && n-2*k > m, 0, {n, k, i} == {0, 0, 0}, 1, True, b[n, k, i-1] + b[n+i, k+i, i-1] + b[n-i, k, i-1] + b[n, k-i, i-1]]]; a[n_] := a[n] = If[n>2, b[n, n, n-1]/2 + a[n-1], 0]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Feb 05 2015, after Alois P. Heinz *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A196231
|
|
Irregular triangle T(n,k), n>=1, 1<=k<=ceiling(n/2), read by rows: T(n,k) is the number of different ways to select k disjoint (nonempty) subsets from {1..n} with equal element sum.
|
|
+10
11
|
|
|
1, 3, 7, 1, 15, 3, 31, 7, 1, 63, 17, 3, 127, 43, 8, 1, 255, 108, 22, 3, 511, 273, 63, 9, 1, 1023, 708, 157, 23, 3, 2047, 1867, 502, 67, 10, 1, 4095, 4955, 1562, 203, 26, 3, 8191, 13256, 4688, 693, 83, 11, 1, 16383, 35790, 15533, 2584, 322, 30, 3, 32767, 97340
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
T(8,4) = 3: {1,6}, {2,5}, {3,4}, {7} have element sum 7, {1,7}, {2,6}, {3,5}, {8} have element sum 8, and {1,8}, {2,7}, {3,6}, {4,5} have element sum 9.
Triangle begins:
. 1;
. 3;
. 7, 1;
. 15, 3;
. 31, 7, 1;
. 63, 17, 3;
. 127, 43, 8, 1;
. 255, 108, 22, 3;
|
|
MAPLE
|
b:= proc(l, n, k) option remember; local i, j; `if`(l=[0$k], 1, `if`(add(j, j=l)>n*(n-1)/2, 0, b(l, n-1, k))+ add(`if`(l[j] -n<0, 0, b(sort([seq(l[i] -`if`(i=j, n, 0), i=1..k)]), n-1, k)), j=1..k)) end: T:= (n, k)-> add(b([t$k], n, k), t=2*k-1..floor(n*(n+1)/(2*k)))/k!:
seq(seq(T(n, k), k=1..ceil(n/2)), n=1..15);
|
|
MATHEMATICA
|
b[l_List, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0&, k], 1, If [Total[l] > n*(n-1)/2, 0, b[l, n-1, k]] + Sum [If [l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}]] ]; T[n_, k_] := Sum[b[Array[t&, k], n, k], {t, 2*k-1, Floor[n*(n+1)/(2*k)]}]/k!; Table[Table[T[n, k], {k, 1, Ceiling[n/2]}], {n, 1, 15}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A164949
|
|
Number of different ways to select 4 disjoint subsets from {1..n} with equal element sum.
|
|
+10
9
|
|
|
0, 0, 0, 0, 0, 0, 1, 3, 9, 23, 67, 203, 693, 2584, 9929, 37480, 137067, 522854, 2052657, 8199728, 33456333, 137831268, 574295984, 2392149818, 9950364020, 41860671346, 177512155194, 757447761138, 3254519322231, 14049972380612, 60960849334377, 265354255338637
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,8
|
|
LINKS
|
|
|
EXAMPLE
|
a(7) = 1, because {1,6}, {2,5}, {3,4}, {7} are disjoint subsets of {1..7} with element sum 7.
a(8) = 3: {1,6}, {2,5}, {3,4}, {7} have element sum 7, {1,7}, {2,6}, {3,5}, {8} have element sum 8, and {1,8}, {2,7}, {3,6}, {4,5} have element sum 9.
|
|
MAPLE
|
b:= proc() option remember; local i, j; `if`(args[1]=0 and args[2]=0 and args[3]=0 and args[4]=0, 1, `if`(add(args[j], j=1..4)> args[5] *(args[5]-1)/2, 0, b(args[j]$j=1..4, args[5]-1)) +add(`if`(args[j] -args[5]<0, 0, b(sort([seq(args[i] -`if`(i=j, args[5], 0), i=1..4)])[], args[5]-1)), j=1..4)) end: a:= n-> add(b(k$4, n), k=7..floor(n*(n+1)/8)) /24: seq(a(n), n=1..20);
|
|
MATHEMATICA
|
b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0&, k], 1, If[ Total[l] > n(n-1)/2, 0, b[l, n-1, k]] + Sum[If[l[[j]]-n < 0, 0, b[Sort[ Table[l[[i]] - If[i==j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}]]];
T[n_, k_] := Sum[b[Array[t&, k], n, k], {t, 2k-1, Floor[n(n+1)/(2k)]}]/k!;
a[n_] := T[n, 4];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A196232
|
|
Number of different ways to select 5 disjoint subsets from {1..n} with equal element sum.
|
|
+10
7
|
|
|
1, 3, 10, 26, 83, 322, 1182, 3971, 15662, 69371, 328016, 1460297, 6080910, 26901643, 123926071, 598722099, 2838432721, 13220493552, 63710261040, 312134646974, 1554373859464, 7673048166979, 37597940705361, 186986406578372
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
9,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(10) = 3: {1,8}, {2,7}, {3,6}, {4,5}, {9} have element sum 9; {1,9}, {2,8}, {3,7}, {4,6}, {10} have element sum 10; {1,10}, {2,9}, {3,8}, {4,7}, {5,6} have element sum 11.
|
|
MATHEMATICA
|
b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0 &, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}] ]];
T[n_, k_] := Sum[b[Array[t &, k], n, k], {t, 2*k - 1, Floor[n*(n + 1)/(2*k) ]}]/k!;
a[n_] := T[n, 5];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A196233
|
|
Number of different ways to select 6 disjoint subsets from {1..n} with equal element sum.
|
|
+10
7
|
|
|
1, 3, 11, 30, 113, 330, 1284, 5342, 23976, 141836, 604359, 2977297, 15970382, 80990028, 384959038, 1943894348, 10652582085, 53759893907, 292581087499, 1608101020113, 8896321349456, 51394417812545
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
11,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(12) = 3: {1,10}, {2,9}, {3,8}, {4,7}, {5,6}, {11} have element sum 11; {1,11}, {2,10}, {3,9}, {4,8}, {5,7}, {12} have element sum 12; {1,12}, {2,11}, {3,10}, {4,9}, {5,8}, {6,7} have element sum 13.
|
|
MATHEMATICA
|
b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0&, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}] ]];
T[n_, k_] := Sum[b[Array[t&, k], n, k], {t, 2*k - 1, Floor[n*(n + 1)/(2*k) ]}]/k!;
a[n_] := T[n, 6];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A196234
|
|
Number of different ways to select 7 disjoint subsets from {1..n} with equal element sum.
|
|
+10
7
|
|
|
1, 3, 12, 33, 114, 403, 1618, 8946, 45917, 189428, 979841, 5497818, 31708309, 178006222, 1091681487, 6207647636, 32636979255, 184162388392, 1069147827024, 6446977283374
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
13,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(14) = 3:
{1,12}, {2,11}, {3,10}, {4,9}, {5,8}, {6,7}, {13} have element sum 13; {1,13}, {2,12}, {3,11}, {4,10}, {5,9}, {6,8}, {14} have element sum 14; {1,14}, {2,13}, {3,12}, {4,11}, {5,10}, {6,9}, {7,8} have element sum 15.
|
|
MATHEMATICA
|
b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0 &, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k} ]]];
T[n_, k_] := Sum[b[Array[t&, k], n, k], {t, 2*k - 1, Floor[n*(n+1)/(2*k) ]}]/k!;
a[n_] := T[n, 7];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A196235
|
|
Number of different ways to select 8 disjoint subsets from {1..n} with equal element sum.
|
|
+10
7
|
|
|
1, 3, 13, 37, 134, 466, 1916, 9409, 46006, 255714, 1525052, 9524779, 58944302, 355219704, 2315784192, 14568780212, 97993669291, 619342933593
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
15,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(16) = 3: {1,14}, {2,13}, {3,12}, {4,11}, {5,10}, {6,9}, {7,8}, {15} have element sum 15; {1,15}, {2,14}, {3,13}, {4,12}, {5,11}, {6,10}, {7,9}, {16} have element sum 16; {1,16}, {2,15}, {3,14}, {4,13}, {5,12}, {6,11}, {7,10}, {8,9} have element sum 17.
|
|
MATHEMATICA
|
b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0 &, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n - 1, k]], {j, 1, k}]]];
T[n_, k_] := Sum[b[Array[t &, k], n, k], {t, 2*k - 1, Floor[n*(n + 1)/(2*k) ]}]/k!;
a[n_] := T[n, 8];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A196236
|
|
Number of different ways to select 9 disjoint subsets from {1..n} with equal element sum.
|
|
+10
7
|
|
|
1, 3, 14, 40, 156, 554, 2369, 11841, 60654, 498320, 2987689, 15177178, 96041346, 656938806, 4640699138, 31263742313, 221075005249
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
17,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(18) = 3: {1,16}, {2,15}, {3,14}, {4,13}, {5,12}, {6,11}, {7,10}, {8,9}, {17} have element sum 17; {1,17}, {2,16}, {3,15}, {4,14}, {5,13}, {6,12}, {7,11}, {8,10}, {18} have element sum 18; {1,18}, {2,17}, {3,16}, {4,15}, {5,14}, {6,13}, {7,12}, {8,11}, {9,10} have element sum 19.
|
|
MATHEMATICA
|
b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0 &, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n - 1, k]], {j, 1, k}]]];
T[n_, k_] := Sum[b[Array[t &, k], n, k], {t, 2*k - 1, Floor[n*(n+1)/(2*k) ]}]/k!;
a[n_] := T[n, 9];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.010 seconds
|