OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..350
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 635
FORMULA
E.g.f.: (1 + x - x^3)/((1-x)*(1-x^2)).
Recurrence: a(0)=1, a(1)=2, a(2)=6, a(3)=18, (n+4)*a(n+2) = (n+2)*a(n+1) + (n+1)*(n+2)*(n+5)*a(n).
a(n) = n! * (2*n + 7 + (-1)^n)/4.
a(n) = n!*A004526(n+4), n>0. - R. J. Mathar, Nov 27 2011
MAPLE
spec := [S, {S=Prod(Sequence(Z), Union(Z, Sequence(Prod(Z, Z))))}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
Table[n!*(2*n+7+(-1)^n)/4 -Boole[n==0], {n, 0, 30}] (* G. C. Greubel, Jun 03 2022 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Rationals(), 30); Coefficients(R!(Laplace( (1+x-x^3)/((1-x)*(1-x^2)) ))); // G. C. Greubel, Jun 03 2022
(SageMath) [factorial(n)*(n + 3 + ((n+1)%2))/2 - bool(n==0) for n in (0..30)] # G. C. Greubel, Jun 03 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved