For example, 9!! = 1 × 3 × 5 × 7 × 9 = 945.
The direct formula is of course defined only for odd numbers. For odd n the double factorial may be expressed as
The sequence of double factorials for n = 1, 3, 5, 7, ... starts as
Merserve (1948) (possibly the earliest publication to use double factorial notation) states that the double factorial was originally introduced in order to simplify the expression of certain trigonometric integrals arising in the derivation of the Wallis product. Double factorials also arise in the expression of the volume of a hypersphere, and they have many applications in enumerative combinatorics.
Relation to the factorial
Because the double factorial only involves about half the factors of the ordinary factorial, its value is not substantially larger than the square root of the factorial n!, and much smaller than the iterated factorial (n!)!.
In this expression, the first denominator equals and cancels the unwanted even factors from the numerator.
The ordinary factorial, when extended to the Gamma function, has a pole at each negative integer, preventing the factorial from being defined at these numbers. However, the double factorial may be extended to any negative odd integer argument by inverting its recurrence relation
Using this inverted recurrence, −1!! = 1, −3!! = −1, and −5!! = 1/3; negative odd numbers with greater magnitude have fractional double factorials. In particular, this gives, when n is an odd number,
One consequence of this definition is that (as an empty product)
The sequence of double factorials for n = 0, 2, 4, 6, 8, ... starts as
These double factorials for even and odd integers share the following property for all positive integers n:
However, this definition does not match the expression for odd arguments of the double factorial in terms of the ordinary factorial, and is also inconsistent with the extension of the definition of to complex numbers that is achieved via the Gamma function below.
Disregarding the above definition of n!! for even values of n, the double factorial for odd integers can be extended to most real and complex numbers z by noting that when z is a positive odd integer then  
From this one can derive an alternative definition of z!! for non-negative even integer values of z:
with the value for 0!! in this case being
The expression found for z!! is defined for all complex numbers except the negative even integers. Using it as the definition, the volume of an n-dimensional hypersphere of radius R can be expressed as
Applications in enumerative combinatorics
Double factorials are motivated by the fact that they occur frequently in enumerative combinatorics and other settings. For instance, n!! counts
- Perfect matchings of the complete graph Kn + 1. In such a graph, any single vertex v has n possible choices of vertex that it can be matched to, and once this choice is made the remaining problem is one of selecting a perfect matching in a complete graph with two fewer vertices. For instance, a complete graph with four vertices a, b, c, and d has three perfect matchings: ab and cd, ac and bd, and ad and bc. Perfect matchings may be described in several other equivalent ways, including involutions without fixed points on a set of n + 1 items (permutations in which each cycle is a pair) or chord diagrams (sets of chords of a set of n + 1 points evenly spaced on a circle such that each point is the endpoint of exactly one chord, also called Brauer diagrams). The numbers of matchings in complete graphs, without constraining the matchings to be perfect, are instead given by the telephone numbers, which may be expressed as a summation involving double factorials.
- Stirling permutations, permutations of the multiset of numbers 1, 1, 2, 2, ..., k, k in which each pair of equal numbers is separated only by larger numbers, where k = (n + 1)/2. The two copies of k must be adjacent; removing them from the permutation leaves a permutation in which the maximum element is k − 1, with n positions into which the adjacent pair of k values may be placed. From this recursive construction, a proof that the Stirling permutations are counted by the double permutations follows by induction. Alternatively, instead of the restriction that values between a pair may be parger than it, one may also consider the permutations of this multiset in which the first copies of each pair appear in sorted order; such a permutation defines a matching on the 2k positions of the permutation, so again the number of permutations may be counted by the double permutations.
- heap-ordered trees, trees with k + 1 nodes labeled 0, 1, 2, ... k, such that the root of the tree has label 0, each other node has a larger label than its parent, and such that the children of each node have a fixed ordering. An Euler tour of the tree (with doubled edges) gives a Stirling permutation, and every Stirling permutation represents a tree in this way.
- Unrooted binary trees with (n + 5)/2 labeled leaves. Each such tree may be formed from a tree with one fewer leaf, by subdividing one of the n tree edges and making the new vertex be the parent of a new leaf.
- Rooted binary trees with (n + 3)/2 labeled leaves. This case is similar to the unrooted case, but the number of edges that can be subdivided is even, and in addition to subdividing an edge it is possible to add a node to a tree with one fewer leaf by adding a new root whose two children are the smaller tree and the new leaf.
Callan (2009) and Dale & Moon (1993) list several additional objects with the same counting sequence, including "trapezoidal words" (numerals in a mixed radix system with increasing odd radixes), height-labeled Dyck paths, height-labeled ordered trees, "overhang paths", and certain vectors describing the lowest-numbered leaf descendant of each node in a rooted binary tree. For bijective proofs that some of these objects are equinumerous, see Rubey (2008) and Marsh & Martin (2011).
The even double factorials also have applications in enumerative combinatorics; in particular they give the numbers of elements of the hyperoctahedral groups (signed permutations or symmetries of a hypercube)
Using the extension of the double factorial to even arguments, for even values of n,
Some additional identities involving double factorials are:
- Callan, David (2009), A combinatorial survey of identities for the double factorial, arXiv:0906.1317.
- Meserve, B. E. (1948), "Classroom Notes: Double Factorials", The American Mathematical Monthly 55 (7): 425–426, doi:10.2307/2306136, MR 1527019
- Gould, Henry; Quaintance, Jocelyn (2012), "Double fun with double factorials", Mathematics Magazine 85 (3): 177–192, doi:10.4169/math.mag.85.3.177, MR 2924154.
- Dale, M. R. T.; Moon, J. W. (1993), "The permuted analogues of three Catalan sets", Journal of Statistical Planning and Inference 34 (1): 75–87, doi:10.1016/0378-3758(93)90035-5, MR 1209991.
- Hassani, Sadri (2000), Mathematical Methods: For Students of Physics and Related Fields, Undergraduate Texts in Mathematics, Springer, p. 266, ISBN 9780387989587.
- Double factorial: Specific values (formula 06.02.03.0005), Wolfram Research, 2001-10-29, retrieved 2013-03-23.
- Mezey, Paul G. (2009), "Some dimension problems in molecular databases", Journal of Mathematical Chemistry 45 (1): 1–6, doi:10.1007/s10910-008-9365-8.
- Kitaev, Sergey (2011), Patterns in Permutations and Words, EATCS Monographs in Theoretical Computer Science, Springer, p. 96.
- Dale, M. R. T.; Narayana, T. V. (1986), "A partition of Catalan permuted sequences with applications", Journal of Statistical Planning and Inference 14 (2): 245–249, doi:10.1016/0378-3758(86)90161-8, MR 852528.
- Tichy, Robert F.; Wagner, Stephan (2005), "Extremal problems for topological indices in combinatorial chemistry", Journal of Computational Biology 12 (7): 1004–1013, doi:10.1089/cmb.2005.12.1004.
- Janson, Svante (2008), "Plane recursive trees, Stirling permutations and an urn model", Fifth Colloquium on Mathematics and Computer Science, Discrete Math. Theor. Comput. Sci. Proc., AI, Assoc. Discrete Math. Theor. Comput. Sci., Nancy, pp. 541–547, arXiv:0803.1129, MR 2508813.
- Rubey, Martin (2008), "Nestings of matchings and permutations and north steps in PDSAWs", 20th Annual International Conference on Formal Power Series and Algebraic Combinatorics (FPSAC 2008), Discrete Math. Theor. Comput. Sci. Proc., AJ, Assoc. Discrete Math. Theor. Comput. Sci., Nancy, pp. 691–704, MR 2721495.
- Marsh, Robert J.; Martin, Paul (2011), "Tiling bijections between paths and Brauer diagrams", Journal of Algebraic Combinatorics 33 (3): 427–453, arXiv:0906.0912, doi:10.1007/s10801-010-0252-6, MR 2772541.
- Dassios, George; Kiriaki, Kiriakie (1987), "A useful application of Gauss theorem", Bulletin de la Société Mathématique de Grèce 28 (part A): 40–43, MR 935868.