SciPy

This is documentation for an old release of SciPy (version 0.16.0). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.special.factorialk

scipy.special.factorialk(n, k, exact=True)[source]

n(!!...!) = multifactorial of order k k times

Parameters:

n : int

Calculate multifactorial. If n < 0, the return value is 0.

k : int

Order of multifactorial.

exact : bool, optional

If exact is set to True, calculate the answer exactly using integer arithmetic.

Returns:

val : int

Multi factorial of n.

Raises:

NotImplementedError

Raises when exact is False

Examples

>>>
>>> from scipy.special import factorialk
>>> factorialk(5, 1, exact=True)
120L
>>> factorialk(5, 3, exact=True)
10L