OFFSET
0,3
COMMENTS
The element sum of each subset is 8n+2. The larger terms were computed with Knuth's dancing links algorithm.
LINKS
EXAMPLE
a(1) = 1: {1,2,3,4}.
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}.
MAPLE
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:
a:= n-> `if`(n=0, 1, b(((8*n+2)+4/97) $n, 4*n)/n!): seq(a(n), n=0..6);
MATHEMATICA
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}]]];
a[n_] := If[n == 0, 1, b[Join[Array[8*n + 2 + 4/97& , n], {4*n, 4}]]/n!];
Table[a[n], {n, 0, 6}] (* Jean-François Alcover, Jun 03 2018, adapted from Maple *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Alois P. Heinz, Jan 01 2012
STATUS
approved