login
Expansion of e.g.f. x*(2+x)/(1-x^2).
4

%I #52 Aug 12 2024 13:24:04

%S 0,2,2,12,24,240,720,10080,40320,725760,3628800,79833600,479001600,

%T 12454041600,87178291200,2615348736000,20922789888000,711374856192000,

%U 6402373705728000,243290200817664000,2432902008176640000,102181884343418880000,1124000727777607680000

%N Expansion of e.g.f. x*(2+x)/(1-x^2).

%C Stirling transform of (-1)^n*a(n-1) = [0,2,-2,12,-24,...] is A052856(n-1) =[0,2,4,14,76,...]. - _Michael Somos_, Mar 04 2004

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=557">Encyclopedia of Combinatorial Structures 557</a>.

%F Recurrence: {a(0)=0, a(1)=2, a(2)=2, (-2-n^2-3*n)*a(n)+a(n+2)=0}.

%F Sum(1/2*(2+_alpha)*_alpha^(-1-n), _alpha=RootOf(-1+_Z^2))*n!.

%F E.g.f.: x*(x+2)/(1-x^2).

%F a(2n+1) = 2*(2n+1)!, a(2n) = (2n)!, if n>0.

%F a(n) = n! if n is even, 2*n! otherwise. a(n) = n!*A000034(n).

%F a(n) = n! / gcd(n, T(n)) where T(n) is the n-th triangular number. - _Andrew S. Plewe_, Jan 09 2006

%F From _Amiram Eldar_, Jul 06 2022: (Start)

%F Sum_{n>=1} 1/a(n) = sinh(1)/2 + cosh(1) - 1.

%F Sum_{n>=1} (-1)^(n+1)/a(n) = sinh(1)/2 - cosh(1) + 1. (End)

%F a(0)=0, a(n) = (1/2)*(3 - (-1)^n)*n! if n>0. - _David Trimas_, Jul 28 2023

%F a(n) = 2 * A191662(n) for n>=1. - _Alois P. Heinz_, Sep 05 2023

%p spec := [S,{S=Prod(Z,Union(Sequence(Z),Sequence(Prod(Z,Z))))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);

%t With[{nn=20},CoefficientList[Series[x (2+x)/(1-x^2),{x,0,nn}],x] Range[ 0,nn]!] (* _Harvey P. Dale_, Jun 10 2018 *)

%t Join[{0}, Table[1/2 (3 - (-1)^n) n!, {n, 20}]] (* _David Trimas_, Jul 28 2023 *)

%o (PARI) a(n)=if(n<0,0,n!*polcoeff((x^2+2*x)/(1-x^2)+x*O(x^n),n))

%o (PARI) a(n)=if(n<1,0,n!*(n%2+1))

%o (PARI) a(n)= n! / gcd(n, n * (n + 1) / 2) \\ _Andrew S. Plewe_, Jan 09 2006

%Y Cf. A000034, A000142, A191662.

%K easy,nonn

%O 0,2

%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000

%E a(20)-a(22) from _Alois P. Heinz_, Sep 05 2023