|
|
A006882
|
|
Double factorials n!!: a(n) = n*a(n-2) for n > 1, a(0) = a(1) = 1.
(Formerly M0876)
|
|
250
|
|
|
1, 1, 2, 3, 8, 15, 48, 105, 384, 945, 3840, 10395, 46080, 135135, 645120, 2027025, 10321920, 34459425, 185794560, 654729075, 3715891200, 13749310575, 81749606400, 316234143225, 1961990553600, 7905853580625, 51011754393600, 213458046676875, 1428329123020800
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Product of pairs of successive terms gives factorials in increasing order. - Amarnath Murthy, Oct 17 2002
a(n) = number of down-up permutations on [n+1] for which the entries in the even positions are increasing. For example, a(3)=3 counts 2143, 3142, 4132. Also, a(n) = number of down-up permutations on [n+2] for which the entries in the odd positions are decreasing. For example, a(3)=3 counts 51423, 52413, 53412. - David Callan, Nov 29 2007
The double factorial of a positive integer n is the product of the positive integers <= n that have the same parity as n. - Peter Luschny, Jun 23 2011
For n even, a(n) is the number of ways to place n points on an n X n grid with pairwise distinct abscissa, pairwise distinct ordinate, and 180-degree rotational symmetry. For n odd, the number of ways is a(n-1) because the center point can be considered "fixed". For 90-degree rotational symmetry cf. A001813, for mirror symmetry see A000085, A135401, and A297708. - Manfred Scheucher, Dec 29 2017
Could be extended to include a(-1) = 1. But a(-2) is not defined, otherwise we would have 1 = a(0) = 0*a(-2). - Jianing Song, Oct 23 2019
|
|
REFERENCES
|
Putnam Contest, 4 Dec. 2004, Problem A3.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
Gary T. Leavens and Mike Vermeulen, 3x+1 search programs, Computers and Mathematics with Applications, 24 (1992), 79-99. (Annotated scanned copy)
|
|
FORMULA
|
a(n) = Product_{i=0..floor((n-1)/2)} (n - 2*i).
E.g.f.: 1+exp(x^2/2)*x*(1+sqrt(Pi/2)*erf(x/sqrt(2))). - Wouter Meeussen, Mar 08 2001
Satisfies a(n+3)*a(n) - a(n+1)*a(n+2) = (n+1)!. [Putnam Contest]
a(n) * a(n+3) = a(n+1) * (a(n+2) + a(n)). a(n) * a(n+1) = (n+1)!. - Michael Somos, Dec 29 2012
a(n) ~ c * n^((n+1)/2) / exp(n/2), where c = sqrt(Pi) if n is even, and c = sqrt(2) if n is odd. - Vaclav Kotesovec, Nov 08 2014
a(2*n) = 2^n*a(n)*a(n-1). a(2^n) = 2^(2^n - 1) * 1!! * 3!! * 7!! * ... * (2^(n-1) - 1)!!. - Peter Bala, Nov 01 2016
a(n) = 2^h*(2/Pi)^(sin(Pi*h)^2/2)*Gamma(h+1) where h = n/2. This analytical extension supports the view that a(-1) = 1 is a meaningful numerical extension. With this definition (-1/2)!! = Gamma(3/4)/Pi^(1/4). - Peter Luschny, Oct 24 2019
a(n) ~ (n+1/6)*sqrt((2/e)*(n/e)^(n-1)*(Pi/2)^(cos(n*Pi/2)^2)). - Peter Luschny, Oct 25 2019
|
|
EXAMPLE
|
G.f. = 1 + x + 2*x^2 + 3*x^3 + 8*x^4 + 15*x^5 + 48*x^6 + 105*x^7 + 384*x^8 + ...
|
|
MAPLE
|
A006882 := proc(n) option remember; if n <= 1 then 1 else n*A006882(n-2); fi; end;
|
|
MATHEMATICA
|
Array[ #!!&, 40, 0 ]
multiFactorial[n_, k_] := If[n < 1, 1, If[n < k + 1, n, n*multiFactorial[n - k, k]]]; Array[ multiFactorial[#, 2] &, 27, 0] (* Robert G. Wilson v, Apr 23 2011 *)
|
|
PROG
|
(PARI) {a(n) = prod(i=0, (n-1)\2, n - 2*i )} \\ Improved by M. F. Hasler, Nov 30 2013
(PARI) {a(n) = if( n<2, n>=0, n * a(n-2))}; /* Michael Somos, Apr 06 2003 */
(PARI) {a(n) = if( n<0, 0, my(E); E = exp(x^2 / 2 + x * O(x^n)); n! * polcoeff( 1 + E * x * (1 + intformal(1 / E)), n))}; /* Michael Somos, Apr 06 2003 */
(Magma) DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(n): n in [0..28] ]; // Klaus Brockhaus, Jan 23 2011
(Haskell)
a006882 n = a006882_list !! n
a006882_list = 1 : 1 : zipWith (*) [2..] a006882_list
(Python)
from sympy import factorial2
|
|
CROSSREFS
|
Bisections are A000165 and A001147. These two entries have more information.
|
|
KEYWORD
|
nonn,easy,core,nice
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|