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.

A178669 The number of permutations of [n] with 2 cycles of length 2.

Original entry on oeis.org

0, 3, 15, 45, 315, 3150, 28350, 274050, 3014550, 36330525, 472296825, 6609317715, 99139765725, 1586293008300, 26966981141100, 485404420000500, 9222683980009500, 184453709062998375
Offset: 3

Views

Author

Paul Weisenhorn, Jun 02 2010

Keywords

Examples

			a(4)=3 counts the 3 permutations (2143), (3412), (4321) with 2 cycles
of length 2
		

Crossrefs

Cf. A088436 (k=1 cycle), A000266 (k=0 cycle).

Programs

  • Maple
    A178669 := proc(n) local k ; k :=2 ; n!*add( (-1)^j/(j-k)!/2^j/k!,j=k..n/2) ; end proc:
    seq(A178669(n),n=3..20) ;
  • Mathematica
    d=Exp[-x^2/2]/(1-x); Range[0,20]! CoefficientList[Series[(3x^4/4! )d, {x,0,20}], x] (* Geoffrey Critzer, Nov 29 2011 *)

Formula

a(n)=n!*sum_{j=k.. [n/2]} (-1)^j/((j-k)!*2^j*k!). E.g.f. = exp(-z^2/2)*z^(2*k) / ((1-z)*2^k*k!), where k is the number of cycles of length 2.
a(n) ~ n! * exp(-1/2)/8. - Vaclav Kotesovec, Mar 20 2014

Extensions

Typo in a(18) corrected by Vincenzo Librandi, Mar 21 2014