OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..375
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 650
FORMULA
E.g.f.: x*(1-x)/(1-3*x)
D-finite recurrence: a(1)=1, a(0)=0, a(2)=4, a(n) = 3*n*a(n-1).
a(n) = 2*3^(n-2)*n! = 2*A153647(n-2), n>1.
MAPLE
spec := [S, {S=Prod(Z, Sequence(Prod(Sequence(Z), Union(Z, Z))))}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
Table[2*3^(n-2)*n! -2*Boole[n==0]/9 + Boole[n==1]/3, {n, 0, 30}] (* G. C. Greubel, May 31 2022 *)
With[{nn=30}, CoefficientList[Series[x (1-x)/(1-3x), {x, 0, nn}], x] Range[0, nn]!] (* Harvey P. Dale, Oct 19 2022 *)
PROG
(SageMath) [0, 1]+[2*3^(n-2)*factorial(n) for n in (2..30)] # G. C. Greubel, May 31 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved