Double factorial

The fifteen different chord diagrams on six points, or equivalently the fifteen different perfect matchings on a six-vertex complete graph. These are counted by the double factorial 15 = (6 − 1)‼.

In mathematics, the double factorial, or semifactorial, n‼ of a positive integer n is the product of all the positive integers up to n that have the same parity (odd or even) as n. That is,

Restated, this says that for even n, the double factorial is while for odd n it is A few examples are:

  • 1!! = 1 = 1,
  • 2!! = 2 = 2,
  • 3!! = 3 × 1 = 3,
  • 4!! = 4 × 2 = 8,
  • 5!! = 5 × 3 × 1 = 15,
  • 6!! = 6 × 4 × 2 = 48,
  • 7!! = 7 × 5 × 3 × 1 = 105.

Often, both 0!! and (−1)!! are considered empty products that evaluate to 1.

The sequence of double factorials for even n = 0, 2, 4, 6, 8,... starts as

1, 2, 8, 48, 384, 3840, 46080, 645120, ... (sequence A000165 in the OEIS)

The sequence of double factorials for odd n = 1, 3, 5, 7, 9,... starts as

1, 3, 15, 105, 945, 10395, 135135, ... (sequence A001147 in the OEIS)

The term odd factorial is sometimes used for the double factorial of an odd number.

There is another definition of double factorial, which can be evaluated for most complex numbers; see below.