login
a(n) = (n-1)*a(n-2), a(0)=1, a(1)=0.
23

%I #99 Nov 14 2023 14:05:56

%S 1,0,1,0,3,0,15,0,105,0,945,0,10395,0,135135,0,2027025,0,34459425,0,

%T 654729075,0,13749310575,0,316234143225,0,7905853580625,0,

%U 213458046676875,0,6190283353629375,0,191898783962510625,0,6332659870762850625,0,221643095476699771875

%N a(n) = (n-1)*a(n-2), a(0)=1, a(1)=0.

%C a(n) is the number of ways of separating n terms into pairs. - _Stephen Crowley_, Apr 07 2007

%C a(n) is the n-th moment of the standard normal distribution. - _Hal M. Switkay_, Nov 06 2019

%C a(n) is the number of fixed-point free involutions in the symmetric group of degree n. - _Nick Krempel_, Feb 26 2020

%D Richard Bronson, Schaum's Outline of Modern Introductory Differential Equations, MacGraw-Hill, New York, 1973, page 107, solved problem 19.18

%D Norbert Wiener, Nonlinear Problems in Random Theory, 1958, Equation 1.31

%H G. C. Greubel, <a href="/A123023/b123023.txt">Table of n, a(n) for n = 0..799</a>

%H Mihai Nica, <a href="https://www.youtube.com/watch?v=oPQ4mNcqY7k">Terence Tao's central limit theorem, Double Factorials (!!) and the Moment Method</a>, YouTube video (2023).

%H Sebastian Volz, <a href="https://www.uni-saarland.de/fileadmin/upload/lehrstuhl/weber-moritz/Abschlussarbeiten/volz-bachelors-thesis.pdf">Design and Implementation of Efficient Algorithms for Operations on Partitions of Sets</a>, Bachelor Thesis, Saarland Univ. (Germany, 2023). See p. 45.

%H Michael Wallner, <a href="https://arxiv.org/abs/1706.07163">A bijection of plane increasing trees with relaxed binary trees of right height at most one</a>, arXiv:1706.07163 [math.CO], 2017-2018, Table 2 on p. 15.

%F a(n) = (1/2)*Gamma((1/2)*n + 1/2)*2^((1/2)*n)*(1 + (-1)^n)/sqrt(Pi). - _Stephen Crowley_, Apr 07 2007

%F E.g.f.: exp(x^2/2). - _Geoffrey Critzer_, Mar 15 2009

%F a(2n) = A001147(n). - _R. J. Mathar_, Oct 11 2011

%F From _Sergei N. Gladkovskii_, Nov 18 2012, Dec 05 2012, May 16 2013, May 24 2013, Jun 07 2013: (Start)

%F Continued fractions:

%F E.g.f.: E(0) where E(k) = 1 + x^2*(4*k+1)/((4*k+2)*(4*k+3) - x^2*(4*k+2)*(4*k+3)^2/(x^2*(4*k+3) + (4*k+4)*(4*k+5)/E(k+1))).

%F G.f.: 1/G(0) where G(k) = 1 - x^2*(k+1)/G(k+1).

%F G.f.: 1 + x^2/(1+x) + Q(0)*x^3/(1+x), where Q(k) = 1 + (2*k+3)*x/(1 - x/(x + 1/Q(k+1))).

%F G.f.: G(0)/2, where G(k) = 1 + 1/(1-x/(x+1/x/(2*k+1)/G(k+1))).

%F G.f.: (G(0) - 1)*x/(1+x) + 1, where G(k) = 1 + x*(2*k+1)/(1 - x/(x + 1/G(k+1))). (End)

%F For n even, a(n) = A001147(n/2) = A124794(3^(n/2)). a(n) is also the coefficient of x1*...*xn in Product_{1 <= i < j <= n} (1 + xi*xj). - _Gus Wiseman_, Dec 23 2018

%F a(n) = 2^(n/2)*Pochhammer(1/2, n/2)*(n+1 mod 2). - _Peter Luschny_, Jan 11 2023

%e From _Gus Wiseman_, Dec 23 2018: (Start)

%e The a(6) = 15 ways of partitioning {1,2,3,4,5,6} into disjoint pairs:

%e {{12}{34}{56}}, {{12}{35}{46}}, {{12}{36}{45}},

%e {{13}{24}{56}}, {{13}{25}{46}}, {{13}{26}{45}},

%e {{14}{23}{56}}, {{14}{25}{36}}, {{14}{26}{35}},

%e {{15}{23}{46}}, {{15}{24}{36}}, {{15}{26}{34}},

%e {{16}{23}{45}}, {{16}{24}{35}}, {{16}{25}{34}}.

%e (End)

%p with(combstruct): ZL2 := [S, {S=Set(Cycle(Z, card=2))}, labeled]:

%p seq(count(ZL2, size=n), n=0..36); # _Zerinvary Lajos_, Sep 24 2007

%p a := n -> ifelse(irem(n, 2) = 1, 0, 2^(n/2) * pochhammer(1/2, n/2)):

%p seq(a(n), n = 0..36); # _Peter Luschny_, Jan 11 2023

%t RecurrenceTable[{a[0] == 1, a[1] == 0, a[n] == (n - 1) a[n - 2]}, a[n], {n, 0, 31}] (* _Ray Chandler_, Jul 30 2015 *)

%o (Magma) a:=[1,0]; [n le 2 select a[n] else (n-2)*Self(n-2): n in [1..30]]; // _Marius A. Burtea_, Nov 07 2019

%Y Cf. A000085, A000110, A000124, A000142, A000587, A001147, A001464, A006129, A079267, A124794, A186021, A295193.

%K nonn,easy

%O 0,5

%A _Roger L. Bagula_, Sep 24 2006

%E Edited by _N. J. A. Sloane_, Jan 06 2008

%E Better name by _Sergei N. Gladkovskii_, May 24 2013

%E Leading term 1 dropped, offset changed, and entry edited correspondingly by _Andrey Zabolotskiy_, Nov 07 2019