login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A052566
Expansion of e.g.f. (2 + x)/(1 - x^2).
1
2, 1, 4, 6, 48, 120, 1440, 5040, 80640, 362880, 7257600, 39916800, 958003200, 6227020800, 174356582400, 1307674368000, 41845579776000, 355687428096000, 12804747411456000, 121645100408832000, 4865804016353280000, 51090942171709440000, 2248001455555215360000
OFFSET
0,1
FORMULA
Recurrence: {a(1)=1, a(0)=2, (-2 - n^2 - 3*n)*a(n) + a(n+2) = 0}.
Sum((1/2)*(1 + 2*_alpha)*_alpha^(-1-n), _alpha = RootOf(-1 + _Z^2))*n!.
E.g.f.: (x+2)/(1-x^2).
a(n) = 2n! if n is even, n! if odd.
From Amiram Eldar, Jul 06 2022: (Start)
Sum_{n>=0} 1/a(n) = sinh(1) + cosh(1)/2.
Sum_{n>=0} (-1)^(n+1)/a(n) = sinh(1) - cosh(1)/2. (End)
MAPLE
spec := [S, {S=Union(Sequence(Z), Sequence(Prod(Z, Z)))}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
a:=n->n!+sum((-1)^k*n!, k=0..n): seq(a(n), n=0..19); # Zerinvary Lajos, Mar 25 2008
MATHEMATICA
a[n_] := If[OddQ[n], n!, 2*n!]; Array[a, 20, 0] (* Amiram Eldar, Jul 06 2022 *)
PROG
(PARI) a(n)=if(n<0, 0, n!*polcoeff((x+2)/(1-x^2)+x*O(x^n), n))
CROSSREFS
Cf. A000142.
Sequence in context: A328491 A328357 A341696 * A234946 A223092 A071948
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved