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.

A182661 Expansion of x^3*exp(-x)/(3*(1-x)).

Original entry on oeis.org

2, 0, 20, 80, 630, 4928, 44520, 444960, 4894890, 58738240, 763597692, 10690366960, 160355505310, 2565688083840, 43616697426640, 785100553677888, 14916910519881810, 298338210397633920, 6265102418350314980, 137832253203706926480
Offset: 3

Views

Author

Geoffrey Critzer, Feb 01 2011

Keywords

Comments

a(n) is the number of 3-cycles in all derangements of {1,2,...n}.

Crossrefs

Cf. A000387.

Programs

  • Maple
    egf:= x^3 * exp(-x)/(3*(1-x)):
    a:= n-> n! * coeff (series (egf, x, n+1), x, n):
    seq (a(n), n=3..25);
  • Mathematica
    Table[Count[Flatten[Map[Length,Map[ToCycles,Derangements[n]],{2}]],3],{n,0,8}]
    Range[0,20]! CoefficientList[Series[x^3/3 Exp[-x]/(1-x),{x,0,20}],x]

Formula

E.g.f.: x^3 * exp(-x)/(3*(1-x)).
In general, E.g.f. for the number of k cycles in the derangements of [n] is: x^k * exp(-x)/(k*(1-x)).