A055814 Expansion of e.g.f.: exp(x^3/3 + x^2/2).
1, 0, 1, 2, 3, 20, 55, 210, 1225, 4760, 26145, 157850, 811195, 5345340, 35170135, 222472250, 1650073425, 12000388400, 88563700225, 720929459250, 5786843137075, 48072795270500, 424314078763575, 3731123025279650, 34084058218435225, 323768324084205000
Offset: 0
Keywords
Examples
a(4) = 3 because there are 3 permutations of {1,2,3,4} that have cycle length two or three: (1,2)(3,4);(1,3)(2,4);(1,4)(2,3). - _Geoffrey Critzer_, Feb 21 2010
References
- Miklos Bona, A Walk Through Combinatorics, World Scientific Publishing Co., 2002, page 169. - Geoffrey Critzer, Feb 21 2010
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..625
Crossrefs
Cf. A081096.
Programs
-
GAP
a:=[1,0,1];; for n in [4..30] do a[n]:=(n-2)*(a[n-2]+(n-3)*a[n-3]); od; a; # G. C. Greubel, Jan 23 2020
-
Magma
I:=[1,0,1]; [n le 3 select I[n] else (n-2)*(Self(n-2) +(n-3)*Self(n-3)): n in [1..30]]; // G. C. Greubel, Jan 23 2020
-
Maple
a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j) *binomial(n-1, j-1)*(j-1)!, j=2..min(3, n))) end: seq(a(n), n=0..30); # Alois P. Heinz, Jan 25 2018
-
Mathematica
With[{m=30}, CoefficientList[Series[Exp[x^2/2 + x^3/3], {x,0,m}], x]*Range[0, m]!] (* Geoffrey Critzer, Feb 21 2010 *)
-
PARI
my(x='x+O('x^30)); Vec(serlaplace( exp(x^3/3 + x^2/2) )) \\ G. C. Greubel, Jan 23 2020
-
Sage
[factorial(n)*( exp(x^3/3 + x^2/2) ).series(x,n+1).list()[n] for n in (0..30)] # G. C. Greubel, Jan 23 2020
Formula
a(n) = subs(x=0, (d^n/dx^n)exp(x^3/3 + x^2/2)), n=0, 1, 2, ...
a(n) = (n-1)*a(n-2) + (n-1)*(n-2)*a(n-3). - Joerg Arndt, Oct 02 2009
a(n) ~ n^(2*n/3)*exp(1/18 - 2*n/3 - n^(1/3)/6 + n^(2/3)/2)/sqrt(3) * (1 + 49/(324*n^(1/3)) - 72451/(1049760*n^(2/3))). - Vaclav Kotesovec, Jun 26 2013
Extensions
Improved definition, as proposed by Joerg Arndt, from R. J. Mathar, Oct 23 2009
a(0)=1 prepended by Alois P. Heinz, Jan 25 2018
Comments