OFFSET
0,2
COMMENTS
See section 6 in the Hardt reference.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..661
Andy Hardt and Justin M. Troyka, Restricted Symmetric Signed Permutations, Department of Mathematics, Carleton College, 2013.
FORMULA
a(n) = 2*a(n-1) + 4*(n - 1)*a(n-2).
From Peter Luschny, May 30 2021: (Start)
a(n) = 2^n * hypergeom([-n/2, (1 - n)/2], [], 2).
a(n) = 2^n * A000085(n).
a(n) = n! * [x^n] exp(2*x*(x + 1)). (End)
EXAMPLE
For n = 1, the permutations of length 2 are (-1, 2) and (1, -2).
MAPLE
exp(2*x*(x + 1)): series(%, x, 23):
seq(n!*coeff(%, x, n), n = 0..22); # Peter Luschny, May 30 2021
MATHEMATICA
RecurrenceTable[{a[0]==1, a[1]==2, a[n]==2a[n-1]+4(n-1)a[n-2]}, a, {n, 30}] (* Harvey P. Dale, Mar 14 2021 *)
a[n_] := 2^n HypergeometricPFQ[{-n/2, (1-n)/2}, {}, 2];
Table[a[n], {n, 0, 22}] (* Peter Luschny, May 30 2021 *)
PROG
(PARI) seq(n)={my(v=vector(n+1)); v[1]=1; v[2]=2; for(n=2, n, v[n+1] = 2*v[n] + 4*(n-1)*v[n-1]); v} \\ Andrew Howroyd, Dec 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Andy Hardt, Aug 04 2011
EXTENSIONS
Terms a(6) and beyond from Andrew Howroyd, Dec 08 2018
STATUS
approved