OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..350
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 617
FORMULA
E.g.f.: (1 - 2*x)/(1 - 3*x - x^2 + 2*x^3).
Recurrence: a(0)=1, a(1)=1, a(2)=8, a(n) = 3*n*a(n-1) + n*(n-1)*a(n-2) - 2*n*(n-1)*(n-2)*a(n-3).
a(n) = (n!/229)*Sum_{alpha=RootOf(1 - 3*Z - Z^2 + 2*Z^3)} (5 + 74*alpha - 16*alpha^2)*alpha^(-1-n).
a(n) = n!*A052550(n). - R. J. Mathar, Nov 27 2011
MAPLE
spec := [S, {S=Sequence(Prod(Z, Union(Z, Sequence(Union(Z, Z)))))}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
b[n_]:= b[n]= If[n<3, 1+3*Floor[n/2], 3*b[n-1] +b[n-2] -2*b[n-3]];
Table[A052669[n], {n, 0, 40}] (* G. C. Greubel, Jun 14 2022 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Rationals(), 40); Coefficients(R!(Laplace( (1-2*x)/(1-3*x-x^2+2*x^3) ))); // G. C. Greubel, Jun 14 2022
(SageMath)
@CachedFunction
def b(n): # b = A052550
if (n<3): return 1 + 3*(n//2)
else: return 3*b(n-1) +b(n-2) -2*b(n-3)
def A052669(n): return factorial(n)*b(n)
[A052669(n) for n in (0..40)] # G. C. Greubel, Jun 14 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved