cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A238913 Number of self-inverse permutations p on [n] where the maximal displacement of an element equals 2.

Original entry on oeis.org

0, 0, 0, 1, 3, 7, 16, 35, 74, 153, 312, 629, 1257, 2495, 4926, 9684, 18972, 37064, 72243, 140547, 273007, 529626, 1026369, 1987260, 3844919, 7434542, 14368115, 27756229, 53600223, 103476920, 199715716, 385381128, 743520256, 1434272329, 2766414007, 5335290607
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Mar 07 2014

Keywords

Examples

			a(3) = 1: 321.
a(4) = 3: 1432, 3214, 3412.
a(5) = 7: 12543, 14325, 14523, 21543, 32145, 32154, 34125.
a(6) = 16: 123654, 125436, 125634, 132654, 143256, 143265, 145236, 213654, 215436, 215634, 321456, 321465, 321546, 321654, 341256, 341265.
		

Crossrefs

Column k=2 of A238889.

Programs

  • Maple
    gf:= x^3*(1+x)/((x^2+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 + 1)/((x^2 + x - 1) (x^4 + x^3 + x^2 + x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 09 2014 *)

Formula

G.f.: x^3*(x+1)/((x^2+x-1)*(x^4+x^3+x^2+x-1)).