OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 637
FORMULA
E.g.f.: (1 + x - x^2)/((1-x)*(1-x^2)).
Recurrence: a(0)=1, a(1)=2, a(2)=4, (n+1)*a(n) = n*a(n-1) + (n-1)*n*(n+2)*a(n-2).
a(n) = n!*(2*n + 5 - (-1)^n)/4.
a(n) = n!*A004526(n+3). - R. J. Mathar, Nov 27 2011
MAPLE
spec := [S, {S=Prod(Union(Z, Sequence(Z)), Sequence(Prod(Z, Z)))}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
With[{nn=20}, CoefficientList[Series[(1+x-x^2)/((1-x)(1-x^2)), {x, 0, nn}], x] Range[0, nn]!] (* Harvey P. Dale, Feb 10 2014 *)
PROG
(Magma) [Factorial(n)*(2*n+5-(-1)^n)/4: n in [0..30]]; // G. C. Greubel, Jun 02 2022
(SageMath) [factorial(n)*(n+2 + n%2)/2 for n in (0..40)] # G. C. Greubel, Jun 02 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved