OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..390
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 496
FORMULA
E.g.f.: 1/(1 - 2*x - x^2).
a(n) = 2*n*a(n-1) + n*(n-1)*a(n-2), with a(0)=1, a(1)=2.
a(n) = Sum(1/4*(1+_alpha)*_alpha^(-1-n), _alpha=RootOf(-1+2*_Z+_Z^2))*n!
a(n) = n!*A000129(n+1). - R. J. Mathar, Nov 27 2011
MAPLE
spec := [S, {S=Sequence(Union(Z, Z, Prod(Z, Z)))}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
with(combstruct):ZL:=[T, {T=Union(Z, Prod(Epsilon, Z, T), Prod(T, Z, Epsilon), Prod(T, Z, Z))}, labeled]:seq(count(ZL, size=i)/i, i=1..18); # Zerinvary Lajos, Dec 16 2007
MATHEMATICA
With[{m = 20}, CoefficientList[Series[1/(1-2*x-x^2), {x, 0, m}], x]* Range[0, m]!] (* G. C. Greubel, May 07 2019 *)
PROG
(PARI) my(x='x+O('x^20)); Vec(serlaplace( 1/(1-2*x-x^2) )) \\ G. C. Greubel, May 07 2019
(Magma) m:=20; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( 1/(1-2*x-x^2) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 07 2019
(Sage) m = 20; T = taylor(1/(1-2*x-x^2), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, May 07 2019
(GAP) a:=[2, 10];; for n in [3..20] do a[n]:=2*n*a[n-1]+n*(n-1)*a[n-2]; od; Concatenation([1], a); # G. C. Greubel, May 07 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved