JavaScript is disabled
Our website requires JavaScript to function properly. For a better experience, please enable JavaScript in your browser settings before proceeding.
In mathematics, the double factorial or semifactorial of a number n (denoted by n!!) is the product of all the integers from 1 up to n that have the same parity (odd or even) as n. That is,

n
!
!
=

k
=
0

n
2

1

(
n

2
k
)
=
n
(
n

2
)
(
n

4
)

{\displaystyle n!!=\prod _{k=0}^{\left\lceil {\frac {n}{2}}\right\rceil -1}(n-2k)=n(n-2)(n-4)\cdots }
(A consequence of this definition is that 0!! = 1, as an empty product.)
Therefore, for even n the double factorial is

n
!
!
=

k
=
1

n
2

(
2
k
)
=
n
(
n

2
)
(
n

4
)

4

2

,

{\displaystyle n!!=\prod _{k=1}^{\frac {n}{2}}(2k)=n(n-2)(n-4)\cdots 4\cdot 2\,,}
and for odd n it is

n
!
!
=

k
=
1

n
+
1

2

(
2
k

1
)
=
n
(
n

2
)
(
n

4
)

3

1

.

{\displaystyle n!!=\prod _{k=1}^{\frac {n+1}{2}}(2k-1)=n(n-2)(n-4)\cdots 3\cdot 1\,.}
For example, 9!! = 9 × 7 × 5 × 3 × 1 = 945.
The double factorial should not be confused with the factorial function iterated twice, which is written as (n!)! and not n!!.
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)Meserve (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 expressing the volume of a hypersphere, and they have many applications in enumerative combinatorics. They occur in "Student's" t-distribution (1908), though Gosset did not use the double exclamation point notation.
The term odd factorial is sometimes used for the double factorial of an odd number.

View More On Wikipedia.org