OFFSET
0,4
EXAMPLE
a(0) = 1: {}.
a(1) = 1: {{1,2,3}}.
a(2) = 1: {{1,2,3}, {4,5,6}}.
a(3) = 2: {{1,6,8}, {2,4,9}, {3,5,7}}, {{1,5,9}, {2,6,7}, {3,4,8}}.
a(4) = 17: {{1,2,12}, {3,8,10}, {4,6,11}, {5,7,9}}, {{1,2,12}, {3,7,11}, {4,8,9}, {5,6,10}}, {{1,3,11}, {2,9,10}, {4,5,12}, {6,7,8}}, {{1,6,8}, {2,9,10}, {3,7,11}, {4,5,12}}, {{1,9,11}, {2,3,10}, {4,5,12}, {6,7,8}}, {{1,9,11}, {2,6,7}, {3,8,10}, {4,5,12}}, {{1,4,10}, {2,8,11}, {3,6,12}, {5,7,9}}, {{1,5,9}, {2,8,11}, {3,6,12}, {4,7,10}}, {{1,9,11}, {2,5,8}, {3,6,12}, {4,7,10}}, {{1,3,11}, {2,7,12}, {4,8,9}, {5,6,10}}, {{1,5,9}, {2,7,12}, {3,8,10}, {4,6,11}}, {{1,9,11}, {2,7,12}, {3,4,8}, {5,6,10}}, {{1,9,11}, {2,7,12}, {3,8,10}, {4,5,6}}, {{1,8,12}, {2,3,10}, {4,6,11}, {5,7,9}}, {{1,8,12}, {2,9,10}, {3,5,7}, {4,6,11}}, {{1,8,12}, {2,4,9}, {3,7,11}, {5,6,10}}, {{1,8,12}, {2,9,10}, {3,7,11}, {4,5,6}}.
MAPLE
b:= proc(s) option remember; `if`(s={}, 1, (j->
add(add(`if`(i<j and k<i and issqr((k+i+j)*8+1),
b(s minus {k, i, j}), 0), k=s), i=s))(max(s)))
end:
a:= n-> b({$1..3*n}):
seq(a(n), n=0..7);
MATHEMATICA
b[s_] := b[s] = If[s == {}, 1, With[{j = Max[s]},
Sum[Sum[If[i < j && k < i && IntegerQ@Sqrt[(k + i + j)*8 + 1],
b[s ~Complement~ {k, i, j}], 0], {k, s}], {i, s}]]];
a[n_] := b[Range[3n]];
Table[Print[n, " ", a[n]]; a[n], {n, 0, 9}] (* Jean-François Alcover, Mar 08 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Alois P. Heinz, Nov 30 2017
STATUS
approved