A035470
Number of ways to break {1,2,3,...,n} into sets with equal sums.
Original entry on oeis.org
1, 1, 2, 2, 2, 2, 6, 12, 11, 2, 80, 166, 2, 665, 2918, 3309, 9296, 23730, 31875, 301030, 422897, 2, 13716867, 71504980, 100664385, 54148591, 880696662, 498017759, 27450476787, 111911522819, 179459955554, 2144502175214, 59115423983, 45837019664552, 375743493787258, 816118711787493, 2, 9492169507922
Offset: 1
a(7) = 6 since we have 1234567, 16/25/34/7, 167/2345, 257/1346, 347/1256, 356/1247.
From _Gus Wiseman_, Jul 13 2019: (Start)
The a(6) = 2 through a(9) = 11 set partitions with equal block-sums:
{123456} {1234567} {12345678} {123456789}
{16}{25}{34} {1247}{356} {12348}{567} {12345}{69}{78}
{1256}{347} {12357}{468} {1239}{456}{78}
{1346}{257} {12456}{378} {1248}{357}{69}
{167}{2345} {1278}{3456} {1257}{348}{69}
{16}{25}{34}{7} {1368}{2457} {1347}{258}{69}
{1458}{2367} {1356}{249}{78}
{1467}{2358} {159}{2346}{78}
{1236}{48}{57} {159}{267}{348}
{138}{246}{57} {168}{249}{357}
{156}{237}{48} {18}{27}{36}{45}{9}
{18}{27}{36}{45}
(End)
Cf.
A000110,
A007837,
A038041,
A112956,
A275780,
A275781,
A321455,
A326512,
A326513,
A326518,
A326534.
-
with(numtheory): b:= proc() option remember; local i, j, t; `if`(args[1]=0, `if`(nargs=2, 1, b(args[t] $t=2..nargs)), add(`if`(args[j] -args[nargs] <0, 0, b(sort([seq(args[i] -`if`(i=j, args[nargs], 0), i=1..nargs-1)])[], args[nargs]-1)), j=1..nargs-1)) end: a:= proc(n) local i, m, x; m:= n*(n+1)/2; 1+ add(b(i$(m/i), n)/(m/i)!, i=[select(x-> x>=n, divisors(m) minus {m})[]]) end: seq(a(n), n=1..25); # Alois P. Heinz, Sep 03 2009
-
b[args_List] := b[args] = If[args[[1]] == 0, If[Length[args] == 2, 1, b[Rest[args]]], Sum[If[args[[j]] - args[[-1]] < 0, 0, b[Sort[Join[Table[ args[[i]] - If[i == j, args[[-1]], 0], {i, 1, Length[args]-1}]]], {args[[-1]]-1}]], {j, 1, Length[args]-1}]]; b[a1_List, a2_List] := b[Join[a1, a2]];
a[n_] := a[n] = With[{m = n*(n+1)/2}, 1+Sum[b[Append[Array[i&, m/i], n]] / (m/i)!, {i, Select[Divisors[m] ~Complement~ {m}, # >= n &]}]];
Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 25}] (* Jean-François Alcover, Mar 22 2017, after Alois P. Heinz *)
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
Table[Length[Select[sps[Range[n]],SameQ@@Total/@#&]],{n,0,10}] (* Gus Wiseman, Jul 13 2019 *)
A275714
Number T(n,k) of set partitions of [n] into k blocks with equal element sum; triangle T(n,k), n>=0, 0<=k<=ceiling(n/2), read by rows.
Original entry on oeis.org
1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 4, 0, 1, 0, 1, 7, 3, 1, 0, 1, 0, 9, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 35, 43, 0, 0, 1, 0, 1, 62, 102, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 595, 0, 68, 0, 1, 0, 1, 361, 1480, 871, 187, 17, 0, 1
Offset: 0
T(8,1) = 1: 12345678.
T(8,2) = 7: 12348|567, 12357|468, 12456|378, 1278|3456, 1368|2457, 1458|2367, 1467|2358.
T(8,3) = 3: 1236|48|57, 138|246|57, 156|237|48.
T(8,4) = 1: 18|27|36|45.
T(9,3) = 9: 12345|69|78, 1239|456|78, 1248|357|69, 1257|348|69, 1347|258|69, 1356|249|78, 159|2346|78, 168|249|357, 159|267|348.
Triangle T(n,k) begins:
00 : 1;
01 : 0, 1;
02 : 0, 1;
03 : 0, 1, 1;
04 : 0, 1, 1;
05 : 0, 1, 0, 1;
06 : 0, 1, 0, 1;
07 : 0, 1, 4, 0, 1;
08 : 0, 1, 7, 3, 1;
09 : 0, 1, 0, 9, 0, 1;
10 : 0, 1, 0, 0, 0, 1;
11 : 0, 1, 35, 43, 0, 0, 1;
12 : 0, 1, 62, 102, 0, 0, 1;
13 : 0, 1, 0, 0, 0, 0, 0, 1;
14 : 0, 1, 0, 595, 0, 68, 0, 1;
15 : 0, 1, 361, 1480, 871, 187, 17, 0, 1;
-
Needs["Combinatorica`"]; T[n_, k_] := Count[(Equal @@ (Total /@ #)&) /@ KSetPartitions[n, k], True]; Table[row = Table[T[n, k], {k, 0, Ceiling[n/2]}]; Print[n, " ", row]; row, {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 20 2017 *)
A112972
Number of ways the set {1,2,...,n} can be split into three subsets of equal sums.
Original entry on oeis.org
0, 0, 0, 0, 1, 1, 0, 3, 9, 0, 43, 102, 0, 595, 1480, 0, 9294, 23728, 0, 157991, 411474, 0, 2849968, 7562583, 0, 53987864, 145173095, 0, 1061533318, 2885383960, 0, 21515805520, 59003023409, 0, 447142442841, 1235311936936, 0, 9489835046489, 26382363207307
Offset: 1
For n=8 we have 84/75/6321, 84/732/651 and 831/75/642 so a(8)=3.
-
A112972:= n-> coeff(coeff(mul((x^(-2*k)+x^k*(y^k+y^(-k)))
, k=1..n), x, 0), y, 0)/6:
seq(A112972(n), n=1..20);
# second Maple program:
b:= proc() option remember; local i, j, t; `if`(args[1]=0,
`if`(nargs=2, 1, b(args[t] $t=2..nargs)), add(
`if`(args[j] -args[nargs]<0, 0, b(sort([seq(args[i]-
`if`(i=j, args[nargs], 0), i=1..nargs-1)])[],
args[nargs]-1)), j=1..nargs-1))
end:
a:= n-> (m-> `if`(irem(m, 3)=0, b((m/3)$3, n)/6, 0))(n*(n+1)/2):
seq(a(n), n=1..42); # Alois P. Heinz, Sep 03 2009
-
b[args_List] := b[args] = Module[{nargs = Length[args]}, If[args[[1]] == 0, If[nargs == 2, 1, b[args // Rest]], Sum[If[args[[j]] - Last[args] < 0, 0, b[Append[Sort[Flatten[Table[args[[i]] - If[i == j, Last[args], 0], {i, 1, nargs-1}]]], Last[args]-1]]], {j, 1, nargs-1}]]];
a[n_] := If[Mod[#, 3] == 0, b[{#/3, #/3, #/3, n}]/6, 0]&[n(n+1)/2];
Array[a, 42] (* Jean-François Alcover, Oct 30 2020, after Alois P. Heinz *)
A320438
Irregular triangle read by rows where T(n,k) is the number of set partitions of {1,...,n} with all block-sums equal to d, where d is the k-th divisor of n*(n+1)/2 that is >= n.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 3, 7, 1, 1, 9, 1, 1, 1, 1, 43, 35, 1, 1, 102, 62, 1, 1, 1, 1, 68, 595, 1, 1, 17, 187, 871, 1480, 361, 1, 1, 2650, 657, 1, 1, 9294, 1, 1, 23728, 1, 1, 27763, 4110, 1, 1, 1850, 25035, 108516, 157991, 7636, 1, 1, 11421, 411474, 1
Offset: 1
Triangle begins:
1
1
1 1
1 1
1 1
1 1
1 4 1
1 3 7 1
1 9 1
1 1
1 43 35 1
1 102 62 1
1 1
1 68 595 1
1 17 187 871 1480 361 1
1 2650 657 1
Row 8 counts the following set partitions:
{{18}{27}{36}{45}} {{1236}{48}{57}} {{12348}{567}} {{12345678}}
{{138}{246}{57}} {{12357}{468}}
{{156}{237}{48}} {{12456}{378}}
{{1278}{3456}}
{{1368}{2457}}
{{1458}{2367}}
{{1467}{2358}}
Cf.
A000110,
A000258,
A008277,
A112956,
A164977,
A275714,
A279375,
A300335,
A320423,
A320424,
A321455,
A321469.
-
spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
Table[Length[spsu[Select[Subsets[Range[n]],Total[#]==d&],Range[n]]],{n,12},{d,Select[Divisors[n*(n+1)/2],#>=n&]}]
Showing 1-4 of 4 results.
Comments