%I #11 Mar 12 2014 08:01:40
%S 1,1,2,4,10,26,66,158,376,891,2137,5140,12376,29756,71468,171596,
%T 412084,989800,2377717,5711705,13720054,32955996,79161006,190147558,
%U 456743814,1097123162,2635347280,6330234855,15205529809,36524416280,87733426944,210739993784
%N Number of self-inverse permutations p on [n] with displacement of elements restricted by 4: |p(i)-i| <= 4.
%C Column k=4 of A238888.
%H Joerg Arndt and Alois P. Heinz, <a href="/A239076/b239076.txt">Table of n, a(n) for n = 0..1000</a>
%F G.f.: -(x+1)*(x^7 -x^6+2*x^5 -x^4 +x^3 +x-1) / (x^16 +x^15 +2*x^14 +x^13 +x^12 +2*x^11 +x^10 +3*x^9 -4*x^8 -5*x^7 -9*x^6 -6*x^5 -x^4 -x^3 -2*x^2 -x+1).
%p gf:= -(x+1)*(x^7 -x^6+2*x^5 -x^4 +x^3 +x-1) / (x^16 +x^15 +2*x^14 +x^13 +x^12 +2*x^11 +x^10 +3*x^9 -4*x^8 -5*x^7 -9*x^6 -6*x^5 -x^4 -x^3 -2*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 + 1) (x^7 - x^6 + 2 x^5 - x^4 + x^3 + x - 1)/(x^16 + x^15 + 2 x^14 + x^13 + x^12 + 2 x^11 + x^10 + 3 x^9 - 4 x^8 - 5 x^7 - 9 x^6 - 6 x^5 - x^4 - x^3 - 2 x^2 - x + 1), {x, 0, 50}], x] (* _Vincenzo Librandi_, Mar 12 2014 *)
%Y Cf. A000085, A238888
%K nonn,easy
%O 0,3
%A _Joerg Arndt_ and _Alois P. Heinz_, Mar 10 2014
|