A006882 Double factorials n!!: a(n) = n*a(n-2) for n > 1, a(0) = a(1) = 1.
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
Offset: 0
Examples
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 + ...
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
- Indranil Ghosh, Table of n, a(n) for n = 0..806 (terms 0..100 from T. D. Noe)
- Christian Aebi and Grant Cairns, Generalizations of Wilson's Theorem for Double-, Hyper-, Sub-and Superfactorials, The American Mathematical Monthly 122.5 (2015): 433-443.
- CombOS - Combinatorial Object Server, Generate colored permutations
- Joseph E. Cooper III, A recurrence for an expression involving double factorials, arXiv:1510.00399 [math.CO], 2015.
- Shyam Sunder Gupta, Fascinating Factorials, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 16, 411-442.
- Gary T. Leavens and Mike Vermeulen, 3x+1 search programs, Computers and Mathematics with Applications, 24 (1992), 79-99. (Annotated scanned copy)
- Peter Luschny, Multifactorials
- B. E. Meserve, Double Factorials, American Mathematical Monthly, 55 (1948), 425-426.
- Rudolph Ondrejka, Tables of double factorials, Math. Comp., Vol. 24, No. 109 (1970), p. 231.
- Eric Weisstein's World of Mathematics, Double Factorial.
- Eric Weisstein's World of Mathematics, Multifactorial.
- Index entries for sequences related to factorial numbers
- Index entries for "core" sequences
Crossrefs
Programs
-
Haskell
a006882 n = a006882_list !! n a006882_list = 1 : 1 : zipWith (*) [2..] a006882_list -- Reinhard Zumkeller, Oct 23 2014
-
Magma
DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(n): n in [0..28] ]; // Klaus Brockhaus, Jan 23 2011
-
Maple
A006882 := proc(n) option remember; if n <= 1 then 1 else n*A006882(n-2); fi; end; A006882 := proc(n) doublefactorial(n) ; end proc; seq(A006882(n),n=0..10) ; # R. J. Mathar, Oct 20 2009 A006882 := n -> mul(k, k = select(k -> k mod 2 = n mod 2, [$1 .. n])): seq(A006882(n), n = 0 .. 10); # Peter Luschny, Jun 23 2011 A006882 := proc(n) if n=0 then 1 else mul(n-2*k, k=0..floor(n/2)-1); fi; end; # N. J. A. Sloane, May 27 2016
-
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 *)
-
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 */
-
Python
from sympy import factorial2 def A006882(n): return factorial2(n) # Chai Wah Wu, Apr 03 2021
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) = n!/a(n-1). - Vaclav Kotesovec, Sep 17 2012
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
Sum_{n>=0} 1/a(n) = A143280. - Amiram Eldar, Nov 10 2020
Sum_{n>=0} 1/(a(n)*a(n+1)) = e - 1. - Andrés Ventas, Apr 12 2021
Comments