OFFSET
0,4
EXAMPLE
a(3) = 3: {{1,6}, {2,4}, {3,5}}, {{1,4}, {2,5}, {3,6}}, {{1,3}, {2,5}, {4,6}}. - Alois P. Heinz, Nov 15 2016
MAPLE
b:= proc(s) option remember; `if`(s={}, 1, (j-> add(`if`(i<j
and isprime(j-i), b(s minus {i, j}), 0), i=s))(max(s)))
end:
a:= n-> b({$1..2*n}):
seq(a(n), n=0..12); # Alois P. Heinz, Nov 15 2016
MATHEMATICA
b[s_] := b[s] = If[s == {}, 1, Function[j, Sum[If[i < j && PrimeQ[j - i], b[s ~Complement~ {i, j}], 0], {i, s}]][Max[s]]];
a[n_] := b[Range[2n]];
Table[Print[n, " ", a[n]]; a[n], {n, 0, 18}] (* Jean-François Alcover, Mar 01 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,hard
AUTHOR
EXTENSIONS
a(0), a(14)-a(18) from Alois P. Heinz, Nov 15 2016
a(19)-a(23) from Bert Dobbelaere, Feb 20 2020
STATUS
approved