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.

A029571 Number of permutations of an n-set containing a 4-cycle.

Original entry on oeis.org

0, 0, 0, 0, 6, 30, 180, 1260, 8820, 79380, 793800, 8731800, 106029000, 1378377000, 19297278000, 289459170000, 4627941318000, 78675002406000, 1416150043308000, 26906850822852000, 538156815464268000
Offset: 0

Views

Author

Keywords

Crossrefs

Column k=4 of A293211.

Programs

  • Maple
    L:= [seq( 1 - add((-1)^k/(k!*4^k),k=0..m),m=0..10)]:
    seq(seq((4*m+j)!*L[m+1],j=0..3),m=0..10); # Robert Israel, Dec 07 2016
  • Mathematica
    a[n_] := n! (1 - Sum[(-1)^k/(k! 4^k), {k, 0, Floor[n/4]}]);
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Mar 19 2019 *)
  • PARI
    a(n)=n! * (1 - sum(k=0,floor(n/4), (-1)^k/(k!*4^k) ) ); \\ Joerg Arndt, Aug 08 2013

Formula

a(n) = n! * (1 - sum(k=0..floor(n/4), (-1)^k/(k!*4^k) ) ).
a(n)/n! is asymptotic to 1-e^(-1/4) = 1 - A092616.
a(n) = n! (1 - Gamma(floor(n/4)+1,-1/4)*exp(1/4)/(floor(n/4))!). - Robert Israel, Dec 07 2016
E.g.f.: (1-exp(-x^4/4))/(1-x). - Alois P. Heinz, Oct 11 2017