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.

A070946 Number of permutations on n letters that have only cycles of length 5 or less.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 600, 3480, 22800, 164880, 1285920, 10516320, 92931840, 877374720, 8762014080, 91819440000, 1005716908800, 11584953158400, 139521689740800, 1748830512960000, 22750446292531200, 306931140411955200, 4296645083802470400, 62213458150660147200
Offset: 0

Views

Author

N. J. A. Sloane and Sharon Sela, May 18 2002

Keywords

Crossrefs

Cf. A057693.

Programs

  • Maple
    with(combstruct):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, m>=card))}, labeled]; end: A:=a(5):seq(count(A, size=n), n=0..21); # Zerinvary Lajos, Jun 11 2008
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)
          *binomial(n-1, j-1)*(j-1)!, j=1..min(n, 5)))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Jan 25 2018
  • Mathematica
    With[{nn=30},CoefficientList[Series[Exp[x+x^2/2+x^3/3+x^4/4+ x^5/5], {x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Mar 24 2016 *)

Formula

E.g.f.: exp(x+1/2*x^2+1/3*x^3+1/4*x^4+1/5*x^5).
a(n) = n!*Sum_{k=1..n} (1/k!)*Sum_{r=0..k} binomial(k,r)*Sum_{m=0..r} 2^(m-r)*binomial(r,m)*Sum_{j=0..m} binomial(m,j)*binomial(j,n-m-k-j-r)*3^(j-m)*4^(n-r-m-k-2*j)*5^(m+k+j+r-n) for n > 0. - Vladimir Kruchinin, Jan 26 2011