OFFSET
0,2
COMMENTS
Also number of self-inverse permutations of [2n] with longest increasing subsequence of length >= n.
LINKS
FORMULA
a(n) = A182222(2n,n).
MATHEMATICA
h[l_] := Module[{n = Length[l]}, Total[l]!/Product[Product[1+l[[i]]-j+Sum[ If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}]];
g[n_, i_, l_] := g[n, i, l] = If[n == 0, h[l], If[i < 1, 0, If[i == 1, h[Join[l, Array[1&, n]]], g[n, i-1, l] + If[i > n, 0, g[n-i, i, Append[l, i]]]]]];
t[n_, k_] := g[n, n, {}] - If[k == 0, 0, g[n, k-1, {}]];
a[n_] := a[n] = t[2n, n];
Table[Print[n, " ", a[n]]; a[n], {n, 0, 20}] (* Jean-François Alcover, Sep 08 2021, after Alois P. Heinz in A182222 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 04 2018
STATUS
approved