%I #10 Mar 09 2014 18:35:47
%S 0,0,0,1,3,7,16,35,74,153,312,629,1257,2495,4926,9684,18972,37064,
%T 72243,140547,273007,529626,1026369,1987260,3844919,7434542,14368115,
%U 27756229,53600223,103476920,199715716,385381128,743520256,1434272329,2766414007,5335290607
%N Number of self-inverse permutations p on [n] where the maximal displacement of an element equals 2.
%H Joerg Arndt and Alois P. Heinz, <a href="/A238913/b238913.txt">Table of n, a(n) for n = 0..1000</a>
%F G.f.: x^3*(x+1)/((x^2+x-1)*(x^4+x^3+x^2+x-1)).
%e a(3) = 1: 321.
%e a(4) = 3: 1432, 3214, 3412.
%e a(5) = 7: 12543, 14325, 14523, 21543, 32145, 32154, 34125.
%e a(6) = 16: 123654, 125436, 125634, 132654, 143256, 143265, 145236, 213654, 215436, 215634, 321456, 321465, 321546, 321654, 341256, 341265.
%p gf:= x^3*(1+x)/((x^2+x-1)*(x^4+x^3+x^2+x-1)):
%p a:= n-> coeff(series(gf, x, n+1), x, n):
%p seq(a(n), n=0..40);
%t CoefficientList[Series[x^3 (x + 1)/((x^2 + x - 1) (x^4 + x^3 + x^2 + x - 1)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Mar 09 2014 *)
%Y Column k=2 of A238889.
%K nonn
%O 0,5
%A _Joerg Arndt_ and _Alois P. Heinz_, Mar 07 2014