n!!
gives the double factorial of n.
Factorial2 
n!!
gives the double factorial of n.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
. - n!! is a product of even numbers for n even, and odd numbers for n odd.
- Factorial2 can be evaluated to arbitrary numerical precision.
- Factorial2 automatically threads over lists.
- Factorial2 can be used with Interval and CenteredInterval objects. »
Examples
open all close allBasic Examples (6)
Table[n!!, {n, 10}]50!!(1.5)!!Plot over a subset of the reals:
Plot[Factorial2[x], {x, -5, 5}]Plot over a subset of the complexes:
ComplexPlot3D[Factorial2[z], {z, -2 - 2I, 2 + 2I}, PlotLegends -> Automatic]Series expansion at the origin:
Series[Factorial2[x], {x, 0, 2}]//FullSimplifySeries expansion at Infinity:
Series[Factorial2[x], {x, ∞, 2}]//FullSimplify//NormalScope (31)
Numerical Evaluation (6)
Factorial2[4]Factorial2[27]N[Factorial2[3 / 13], 10]The precision of the output tracks the precision of the input:
Factorial2[5.211111111111111111]Factorial2[2. + I]Evaluate efficiently at high precision:
Factorial2[13`100]//TimingFactorial2[45`1000];//TimingCompute worst-case guaranteed intervals using Interval and CenteredInterval objects:
Factorial2[Interval[{2.1, 2.2}]]Factorial2[CenteredInterval[3, 1 / 100]]Or compute average-case statistical intervals using Around:
Factorial2[Around[2, 0.01]]Compute the elementwise values of an array:
Factorial2[{{1, 2}, {3, 4}}]Or compute the matrix Factorial2 function using MatrixFunction:
MatrixFunction[Factorial2, {{1, 2}, {3, 4}}]//FullSimplifySpecific Values (3)
Values of Factorial2 at fixed points:
Table[Factorial2[x ], {x, 1, 4}]Factorial2[0]Find the first positive maximum of Factorial2[x]:
xmax = x /. FindRoot[D[Factorial2[x ], x] == 0, {x, 0.2}]Plot[Factorial2[x], {x, 0, 1}, Epilog -> Style[Point[{xmax, Factorial2[xmax]}], PointSize[Large], Red]]Visualization (2)
Plot the Factorial2 function:
Plot[Factorial2[x], {x, -5, 5}]ComplexContourPlot[Re[Factorial2[z]], {z, -1 - I, 1 + I}, Contours -> 20]ComplexContourPlot[Im[Factorial2[z]], {z, -1 - I, 1 + I}, Contours -> 20]Function Properties (10)
Real domain of the double factorial:
FunctionDomain[Factorial2[x], x]FunctionDomain[Factorial2[z], z, Complexes]Double factorial has the mirror property
:
FullSimplify[Factorial2[Conjugate[z]] == Conjugate[Factorial2[z]]]Factorial2 threads elementwise over lists:
{1, 3, 5, 7, 9}!!Factorial2 is not an analytic function:
FunctionAnalytic[Factorial2[z], z]FunctionMeromorphic[Factorial2[z], z]Factorial2 is neither nondecreasing nor nonincreasing:
FunctionMonotonicity[Factorial2[z], z]Factorial2 is not injective:
FunctionInjective[Factorial2[z], z]Plot[{Factorial2[z], 1.2}, {z, -5, 5}]Factorial2 is not surjective:
FunctionSurjective[Factorial2[z], z]Plot[{Factorial2[z], 0}, {z, -5, 5}]Factorial2 is neither non-negative nor non-positive:
FunctionSign[Factorial2[z], z]Factorial2 has both singularity and discontinuity for z≤-2:
FunctionSingularities[Factorial2[z], z]FunctionDiscontinuities[Factorial2[z], z]Factorial2 is neither convex nor concave:
FunctionConvexity[Factorial2[z], z]Differentiation (2)
First derivative with respect to z:
D[Factorial2[z], z]Higher derivatives with respect to z:
Table[D[Factorial2[z], {z, k}], {k, 1, 3}]//FullSimplifyPlot the higher derivatives with respect to z:
Plot[%, {z, -5, 5}, PlotLegends -> {"First Derivative", "Second Derivative", "Third Derivative"}]Series Expansions (5)
Find the Taylor expansion using Series:
Series[Factorial2[x], {x, 0, 3}]// Normal// FullSimplifyPlots of the first three approximations around
:
terms = Normal@Table[Series[Factorial2[x], {x, 0, m}], {m, 1, 5, 2}];
Plot[{Factorial2[x], terms}, {x, -5, 5}]Find the series expansion at Infinity:
Series[Factorial2[x], {x, Infinity, 1}]Series expansion at a singular point:
Series[Factorial2[x], {x, -1, 2}, Assumptions -> x > 1]//FullSimplifyFind series expansion for an arbitrary symbolic direction
:
Series[Factorial2[x], {x, DirectedInfinity[z], 1}, Assumptions -> x > 0]// FullSimplifyTaylor expansion at a generic point:
Series[Factorial2[x], {x, x0, 2}]// FullSimplifyFunction Identities and Simplifications (3)
Factorial2[n] == n Factorial2[n - 2]//FullSimplify(n - 2)!! == 2^(1/4) (-3 + 2 n - Cos[n π]) π^(1/4) (-1 + Cos[n π]) Gamma[(n/2)]//FullSimplifyn!! == ((n + 2)!!/n + 2)//FullSimplifyRelationship between Factorial and Factorial2 on the integers:
FullSimplify[n! == n!!(n - 1)!!, n∈ℤ]Generalizations & Extensions (3)
Infinite arguments give symbolic results:
Factorial2[Infinity]Factorial2[-Infinity]Series[n!!, {n, -2, 1}]Series expansion at infinity (generalized Stirling approximation):
Series[n!!, {n, Infinity, 2}]Applications (5)
Plot of the absolute value of the double factorial in the complex plane:
Plot3D[Abs[Factorial2[x + I y]], {x, -5, 2}, {y, -1, 1}]An infinite series for
in terms of the factorial and double factorial:
Underoverscript[∑, n = 0, ∞](2n!/(2n + 1)!!)Calculate the first 30 digits of
using this series:
N[Sum[2 n! / (2 n + 1)!!, {n, 0, 100}], 30]Compare with numerically evaluating Pi:
N[π, 30]Verify an expression for the Catalan numbers in terms of double factorials:
Assuming[n∈Integers && n >= 0, FullSimplify[CatalanNumber[n] == (2^2n + 1(2n - 1)!!/(2n + 2)!!)]]For
an odd prime, a generalization of Wilson's theorem states that
. Verify for the first few odd primes:
Table[Mod[(p - 1)!!, p] == Mod[BarnesG[p + 1], p], {p, Prime[Range[2, 11]]}]A determinantal representation for the odd double factorials:
Table[Det[Array[Min, {n, n}] ^ 2], {n, 9}]Table[(2n - 1)!!, {n, 9}]Properties & Relations (8)
Use FunctionExpand to express the double factorial in terms of the Gamma function:
FunctionExpand[(1 / 2)!!]FunctionExpand[(2n)!!]Refine[%, n∈Integers]Use FullSimplify to simplify expressions involving double factorials:
FullSimplify[n!!(n + 1)!! - n n!]Sums involving Factorial2:
Sum[k!!, {k, 0, n, 2}]Sum[k!!, {k, 1, n, 2}]Sum[1 / k!!, {k, 0, Infinity, 2}]Sum[1 / k!!, {k, 1, Infinity, 2}]Generating function:
Sum[k!! x ^ k, {k, 1, Infinity, 2}, Regularization -> "Borel"]Sum[k!! x ^ k, {k, 0, Infinity, 2}, Regularization -> "Borel"]Recover the original power series:
Series[%, {x, 0, 12}]Products involving the double factorial:
Product[(2n - 1)!!, {n, m}]Product[(2n)!!, {n, m}]Factorial2 can be represented as a DifferenceRoot:
DifferenceRootReduce[Factorial2[k], k]FindSequenceFunction can recognize the Factorial2 sequence:
Table[Factorial2[n], {n, 10}]FindSequenceFunction[%, n]The exponential generating function for Factorial2:
ExponentialGeneratingFunction[Factorial2[n], n, x]Possible Issues (3)
Large arguments can give results too large to be computed explicitly, even approximately:
(10.*^14)!!(10. ^ 7)!!Machine-number inputs can give high‐precision results:
Factorial2[10. ^ 3]MachineNumberQ[%]To compute a repeated factorial, use
instead of
:
5!!(5!)!Neat Examples (3)
Plot Factorial2 at infinity:
DensityPlot[Arg[Factorial2[1 / (x + I y)]], {x, -1 / 2, 1 / 2}, {y, -1 / 2, 1 / 2}, Exclusions -> {}]//QuietFind the numbers of digits 0 through 9 in 10000!!:
DigitCount[10000!!]Plot the ratio of doubled factorials over double factorial:
Plot[(n!)! / n!!, {n, -1 / 2, 2}]Tech Notes
Related Guides
Related Links
History
Introduced in 1988 (1.0) | Updated in 2021 (13.0) ▪ 2022 (13.1)
Text
Wolfram Research (1988), Factorial2, Wolfram Language function, https://reference.wolfram.com/language/ref/Factorial2.html (updated 2022).
CMS
Wolfram Language. 1988. "Factorial2." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/Factorial2.html.
APA
Wolfram Language. (1988). Factorial2. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Factorial2.html
BibTeX
@misc{reference.wolfram_2026_factorial2, author="Wolfram Research", title="{Factorial2}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Factorial2.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_factorial2, organization={Wolfram Research}, title={Factorial2}, year={2022}, url={https://reference.wolfram.com/language/ref/Factorial2.html}, note=[Accessed: 12-June-2026]}