login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of partitions of {1,2,...,4n} into n 4-element subsets having the same sum.
3

%I #25 Dec 05 2020 14:20:19

%S 1,1,4,32,392,6883,171088,5661874,242038179,13147317481

%N Number of partitions of {1,2,...,4n} into n 4-element subsets having the same sum.

%C The element sum of each subset is 8n+2. The larger terms were computed with Knuth's dancing links algorithm.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Dancing_Links">Dancing Links</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>

%e a(1) = 1: {1,2,3,4}.

%e a(2) = 4: {1,2,7,8}, {3,4,5,6}; {1,3,6,8}, {2,4,5,7}; {1,4,5,8}, {2,3,6,7}; {1,4,6,7}, {2,3,5,8}.

%p b:= proc() option remember; local i, j, t, m; m:= args[nargs]; if args[1]=0 then `if`(nargs=2, 1, b(args[t] $t=2..nargs)) elif args[1]<1 then 0 else add(`if`(args[j]<m, 0, b(sort([seq(args[i] -`if`(i=j, m+1/97, 0), i=1..nargs-1)])[], m-1)), j=1..nargs-1) fi end:

%p a:= n-> `if`(n=0, 1, b(((8*n+2)+4/97) $n, 4*n)/n!): seq(a(n), n=0..6);

%t b[l_] := b[l] = Module[{nl = Length[l], k = l[[-1]], m = l[[-2]]}, Which[l[[1]] == 0, If[nl == 3, 1, b[l[[2 ;; nl]]]], l[[1]] < 1, 0, True, Sum[If[l[[j]] < m, 0, b[Join[Sort[Table[l[[i]] - If[i == j, m + 1/97, 0], {i, 1, nl - 2}]], {m - 1, k}]]], {j, 1, nl - 2}]]];

%t a[n_] := If[n == 0, 1, b[Join[Array[8*n + 2 + 4/97& , n], {4*n, 4}]]/n!];

%t Table[a[n], {n, 0, 6}] (* _Jean-François Alcover_, Jun 03 2018, adapted from Maple *)

%Y Column k=4 of A203986.

%Y Cf. A104185, A108235, A203017, A264813.

%K nonn,more

%O 0,3

%A _Alois P. Heinz_, Jan 01 2012