A238914 Number of self-inverse permutations p on [n] where the maximal displacement of an element equals 3.
0, 0, 0, 0, 2, 7, 19, 47, 117, 284, 675, 1575, 3634, 8312, 18881, 42634, 95797, 214376, 478110, 1063242, 2358703, 5221606, 11538623, 25458412, 56095424, 123458153, 271440387, 596277224, 1308849869, 2871054209, 6294182153, 13791615999, 30206220592, 66131277054
Offset: 0
Keywords
Examples
a(4) = 2: 4231, 4321. a(5) = 7: 15342, 15432, 35142, 42315, 42513, 43215, 45312. a(6) = 19: 126453, 126543, 146253, 153426, 153624, 154326, 156423, 216453, 216543, 351426, 351624, 423156, 423165, 425136, 426153, 432156, 432165, 453126, 456123.
Links
- Joerg Arndt and Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-1,-1,1,-4,-2,-3,-1,1,1,1).
Crossrefs
Column k=3 of A238889.
Programs
-
Maple
gf:= (x^3-x-2)*x^4 / ((x+1)*(x^6-x^5+x^4-3*x^3+3*x^2-3*x+1)* (x^4+x^3+x^2+x-1)): a:= n-> coeff(series(gf, x, n+1), x, n): seq(a(n), n=0..40);
-
Mathematica
CoefficientList[Series[(x^3 - x - 2) x^4/((x + 1) (x^6 - x^5 + x^4 - 3 x^3 + 3 x^2 - 3 x + 1) (x^4 + x^3 + x^2 + x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 09 2014 *) LinearRecurrence[{3,-1,-1,1,-4,-2,-3,-1,1,1,1},{0,0,0,0,2,7,19,47,117,284,675},40] (* Harvey P. Dale, Jun 12 2021 *)
Formula
G.f.: (x^3-x-2)*x^4 / ((x+1) *(x^6-x^5+x^4-3*x^3+3*x^2-3*x+1) *(x^4+x^3+x^2+x-1)).