A052554 Expansion of e.g.f.: (1-x)/(1 - x - x^2).
1, 0, 2, 6, 48, 360, 3600, 40320, 524160, 7620480, 123379200, 2195424000, 42631142400, 896690995200, 20312541849600, 492993236736000, 12762901831680000, 351063491530752000, 10224590808047616000
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..415
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 493
- Robert A. Proctor, Let's Expand Rota's Twelvefold Way For Counting Partitions!, arXiv:math/0606404 [math.CO], 2006-2007.
- Index entries for related partition-counting sequences
Programs
-
GAP
a:=[0,2];; for n in [3..20] do a[n]:=n*a[n-1]+n*(n-1)*a[n-2]; od; Concatenation([1], a); # G. C. Greubel, May 07 2019
-
Magma
[1] cat [Fibonacci(n-1)*Factorial(n): n in [1..20]] // G. C. Greubel, May 07 2019
-
Maple
spec := [S,{S=Sequence(Prod(Z,Z,Sequence(Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
-
Mathematica
With[{m=20}, CoefficientList[Series[(1-x)/(1-x-x^2), {x,0,m}], x]* Range[0, m]!] (* G. C. Greubel, May 07 2019 *)
-
PARI
my(x='x+O('x^20)); Vec(serlaplace( (1-x)/(1-x-x^2) )) \\ G. C. Greubel, May 07 2019
-
Sage
[1]+[fibonacci(n-1)*factorial(n) for n in (1..20)] # G. C. Greubel, May 07 2019
Formula
a(n) = n*a(n-1) + n*(n-1)*a(n-2), with a(0)=1, a(1)=0.
a(n) = Sum(1/5*(-1+3*_alpha)*_alpha^(-1-n), _alpha=RootOf(-1+_Z+_Z^2))*n!.
a(n) = n!*Fibonacci(n-1) for n >= 1. - Bob Proctor, Apr 19 2005
a(0) = 1; a(n) = Sum_{k=2..n} binomial(n,k) * k! * a(n-k). - Ilya Gutkovskiy, Feb 09 2020
a(n)=n!*A212804(n). - R. J. Mathar, Jun 03 2022
Comments