A052585 E.g.f. 1/(1-x-2*x^2).
1, 1, 6, 30, 264, 2520, 30960, 428400, 6894720, 123742080, 2478470400, 54486432000, 1308153369600, 34005760588800, 952248474777600, 28566146568960000, 914137612996608000, 31080323154456576000, 1118898035934142464000, 42518003720397004800000
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..350
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 530
Programs
-
Magma
m:=25; R
:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(1/(1 -x -2*x^2))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 17 2018 -
Maple
spec := [S,{S=Sequence(Union(Z,Prod(Z,Union(Z,Z))))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
-
Mathematica
With[{m = 50}, CoefficientList[Series[-1/(-1 + x + 2*x^2), {x, 0, m}], x]*Range[0, m]!] (* G. C. Greubel, May 17 2018 *)
-
PARI
x='x+O('x^30); Vec(serlaplace(1/(1 -x -2*x^2))) \\ G. C. Greubel, May 17 2018
Formula
E.g.f.: 1/(1 -x -2*x^2).
Recurrence: a(1)=1, a(0)=1, (-2*n^2-6*n-4)*a(n)+(-2-n)*a(n+1)+a(n+2)=0.
a(n) = Sum(1/9*(1+4*_alpha)*_alpha^(-1-n), _alpha=RootOf(-1+_Z+2*_Z^2))*n!.
a(n) = n!*A001045(n+1). - Paul Barry, Aug 08 2008
Extensions
a(18)-a(19) added by G. C. Greubel, May 17 2018
Comments