OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..225
Wikipedia, Permutation
FORMULA
a(n) = A346085(2n,2).
EXAMPLE
a(1) = 1: (12).
a(2) = 3: (12)(34), (13)(24), (14)(23).
MAPLE
b:= proc(n, g) option remember; `if`(n=0, `if`(g=2, 1, 0), `if`(g=1, 0,
add(b(n-j, igcd(g, j))*binomial(n-1, j-1)*(j-1)!, j=2..n)))
end:
a:= n-> b(2*n, 0):
seq(a(n), n=0..19);
MATHEMATICA
b[n_, g_] := b[n, g] = If[n == 0, If[g == 2, 1, 0], If[g == 1, 0,
Sum[b[n - j, GCD[g, j]]*Binomial[n - 1, j - 1]*(j - 1)!, {j, 2, n}]]];
a[n_] := b[2*n, 0];
Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Mar 06 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 04 2021
STATUS
approved