OFFSET
0,2
COMMENTS
Also the number of signed permutations of length 2*n invariant under Dbar and avoiding (-1, 2) and (1, -2).
Also the number of signed permutations of length 2*n invariant under R180bar and avoiding (-1, 2) and (1, -2).
FORMULA
a(0) = 1, and for n > 0, a(n) = n! + Sum_{j=0..n-1} (n-j)! * a(j).
a(n) is the sum of top row terms of M^n, M = an infinite square production matrix as follows:
1, 1, 0, 0, 0, 0,...
2, 0, 2, 0, 0, 0,...
3, 0, 0, 3, 0, 0,...
4, 0, 0, 0, 4, 0,...
5, 0, 0, 0, 0, 5,...
... The upper left term of M^n = A051296(n). - Gary W. Adamson, Sep 26 2011
EXAMPLE
For n = 2, the 6 permutations are (2, 1), (-2, -1), (1, 2), (1, -2), (-1, 2), and (-1, -2).
a(3) = 22 = sum of top row terms of M^3 = (11 + 3 + 2 + 6); where 11 = A051296(3).
MAPLE
b := proc(n) option remember; if n = 0 then 2 else
add(factorial(k)*b(n-k), k=1..n) fi end:
a := n -> if n = 0 then return 1 else b(n) end:
seq(a(n), n=0..21); # Peter Luschny, Dec 07 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Andy Hardt, Aug 04 2011
EXTENSIONS
More terms from Joerg Arndt, Aug 16 2011.
STATUS
approved