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 allclose all

Basic Examples  (7)

Evaluate at integer values:

Evaluate at real values:

Plot over a subset of the reals:

Plot over a subset of the complexes:

Series expansion at the origin:

Series expansion at Infinity:

Series expansion at a singular point:

Scope  (30)

Numerical Evaluation  (6)

Evaluate numerically:

Evaluate to high precision:

The precision of the output tracks the precision of the input:

Complex number inputs:

Evaluate efficiently at high precision:

Compute worst-case guaranteed intervals using Interval and CenteredInterval objects:

Or compute average-case statistical intervals using Around:

Compute the elementwise values of an array:

Or compute the matrix Factorial2 function using MatrixFunction:

Specific Values  (3)

Values of Factorial2 at fixed points:

Values at zero:

Find the first positive maximum of Factorial2[x]:

Visualization  (2)

Plot the Factorial2 function:

Plot the real part of :

Plot the imaginary part of :

Function Properties  (10)

Real domain of the double factorial:

Complex domain:

Double factorial has the mirror property :

Factorial2 threads elementwise over lists:

Factorial2 is not an analytic function:

However, it is meromorphic:

Factorial2 is neither nondecreasing nor nonincreasing:

Factorial2 is not injective:

Factorial2 is not surjective:

Factorial2 is neither non-negative nor non-positive:

Factorial2 has both singularity and discontinuity for z-2:

Factorial2 is neither convex nor concave:

Differentiation  (2)

First derivative with respect to z:

Higher derivatives with respect to z:

Plot the higher derivatives with respect to z:

Series Expansions  (4)

Find the Taylor expansion using Series:

Plots of the first three approximations around :

Find the series expansion at Infinity:

Find series expansion for an arbitrary symbolic direction :

Taylor expansion at a generic point:

Function Identities and Simplifications  (3)

Functional identities:

Recurrence relation:

Relationship between Factorial and Factorial2 on the integers:

Generalizations & Extensions  (3)

Infinite arguments give symbolic results:

Series expansion at poles:

Series expansion at infinity (generalized Stirling approximation):

Applications  (5)

Plot of the absolute value of the double factorial in the complex plane:

An infinite series for in terms of the factorial and double factorial:

Calculate the first 30 digits of using this series:

Compare with numerically evaluating Pi:

Verify an expression for the Catalan numbers in terms of double factorials:

For an odd prime, a generalization of Wilson's theorem states that TemplateBox[{{{{(, {p, -, 1}, )}, !!}, =, {G, (, {p, +, 1}, )}}, p}, Mod]. Verify for the first few odd primes:

A determinantal representation for the odd double factorials:

Properties & Relations  (8)

Use FunctionExpand to express the double factorial in terms of the Gamma function:

Use FullSimplify to simplify expressions involving double factorials:

Sums involving Factorial2:

Generating function:

Recover the original power series:

Products involving the double factorial:

Factorial2 can be represented as a DifferenceRoot:

FindSequenceFunction can recognize the Factorial2 sequence:

The exponential generating function for Factorial2:

Possible Issues  (3)

Large arguments can give results too large to be computed explicitly, even approximately:

Smaller values work:

Machine-number inputs can give highprecision results:

To compute a repeated factorial, use instead of :

Neat Examples  (3)

Plot Factorial2 at infinity:

Find the numbers of digits 0 through 9 in 10000!!:

Plot the ratio of doubled factorials over double factorial:

Wolfram Research (1988), Factorial2, Wolfram Language function, https://reference.wolfram.com/language/ref/Factorial2.html (updated 2022).

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_2024_factorial2, author="Wolfram Research", title="{Factorial2}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Factorial2.html}", note=[Accessed: 03-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_factorial2, organization={Wolfram Research}, title={Factorial2}, year={2022}, url={https://reference.wolfram.com/language/ref/Factorial2.html}, note=[Accessed: 03-December-2024 ]}