OFFSET
1,2
EXAMPLE
MATHEMATICA
perms[n_] := perms[n] = If[n == 1, {{1}}, Flatten[Table[Insert[#, n, pos], {pos, -1, -n, -1}]& /@ perms[n-1], 1]];
a[n_] := Count[Transpose@{perms[n], Permutations[Range[n]]}, {p_, p_}];
Table[a[n], {n, 1, 10}] (* Jean-François Alcover, Sep 02 2021 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
William Chang, Aug 23 2021
STATUS
approved