|
|
A035470
|
|
Number of ways to break {1,2,3,...n} into sets with equal sums.
|
|
32
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
a(n) = 2 <=> |{d|n*(n+1)/2 : d>=n}| = 2. - Alois P. Heinz, Sep 03 2009
|
|
LINKS
|
|
|
EXAMPLE
|
a(7) = 6 since we have 1234567, 16/25/34/7, 167/2345, 257/1346, 347/1256, 356/1247.
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)
|
|
MAPLE
|
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
|
|
MATHEMATICA
|
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 &]}]];
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 *)
|
|
CROSSREFS
|
Cf. A000110, A007837, A038041, A112956, A275780, A275781, A321455, A326512, A326513, A326518, A326534.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|