A052558 a(n) = n! *((-1)^n + 2*n + 3)/4.
1, 1, 4, 12, 72, 360, 2880, 20160, 201600, 1814400, 21772800, 239500800, 3353011200, 43589145600, 697426329600, 10461394944000, 188305108992000, 3201186852864000, 64023737057280000, 1216451004088320000, 26761922089943040000, 562000363888803840000
Offset: 0
Links
- T. D. Noe, Table of n, a(n) for n=0..100
- A. Moreno Canadas, P. F. Fernandez Espinoza, and I. D. M. Gaviria, Categorification of some integer sequences via Kronecker Modules, JP J. Algebra, Number Theory and Applic. 38 (4) (2016) 339-347
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 500.
Crossrefs
Cf. A002260. - Gary W. Adamson, Apr 20 2009
Cf. A052591. - Emeric Deutsch, Jul 18 2009
Programs
-
GAP
List([0..30], n-> ((-1)^n +2*n +3)*Factorial(n)/4); # G. C. Greubel, May 07 2019
-
Magma
[((-1)^n +2*n +3)*Factorial(n)/4: n in [0..30]]; // G. C. Greubel, May 07 2019
-
Maple
spec := [S,{S=Prod(Sequence(Z),Sequence(Prod(Z,Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
-
Mathematica
Table[n!((-1)^n+2n+3)/4,{n,0,30}] (* Harvey P. Dale, Aug 16 2014 *)
-
PARI
a(n)=if(n<0,0,(1+n\2)*n!)
-
PARI
a(n)=if(n<0, 0, n!*polcoeff(1/(1-x)/(1-x^2)+x*O(x^n), n))
-
Sage
[((-1)^n +2*n +3)*factorial(n)/4 for n in (0..30)] # G. C. Greubel, May 07 2019
Formula
D-finite with recurrence a(n) = a(n-1) + (n^2-1)*a(n-2), with a(1)=1, a(0)=1.
a(n) = ((-1)^n + 2*n + 3)*n!/4.
Let u(1)=1, u(n) = Sum_{k=1..n-1} u(k)*k*(-1)^(k-1) then a(n) = abs(u(n+2)). - Benoit Cloitre, Nov 14 2003
E.g.f.: 1/((1-x)*(1-x^2)).
From Emeric Deutsch, Jul 18 2009: (Start)
a(n) = (n+1)!/2 if n is odd; a(n) = n!(n+2)/2 if n is even.
a(n) = (n+1)! - A052591(n). (End)
E.g.f.: G(0)/(1+x) where G(k) = 1 + 2*x*(k+1)/((2*k+1) - x*(2*k+1)*(2*k+3)/(x*(2*k+3) + 2*(k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 21 2012
Sum_{n>=0} 1/a(n) = e - 1/e = 2*sinh(1) (A174548). - Amiram Eldar, Jan 22 2023
Comments