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.

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 10, 48, 170, 515, 1471, 4119, 11605, 32568, 90756, 250432, 684816, 1858440, 5016359, 13484339, 36124302, 96487740, 257021991, 682958487, 1810749368, 4791502490, 12657090174, 33383355375, 87928909275, 231312358250, 607831534982, 1595624166626
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Mar 07 2014

Keywords

Examples

			a(6) = 10: 623451, 623541, 624351, 625431, 632451, 632541, 643251, 645231, 653421, 654321.
a(7) = 48: 1734562, 1734652, 1735462, ..., 6735412, 6743512, 6754312.
a(8) = 170: 12845673, 12845763, 12846573, ..., 67583124, 67845123, 67854123.
		

Crossrefs

Column k=5 of A238889.

Programs

  • Maple
    gf:= (x^34 +x^33 +x^32 -x^30 +7*x^29 +4*x^28 +5*x^27 +3*x^26 -7*x^25 +2*x^24 +2*x^22 -4*x^21 -14*x^20 -38*x^19 -8*x^18 -14*x^17 -52*x^16 +12*x^15 +26*x^14 -56*x^13 -53*x^12 +79*x^11 +79*x^10 +42*x^9 +55*x^8 +49*x^7 -26*x^6 -65*x^5 -35*x^4 +13*x^3 +34*x^2 +28*x +10)*x^6 / ((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^32 +x^31 +x^30 -x^29 -x^28 +7*x^27 +5*x^26 +x^25 -5*x^24 -3*x^23 -x^22 -8*x^21 -16*x^20 +8*x^18 -40*x^17 -36*x^16 +20*x^14 +12*x^13 +64*x^12 +52*x^11 +19*x^10 -5*x^9 -13*x^8 -27*x^7 -19*x^6 +x^5 -x^4 -x^3 -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^34 + x^33 + x^32 - x^30 + 7 x^29 + 4 x^28 + 5 x^27 + 3 x^26 - 7 x^25 + 2 x^24 + 2 x^22 - 4 x^21 - 14 x^20 - 38 x^19 - 8 x^18 - 14 x^17 - 52 x^16 + 12 x^15 + 26 x^14 - 56 x^13 - 53 x^12 + 79 x^11 + 79 x^10 + 42 x^9 + 55 x^8 + 49 x^7 - 26 x^6 - 65 x^5 - 35 x^4 + 13 x^3 + 34 x^2 + 28 x + 10) x^6/((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^32 + x^31 + x^30 - x^29 - x^28 + 7 x^27 + 5 x^26 + x^25 - 5 x^24 - 3 x^23 - x^22 - 8 x^21 - 16 x^20 + 8 x^18 - 40 x^17 - 36 x^16 + 20 x^14 + 12 x^13 + 64 x^12 + 52 x^11 + 19 x^10 - 5 x^9 - 13 x^8 - 27 x^7 - 19 x^6 + x^5 - x^4 - x^3 - 3 x^2 - x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 09 2014 *)

Formula

G.f.: see Maple program.