A239075 Number of self-inverse permutations p on [n] with displacement of elements restricted by 3: |p(i)-i| <= 3.
1, 1, 2, 4, 10, 22, 48, 103, 225, 492, 1076, 2348, 5124, 11184, 24417, 53305, 116366, 254024, 554534, 1210554, 2642656, 5768943, 12593649, 27492040, 60015368, 131014088, 286004920, 624351264, 1362964321, 2975363169, 6495244138, 14179175436, 30953265426
Offset: 0
Links
- Joerg Arndt and Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
gf:= -(x-1)/(x^7-2*x^4-2*x+1): a:= n-> coeff(series(gf, x, n+1), x, n): seq(a(n), n=0..40);
-
Mathematica
CoefficientList[Series[(1 - x)/(x^7 - 2 x^4 - 2 x + 1), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 12 2014 *)
Formula
G.f.: -(x-1)/(x^7-2*x^4-2*x+1).
Comments