# Factorial

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Factorial
> Markdown URL: https://mediated.wiki/source/Factorial.md
> Source: https://en.wikipedia.org/wiki/Factorial
> Source revision: 1356976734
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Product of numbers from 1 to n

This article is about a mathematical function. For the game, see [Factorio](/source/Factorio). For other uses, see [Factorial (disambiguation)](/source/Factorial_(disambiguation)).

Selected factorials; values in scientific notation are rounded n {\displaystyle n} n ! {\displaystyle n!} 0 1 1 1 2 2 3 6 4 24 5 120 6 720 7 5040 8 40320 9 362880 10 3628800 11 39916800 12 479001600 13 6227020800 14 87178291200 15 1307674368000 16 20922789888000 17 355687428096000 18 6402373705728000 19 121645100408832000 20 2432902008176640000 25 1.551121004×1025 50 3.041409320×1064 52 8.065817517×1067 70 1.197857167×10100 100 9.332621544×10157 450 1.733368733×101000 1000 4.023872601×102567 3249 6.412337688×1010000 10000 2.846259681×1035659 25206 1.205703438×10100000 100000 2.824229408×10456573 205023 2.503898932×101000004 1000000 = 106 8.263931688×105565708 ≈ 105.5657089172×106 1010 109.5657055186×1010 1020 1019.5657055181×1020 1050 1049.5657055181×1050 10100 1099.5657055181×10100 101000 10999.5657055181×101000

In [mathematics](/source/Mathematics), the **factorial** of a non-negative [integer](/source/Integer) n {\displaystyle n} , denoted by n ! {\displaystyle n!} , is the [product](/source/Product_(mathematics)) of all positive integers less than or equal to n {\displaystyle n} . The factorial of n {\displaystyle n} also equals the product of n {\displaystyle n} with the next smaller factorial: n ! = n × ( n − 1 ) × ( n − 2 ) × ( n − 3 ) × ⋯ × 3 × 2 × 1 = { 1 , if n = 0 n × ( n − 1 ) ! , if n ≥ 1. {\displaystyle {\begin{aligned}n!&=n\times (n-1)\times (n-2)\times (n-3)\times \cdots \times 3\times 2\times 1\\&={\begin{cases}1,&{\text{if }}n=0\\n\times (n-1)!,&{\text{if }}n\geq 1.\end{cases}}\\\end{aligned}}} For example, 5 ! = 5 × 4 ! = 5 × 4 × 3 × 2 × 1 = 120. {\displaystyle 5!=5\times 4!=5\times 4\times 3\times 2\times 1=120.} The value of 0! is 1, according to the convention for an [empty product](/source/Empty_product).[1]

Factorials have been discovered in several ancient cultures, notably in [Indian mathematics](/source/Indian_mathematics) in the canonical works of [Jain literature](/source/Jain_literature), and by Jewish mystics in the Talmudic book *[Sefer Yetzirah](/source/Sefer_Yetzirah)*. The factorial operation is encountered in many areas of mathematics, notably in [combinatorics](/source/Combinatorics), where its most basic use counts the possible distinct [sequences](/source/Sequence) – the [permutations](/source/Permutation) – of n {\displaystyle n} distinct objects: there are n ! {\displaystyle n!} . In [mathematical analysis](/source/Mathematical_analysis), factorials are used in [power series](/source/Power_series) for the [exponential function](/source/Exponential_function) and other functions, and they also have applications in [algebra](/source/Algebra), [number theory](/source/Number_theory), [probability theory](/source/Probability_theory), and [computer science](/source/Computer_science).

Much of the mathematics of the factorial function was developed beginning in the late 18th and early 19th centuries. [Stirling's approximation](/source/Stirling's_approximation) provides an accurate approximation to the factorial of large numbers, showing that it grows more quickly than [exponential growth](/source/Exponential_growth). [Legendre's formula](/source/Legendre's_formula) describes the exponents of the prime numbers in a [prime factorization](/source/Prime_factorization) of the factorials, and can be used to count the trailing zeros of the factorials. [Daniel Bernoulli](/source/Daniel_Bernoulli) and [Leonhard Euler](/source/Leonhard_Euler) [interpolated](/source/Interpolate) the factorial function to a continuous function of [complex numbers](/source/Complex_number), except at the negative integers, the (offset) [gamma function](/source/Gamma_function).

Many other notable functions and number sequences are closely related to the factorials, including the [binomial coefficients](/source/Binomial_coefficient), [double factorials](/source/Double_factorial), [falling factorials](/source/Falling_factorial), [primorials](/source/Primorial), and [subfactorials](/source/Subfactorial). Implementations of the factorial function are commonly used as an example of different [computer programming](/source/Computer_programming) styles, and are included in [scientific calculators](/source/Scientific_calculator) and scientific computing software libraries. Although directly computing large factorials using the product formula or recurrence is not efficient, faster algorithms are known, matching to within a constant factor the time for fast [multiplication algorithms](/source/Multiplication_algorithm) for numbers with the same number of digits.

## History

The concept of factorials has arisen independently in many cultures:

- In [Indian mathematics](/source/Indian_mathematics), one of the earliest known descriptions of factorials comes from the Anuyogadvāra-sūtra,[2] one of the canonical works of [Jain literature](/source/Jain_literature), which has been assigned dates varying from 300 BCE to 400 CE.[3] It separates out the sorted and reversed order of a set of items from the other ("mixed") orders, evaluating the number of mixed orders by subtracting two from the usual product formula for the factorial. The product rule for permutations was also described by 6th-century CE Jain monk [Jinabhadra](/source/Jinabhadra).[2] Hindu scholars have been using factorial formulas since at least 1150, when [Bhāskara II](/source/Bh%C4%81skara_II) mentioned factorials in his work [Līlāvatī](/source/L%C4%ABl%C4%81vat%C4%AB), in connection with a problem of how many ways [Vishnu](/source/Vishnu) could hold his four characteristic objects (a [conch shell](/source/Shankha), [discus](/source/Sudarshana_Chakra), [mace](/source/Kaumodaki), and [lotus flower](/source/Sacred_lotus_in_religious_art)) in his four hands, and a similar problem for a ten-handed god.[4]

- In the mathematics of the Middle East, the Hebrew mystic book of creation *[Sefer Yetzirah](/source/Sefer_Yetzirah)*, from the [Talmudic period](/source/Talmud) (200 to 500 CE), lists factorials up to 7! as part of an investigation into the number of words that can be formed from the [Hebrew alphabet](/source/Hebrew_alphabet).[5][6] Factorials were also studied for similar reasons by 8th-century Arab grammarian [Al-Khalil ibn Ahmad al-Farahidi](/source/Al-Khalil_ibn_Ahmad_al-Farahidi).[5] Arab mathematician [Ibn al-Haytham](/source/Ibn_al-Haytham) (also known as Alhazen, c. 965 – c. 1040) was the first to formulate [Wilson's theorem](/source/Wilson's_theorem) connecting the factorials with the [prime numbers](/source/Prime_number).[7]

- In Europe, although [Greek mathematics](/source/Greek_mathematics) included some combinatorics, and [Plato](/source/Plato) famously used 5,040 (a factorial) as the population of an ideal community, in part because of its divisibility properties,[8] there is no direct evidence of ancient Greek study of factorials. Instead, the first work on factorials in Europe was by Jewish scholars such as [Shabbethai Donnolo](/source/Shabbethai_Donnolo), explicating the Sefer Yetzirah passage.[9] In 1677, British author [Fabian Stedman](/source/Fabian_Stedman) described the application of factorials to [change ringing](/source/Change_ringing), a musical art involving the ringing of several tuned bells.[10][11]

From the late 15th century onward, factorials became the subject of study by Western mathematicians. In a 1494 treatise, Italian mathematician [Luca Pacioli](/source/Luca_Pacioli) calculated factorials up to 11!, in connection with a problem of dining table arrangements.[12] [Christopher Clavius](/source/Christopher_Clavius) discussed factorials in a 1603 commentary on the work of [Johannes de Sacrobosco](/source/Johannes_de_Sacrobosco), and in the 1640s, French polymath [Marin Mersenne](/source/Marin_Mersenne) published large (but not entirely correct) tables of factorials, up to 64!, based on the work of Clavius.[13] The [power series](/source/Power_series) for the [exponential function](/source/Exponential_function), with the reciprocals of factorials for its coefficients, was first formulated in 1676 by [Isaac Newton](/source/Isaac_Newton) in a letter to [Gottfried Wilhelm Leibniz](/source/Gottfried_Wilhelm_Leibniz).[14] Other important works of early European mathematics on factorials include extensive coverage in a 1685 treatise by [John Wallis](/source/John_Wallis), a study of their approximate values for large values of n {\displaystyle n} by [Abraham de Moivre](/source/Abraham_de_Moivre) in 1721, a 1729 letter from [James Stirling](/source/James_Stirling_(mathematician)) to de Moivre stating what became known as [Stirling's approximation](/source/Stirling's_approximation), and work at the same time by [Daniel Bernoulli](/source/Daniel_Bernoulli) and [Leonhard Euler](/source/Leonhard_Euler) formulating the continuous extension of the factorial function to the [gamma function](/source/Gamma_function).[15] [Adrien-Marie Legendre](/source/Adrien-Marie_Legendre) included [Legendre's formula](/source/Legendre's_formula), describing the exponents in the [factorization](/source/Integer_factorization) of factorials into [prime powers](/source/Prime_power), in an 1808 text on [number theory](/source/Number_theory).[16]

The notation n ! {\displaystyle n!} for factorials was introduced by the French mathematician [Christian Kramp](/source/Christian_Kramp) in 1808.[17] Many other notations have also been used. Another later notation | n _ {\displaystyle \vert \!{\underline {\,n}}} , in which the argument of the factorial was half-enclosed by the left and bottom sides of a box, was popular for some time in Britain and America but fell out of use, perhaps because it is difficult to typeset.[17] The word "factorial" (originally French: *factorielle*) was first used in 1800 by [Louis François Antoine Arbogast](/source/Louis_Fran%C3%A7ois_Antoine_Arbogast),[18] in the first work on [Faà di Bruno's formula](/source/Fa%C3%A0_di_Bruno's_formula),[19] but referring to a more general concept of products of [arithmetic progressions](/source/Arithmetic_progression). The "factors" that this name refers to are the terms of the product formula for the factorial.[20]

## Definition

The factorial function of a positive integer n {\displaystyle n} is defined by the product of all positive integers not greater than n {\displaystyle n} [1] n ! = 1 ⋅ 2 ⋅ 3 ⋯ ( n − 2 ) ⋅ ( n − 1 ) ⋅ n . {\displaystyle n!=1\cdot 2\cdot 3\cdots (n-2)\cdot (n-1)\cdot n.} This may be written more concisely in [product notation](/source/Multiplication#Capital_pi_notation) as[1] n ! = ∏ i = 1 n i . {\displaystyle n!=\prod _{i=1}^{n}i.}

If this product formula is changed to keep all but the last term, it would define a product of the same form, for a smaller factorial. This leads to a [recurrence relation](/source/Recurrence_relation), according to which each value of the factorial function can be obtained by multiplying the previous value by n {\displaystyle n} :[21] n ! = n ⋅ ( n − 1 ) ! . {\displaystyle n!=n\cdot (n-1)!.} For example, 5 ! = 5 ⋅ 4 ! = 5 ⋅ 24 = 120 {\displaystyle 5!=5\cdot 4!=5\cdot 24=120} .

### Factorial of zero

The factorial of 0 {\displaystyle 0} is 1 {\displaystyle 1} , or in symbols, 0 ! = 1 {\displaystyle 0!=1} . There are several motivations for this definition:

- For n = 0 {\displaystyle n=0} , the definition of n ! {\displaystyle n!} as a product involves the product of no numbers at all, and so is an example of the broader convention that the [empty product](/source/Empty_product), a product of no factors, is equal to the multiplicative identity.[22]

- There is exactly one permutation of zero objects: with nothing to permute, the only rearrangement is to do nothing.[21]

- This convention makes many identities in [combinatorics](/source/Combinatorics) valid for all valid choices of their parameters. For instance, the number of ways to choose all n {\displaystyle n} elements from a set of n {\displaystyle n} is ( n n ) = n ! n ! 0 ! = 1 , {\textstyle {\tbinom {n}{n}}={\tfrac {n!}{n!0!}}=1,} a [binomial coefficient](/source/Binomial_coefficient) identity that would only be valid with 0 ! = 1 {\displaystyle 0!=1} .[23]

- With 0 ! = 1 {\displaystyle 0!=1} , the recurrence relation for the factorial remains valid at n = 1 {\displaystyle n=1} . Therefore, with this convention, a [recursive](/source/Recursion) computation of the factorial needs to have only the value for zero as a [base case](/source/Base_case_(recursion)), simplifying the computation and avoiding the need for additional special cases.[24]

- Setting 0 ! = 1 {\displaystyle 0!=1} allows for the compact expression of many formulae, such as the [exponential function](/source/Exponential_function), as a [power series](/source/Power_series): e x = ∑ n = 0 ∞ x n n ! . {\textstyle e^{x}=\sum _{n=0}^{\infty }{\frac {x^{n}}{n!}}.} [14]

- This choice matches the [gamma function](/source/Gamma_function) 0 ! = Γ ( 0 + 1 ) = 1 {\displaystyle 0!=\Gamma (0+1)=1} , and the gamma function is defined as a continuous function of complex numbers that does not involve a separate choice at this value.[25]

## Applications

The earliest uses of the factorial function involve counting [permutations](/source/Permutations): there are n ! {\displaystyle n!} different ways of arranging n {\displaystyle n} distinct objects into a sequence.[26] Factorials appear more broadly in many formulas in [combinatorics](/source/Combinatorics), to account for different orderings of objects. For instance the [binomial coefficients](/source/Binomial_coefficient) ( n k ) {\displaystyle {\tbinom {n}{k}}} count the k {\displaystyle k} -element [combinations](/source/Combination) (subsets of k {\displaystyle k} elements) from a set with n {\displaystyle n} elements, and can be computed from factorials using the formula[27] ( n k ) = n ! k ! ( n − k ) ! . {\displaystyle {\binom {n}{k}}={\frac {n!}{k!(n-k)!}}.} The [Stirling numbers of the first kind](/source/Stirling_numbers_of_the_first_kind) sum to the factorials, and count the permutations of n {\displaystyle n} grouped into subsets with the same numbers of cycles.[28] Another combinatorial application is in counting [derangements](/source/Derangement), permutations that do not leave any element in its original position; the number of derangements of n {\displaystyle n} items is the [nearest integer](/source/Rounding) to n ! / e {\displaystyle n!/e} .[29]

In [algebra](/source/Algebra), the factorials arise through the [binomial theorem](/source/Binomial_theorem), which uses binomial coefficients to expand powers of sums.[30] They also occur in the coefficients used to relate certain families of polynomials to each other, for instance in [Newton's identities](/source/Newton's_identities) for [symmetric polynomials](/source/Symmetric_polynomial).[31] Their use in counting permutations can also be restated algebraically: the factorials are the [orders](/source/Order_of_a_group) of finite [symmetric groups](/source/Symmetric_group).[32] In [calculus](/source/Calculus), factorials occur in [Faà di Bruno's formula](/source/Fa%C3%A0_di_Bruno's_formula) for chaining higher derivatives.[19] In [mathematical analysis](/source/Mathematical_analysis), factorials frequently appear in the denominators of [power series](/source/Power_series), most notably in the series for the [exponential function](/source/Exponential_function),[14] e x = 1 + x 1 + x 2 2 + x 3 6 + ⋯ = ∑ k = 0 ∞ x k k ! , {\displaystyle e^{x}=1+{\frac {x}{1}}+{\frac {x^{2}}{2}}+{\frac {x^{3}}{6}}+\cdots =\sum _{k=0}^{\infty }{\frac {x^{k}}{k!}},} and in the coefficients of other [Taylor series](/source/Taylor_series) (in particular those of the [trigonometric](/source/Trigonometric_functions) and [hyperbolic functions](/source/Hyperbolic_functions)), where they cancel factors of n ! {\displaystyle n!} coming from the n {\displaystyle n} th derivative of x n {\displaystyle x^{n}} .[33] This usage of factorials in power series connects back to [analytic combinatorics](/source/Analytic_combinatorics) through the [exponential generating function](/source/Exponential_generating_function), which for a [combinatorial class](/source/Combinatorial_class) with n i {\displaystyle n_{i}} elements of size i {\displaystyle i} is defined as the power series[34] ∑ k = 0 ∞ x k n k k ! . {\displaystyle \sum _{k=0}^{\infty }{\frac {x^{k}n_{k}}{k!}}.}

In [number theory](/source/Number_theory), the most salient property of factorials is the [divisibility](/source/Divisibility) of n ! {\displaystyle n!} by all positive integers up to n {\displaystyle n} , described more precisely for prime factors by [Legendre's formula](/source/Legendre's_formula). It follows that arbitrarily large [prime numbers](/source/Prime_number) can be found as the prime factors of the numbers n ! ± 1 {\displaystyle n!\pm 1} , leading to a proof of [Euclid's theorem](/source/Euclid's_theorem) that the number of primes is infinite.[35] When n ! ± 1 {\displaystyle n!\pm 1} is itself prime it is called a [factorial prime](/source/Factorial_prime);[36] relatedly, [Brocard's problem](/source/Brocard's_problem), also posed by [Srinivasa Ramanujan](/source/Srinivasa_Ramanujan), concerns the existence of [square numbers](/source/Square_number) of the form n ! + 1 {\displaystyle n!+1} .[37] In contrast, the numbers n ! + 2 , n ! + 3 , … n ! + n {\displaystyle n!+2,n!+3,\dots n!+n} must all be composite, proving the existence of arbitrarily large [prime gaps](/source/Prime_gap).[38] An elementary [proof of Bertrand's postulate](/source/Proof_of_Bertrand's_postulate) on the existence of a prime in any interval of the form [ n , 2 n ] {\displaystyle [n,2n]} , one of the first results of [Paul Erdős](/source/Paul_Erd%C5%91s), was based on the divisibility properties of factorials.[39][40] The [factorial number system](/source/Factorial_number_system) is a [mixed radix](/source/Mixed_radix) notation for numbers in which the place values of each digit are factorials.[41]

Factorials are used extensively in [probability theory](/source/Probability_theory), for instance in the [Poisson distribution](/source/Poisson_distribution)[42] and in the probabilities of [random permutations](/source/Random_permutation).[43] In [computer science](/source/Computer_science), beyond appearing in the analysis of [brute-force searches](/source/Brute-force_search) over permutations,[44] factorials arise in the [lower bound](/source/Lower_bound) of log 2 ⁡ n ! = n log 2 ⁡ n − O ( n ) {\displaystyle \log _{2}n!=n\log _{2}n-O(n)} on the number of comparisons needed to [comparison sort](/source/Comparison_sort) a set of n {\displaystyle n} items,[45] and in the analysis of chained [hash tables](/source/Hash_table), where the distribution of keys per cell can be accurately approximated by a Poisson distribution.[46] Moreover, factorials naturally appear in formulae from [quantum](/source/Quantum_mechanics) and [statistical physics](/source/Statistical_physics), where one often considers all the possible permutations of a set of particles. In [statistical mechanics](/source/Statistical_mechanics), calculations of [entropy](/source/Entropy) such as [Boltzmann's entropy formula](/source/Boltzmann's_entropy_formula) or the [Sackur–Tetrode equation](/source/Sackur%E2%80%93Tetrode_equation) must correct the count of [microstates](/source/Microstate_(statistical_mechanics)) by dividing by the factorials of the numbers of each type of [indistinguishable particle](/source/Identical_particles) to avoid the [Gibbs paradox](/source/Gibbs_paradox). Quantum physics provides the underlying reason for why these corrections are necessary.[47]

## Properties

Comparison of the factorial, Stirling's approximation, and the simpler approximation

        (
        n

          /

        e

          )

            n

    {\displaystyle (n/e)^{n}}

, on a doubly logarithmic scale

[Relative error](/source/Relative_error) in a truncated Stirling series vs. number of terms

### Growth and approximation

Main article: [Stirling's approximation](/source/Stirling's_approximation)

As a function of n {\displaystyle n} , the factorial has faster than [exponential growth](/source/Exponential_growth), but grows more slowly than a [double exponential function](/source/Double_exponential_function).[48] Its growth rate is similar to n n {\displaystyle n^{n}} , but slower by an exponential factor. One way of approaching this result is by taking the [natural logarithm](/source/Natural_logarithm) of the factorial, which turns its product formula into a sum, and then estimating the sum by an integral: ln ⁡ n ! = ∑ x = 1 n ln ⁡ x ≈ ∫ 1 n ln ⁡ x d x = n ln ⁡ n − n + 1. {\displaystyle \ln n!=\sum _{x=1}^{n}\ln x\approx \int _{1}^{n}\ln x\,dx=n\ln n-n+1.} Exponentiating the result (and ignoring the negligible + 1 {\displaystyle +1} term) approximates n ! {\displaystyle n!} as ( n / e ) n {\displaystyle (n/e)^{n}} .[49] More carefully bounding the sum both above and below by an integral, using the [trapezoid rule](/source/Trapezoid_rule), shows that this estimate needs a correction factor proportional to n {\displaystyle {\sqrt {n}}} . The constant of proportionality for this correction can be found from the [Wallis product](/source/Wallis_product), which expresses π {\displaystyle \pi } as a limiting ratio of factorials and powers of two. The result of these corrections is [Stirling's approximation](/source/Stirling's_approximation):[50] n ! ∼ 2 π n ( n e ) n . {\displaystyle n!\sim {\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}\,.} Here, the ∼ {\displaystyle \sim } symbol means that, as n {\displaystyle n} goes to infinity, the ratio between the left and right sides approaches 1 {\displaystyle 1} in the [limit](/source/Limit_(mathematics)). Stirling's formula provides the first term in an [asymptotic series](/source/Asymptotic_series) that becomes even more accurate when taken to greater numbers of terms:[51] n ! ∼ 2 π n ( n e ) n ( 1 + 1 12 n + 1 288 n 2 − 139 51840 n 3 − 571 2488320 n 4 + ⋯ ) . {\displaystyle n!\sim {\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}\left(1+{\frac {1}{12n}}+{\frac {1}{288n^{2}}}-{\frac {139}{51840n^{3}}}-{\frac {571}{2488320n^{4}}}+\cdots \right).} An alternative version (the approximation derived directly from the [Euler–Maclaurin formula](/source/Euler%E2%80%93Maclaurin_formula)) converges faster because it only requires odd exponents in the correction terms:[51] n ! ∼ 2 π n ( n e ) n exp ⁡ ( 1 12 n − 1 360 n 3 + 1 1260 n 5 − 1 1680 n 7 + ⋯ ) . {\displaystyle n!\sim {\sqrt {2\pi n}}\left({\frac {n}{e}}\right)^{n}\exp \left({\frac {1}{12n}}-{\frac {1}{360n^{3}}}+{\frac {1}{1260n^{5}}}-{\frac {1}{1680n^{7}}}+\cdots \right).} Many other variations of these formulas have also been developed, by [Srinivasa Ramanujan](/source/Srinivasa_Ramanujan), [Bill Gosper](/source/Bill_Gosper), and others.[51]

The [binary logarithm](/source/Binary_logarithm) of the factorial, used to analyze [comparison sorting](/source/Comparison_sort), can be very accurately estimated using Stirling's approximation. In the formula below, the O ( 1 ) {\displaystyle O(1)} term invokes [big O notation](/source/Big_O_notation).[45] log 2 ⁡ n ! = n log 2 ⁡ n − n log 2 ⁡ e + 1 2 log 2 ⁡ n + O ( 1 ) . {\displaystyle \log _{2}n!=n\log _{2}n-n\log _{2}e+{\frac {1}{2}}\log _{2}n+O(1).}

### Divisibility and digits

Main article: [Legendre's formula](/source/Legendre's_formula)

The product formula for the factorial implies that n ! {\displaystyle n!} is [divisible](/source/Divisible) by all [prime numbers](/source/Prime_number) that are at most n {\displaystyle n} , and by no larger prime numbers.[52] More precise information about its divisibility is given by [Legendre's formula](/source/Legendre's_formula), which gives the exponent of each prime p {\displaystyle p} in the prime factorization of n ! {\displaystyle n!} as[53][54] ∑ i = 1 ∞ ⌊ n p i ⌋ = n − s p ( n ) p − 1 . {\displaystyle \sum _{i=1}^{\infty }\left\lfloor {\frac {n}{p^{i}}}\right\rfloor ={\frac {n-s_{p}(n)}{p-1}}.} Here s p ( n ) {\displaystyle s_{p}(n)} denotes the sum of the [base](/source/Radix)- p {\displaystyle p} digits of n {\displaystyle n} . The exponent given by this formula can more technically be called the [p-adic valuation](/source/P-adic_valuation) of the factorial.[54] Applying Legendre's formula to the product formula for [binomial coefficients](/source/Binomial_coefficient) produces [Kummer's theorem](/source/Kummer's_theorem), a similar result on the exponent of each prime in the factorization of a binomial coefficient.[55] Grouping the prime factors of the factorial into [prime powers](/source/Prime_power) in different ways produces the [multiplicative partitions of factorials](/source/Multiplicative_partitions_of_factorials).[56]

The special case of Legendre's formula for p = 5 {\displaystyle p=5} gives the number of [trailing zeros](/source/Trailing_zero#Factorial) in the decimal representation of the factorials.[57] According to this formula, the number of zeros can be obtained by subtracting the base-5 digits of n {\displaystyle n} from n {\displaystyle n} , and dividing the result by four.[58] Legendre's formula implies that the exponent of the prime p = 2 {\displaystyle p=2} is always larger than the exponent for p = 5 {\displaystyle p=5} , so each factor of five can be paired with a factor of two to produce one of these trailing zeros.[57] The leading digits of the factorials are distributed according to [Benford's law](/source/Benford's_law).[59] Every sequence of digits, in any base, is the sequence of initial digits of some factorial number in that base.[60]

Another result on divisibility of factorials, [Wilson's theorem](/source/Wilson's_theorem), states that ( n − 1 ) ! + 1 {\displaystyle (n-1)!+1} is divisible by n {\displaystyle n} if and only if n {\displaystyle n} is a [prime number](/source/Prime_number).[52] For any given integer x {\displaystyle x} , the [Kempner function](/source/Kempner_function) of x {\displaystyle x} is given by the smallest n {\displaystyle n} for which x {\displaystyle x} divides n ! {\displaystyle n!} .[61] For almost all numbers (all but a subset of exceptions with [asymptotic density](/source/Asymptotic_density) zero), it coincides with the largest prime factor of x {\displaystyle x} .[62]

The product of two factorials, m ! ⋅ n ! {\displaystyle m!\cdot n!} , always evenly divides ( m + n ) ! {\displaystyle (m+n)!} .[63] There are infinitely many factorials that equal the product of other factorials: if n {\displaystyle n} is itself any product of factorials, then n ! {\displaystyle n!} equals that same product multiplied by one more factorial, ( n − 1 ) ! {\displaystyle (n-1)!} . The only known examples of factorials that are products of other factorials but are not of this "trivial" form are 9 ! = 7 ! ⋅ 3 ! ⋅ 3 ! ⋅ 2 ! {\displaystyle 9!=7!\cdot 3!\cdot 3!\cdot 2!} , 10 ! = 7 ! ⋅ 6 ! = 7 ! ⋅ 5 ! ⋅ 3 ! {\displaystyle 10!=7!\cdot 6!=7!\cdot 5!\cdot 3!} , and 16 ! = 14 ! ⋅ 5 ! ⋅ 2 ! {\displaystyle 16!=14!\cdot 5!\cdot 2!} .[64] It would follow from the [abc conjecture](/source/Abc_conjecture) that there are only finitely many nontrivial examples.[65]

The [greatest common divisor](/source/Greatest_common_divisor) of the values of a [primitive polynomial](/source/Primitive_part_and_content) of degree d {\displaystyle d} over the integers evenly divides d ! {\displaystyle d!} .[63]

### Continuous interpolation and non-integer generalization

The gamma function (shifted one unit left to match the facto­rials) continuously interpolates the factorial to non-integer values

Absolute values of the complex gamma function, showing poles at non-positive integers

Main article: [Gamma function](/source/Gamma_function)

There are infinitely many ways to extend the factorials to a [continuous function](/source/Continuous_function).[66] The most widely used of these[67] uses the [gamma function](/source/Gamma_function), which can be defined for positive real numbers as the [integral](/source/Integral) Γ ( z ) = ∫ 0 ∞ x z − 1 e − x d x . {\displaystyle \Gamma (z)=\int _{0}^{\infty }x^{z-1}e^{-x}\,dx.} The resulting function is related to the factorial of a non-negative integer n {\displaystyle n} by the equation n ! = Γ ( n + 1 ) , {\displaystyle n!=\Gamma (n+1),} which can be used as a definition of the factorial for non-integer arguments. At all values x {\displaystyle x} for which both Γ ( x ) {\displaystyle \Gamma (x)} and Γ ( x − 1 ) {\displaystyle \Gamma (x-1)} are defined, the gamma function obeys the [functional equation](/source/Functional_equation) Γ ( n ) = ( n − 1 ) Γ ( n − 1 ) , {\displaystyle \Gamma (n)=(n-1)\Gamma (n-1),} generalizing the [recurrence relation](/source/Recurrence_relation) for the factorials.[66]

The same integral converges more generally for any [complex number](/source/Complex_number) z {\displaystyle z} whose real part is positive. It can be extended to the non-integer points in the rest of the [complex plane](/source/Complex_plane) by solving for Euler's [reflection formula](/source/Reflection_formula) Γ ( z ) Γ ( 1 − z ) = π sin ⁡ π z . {\displaystyle \Gamma (z)\Gamma (1-z)={\frac {\pi }{\sin \pi z}}.} However, this formula cannot be used at integers because, for them, the sin ⁡ π z {\displaystyle \sin \pi z} term would produce a [division by zero](/source/Division_by_zero). The result of this extension process is an [analytic function](/source/Analytic_function) (more specifically a [meromorphic function](/source/Meromorphic_function)), the [analytic continuation](/source/Analytic_continuation) of the integral formula for the gamma function. It has a nonzero value at all complex numbers, except for the non-positive integers where it has [simple poles](/source/Zeros_and_poles). Correspondingly, this provides a definition for the factorial at all complex numbers other than the negative integers.[67] One property of the gamma function, distinguishing it from other continuous interpolations of the factorials, is given by the [Bohr–Mollerup theorem](/source/Bohr%E2%80%93Mollerup_theorem), which states that the gamma function (offset by one) is the only [log-convex](/source/Log-convex) function on the positive real numbers that interpolates the factorials and obeys the same functional equation. A related uniqueness theorem of [Helmut Wielandt](/source/Helmut_Wielandt) states that the complex gamma function and its scalar multiples are the only [holomorphic functions](/source/Holomorphic_function) on the positive complex half-plane that obey the functional equation and remain bounded for complex numbers with real part between 1 and 2.[68]

Other complex functions that interpolate the factorial values include [Hadamard's gamma function](/source/Hadamard's_gamma_function), which is an [entire function](/source/Entire_function) over all the complex numbers, including the non-positive integers.[69][70] In the [p-adic numbers](/source/P-adic_number), it is not possible to continuously interpolate the factorial function directly, because the factorials of large integers (a [dense subset](/source/Dense_subset) of the p-adic integers) converge to zero according to Legendre's formula, forcing any continuous function that is close to their values to be zero everywhere. Instead, the [p-adic gamma function](/source/P-adic_gamma_function) provides a continuous interpolation of a modified form of the factorial, omitting the factors in the factorial that are divisible by p.[71]

The [digamma function](/source/Digamma_function) is the [logarithmic derivative](/source/Logarithmic_derivative) of the gamma function. Just as the gamma function provides a continuous interpolation of the factorials, offset by one, the digamma function provides a continuous interpolation of the [harmonic numbers](/source/Harmonic_number), offset by the [Euler–Mascheroni constant](/source/Euler%E2%80%93Mascheroni_constant).[72]

### Computation

[TI SR-50A](/source/TI_SR-50), a 1975 calculator with a factorial key (third row, center right)

The factorial function is a common feature in [scientific calculators](/source/Scientific_calculator).[73] It is also included in scientific programming libraries such as the [Python](/source/Python_(programming_language)) mathematical functions module[74] and the [Boost C++ library](/source/Boost_(C%2B%2B_libraries)).[75]

If efficiency is not a concern, computing factorials is trivial: just successively multiply a variable initialized to 1 {\displaystyle 1} by the integers up to n {\displaystyle n} . The simplicity of this computation makes it a common example in the use of different computer programming styles and methods.[76] The computation of n ! {\displaystyle n!} can be expressed in [pseudocode](/source/Pseudocode) using [iteration](/source/Iteration)[77] as

**define** factorial(*n*):
  *f* := 1
  **for** *i* := 1, 2, 3, ..., *n*:
    *f* := *f* * *i*
  **return** *f*

or using [recursion](/source/Recursion_(computer_science))[78] based on its recurrence relation as

**define** factorial(*n*):
  **if** (*n* = 0) **return** 1
  **return** *n* * factorial(*n* − 1)

Other methods suitable for its computation include [memoization](/source/Memoization),[79] [dynamic programming](/source/Dynamic_programming),[80] and [functional programming](/source/Functional_programming).[81] The [computational complexity](/source/Computational_complexity) of these algorithms may be analyzed using the unit-cost [random-access machine](/source/Random-access_machine) model of computation, in which each arithmetic operation takes constant time and each number uses a constant amount of storage space. In this model, these methods can compute n ! {\displaystyle n!} in time O ( n ) {\displaystyle O(n)} , and the iterative version uses space O ( 1 ) {\displaystyle O(1)} . Unless optimized for [tail recursion](/source/Tail_recursion), the recursive version takes linear space to store its [call stack](/source/Call_stack).[82] However, this model of computation is only suitable when n {\displaystyle n} is small enough to allow n ! {\displaystyle n!} to fit into a [machine word](/source/Machine_word).[83] The values 12! and 20! are the largest factorials that can be stored in, respectively, the [32-bit](/source/32-bit_computing)[84] and [64-bit](/source/64-bit_computing) [integers](/source/Integer_(computer_science)).[85] [Floating point](/source/Floating_point) can represent larger factorials, but approximately rather than exactly, and will still overflow for factorials larger than 170 ! {\displaystyle 170!} .[84]

The exact computation of larger factorials involves [arbitrary-precision arithmetic](/source/Arbitrary-precision_arithmetic), because of [fast growth](#Growth_and_approximation) and [integer overflow](/source/Integer_overflow). Time of computation can be analyzed as a function of the number of digits or bits in the result.[85] By Stirling's formula, n ! {\displaystyle n!} has b = O ( n log ⁡ n ) {\displaystyle b=O(n\log n)} bits.[86] The [Schönhage–Strassen algorithm](/source/Sch%C3%B6nhage%E2%80%93Strassen_algorithm) can produce a b {\displaystyle b} -bit product in time O ( b log ⁡ b log ⁡ log ⁡ b ) {\displaystyle O(b\log b\log \log b)} , and faster [multiplication algorithms](/source/Multiplication_algorithm) taking time O ( b log ⁡ b ) {\displaystyle O(b\log b)} are known.[87] However, computing the factorial involves repeated products, rather than a single multiplication, so these time bounds do not apply directly. In this setting, computing n ! {\displaystyle n!} by multiplying the numbers from 1 to n {\displaystyle n} in sequence is inefficient, because it involves n {\displaystyle n} multiplications, a constant fraction of which take time O ( n log 2 ⁡ n ) {\displaystyle O(n\log ^{2}n)} each, giving total time O ( n 2 log 2 ⁡ n ) {\displaystyle O(n^{2}\log ^{2}n)} . A better approach is to perform the multiplications as a [divide-and-conquer algorithm](/source/Divide-and-conquer_algorithm) that multiplies a sequence of i {\displaystyle i} numbers by splitting it into two subsequences of i / 2 {\displaystyle i/2} numbers, multiplies each subsequence, and combines the results with one last multiplication. This approach to the factorial takes total time O ( n log 3 ⁡ n ) {\displaystyle O(n\log ^{3}n)} : one logarithm comes from the number of bits in the factorial, a second comes from the multiplication algorithm, and a third comes from the divide and conquer.[88]

Even better efficiency is obtained by computing *n*! from its prime factorization, based on the principle that [exponentiation by squaring](/source/Exponentiation_by_squaring) is faster than expanding an exponent into a product.[86][89] An algorithm for this by [Arnold Schönhage](/source/Arnold_Sch%C3%B6nhage) begins by finding the list of the primes up to n {\displaystyle n} , for instance using the [sieve of Eratosthenes](/source/Sieve_of_Eratosthenes), and uses Legendre's formula to compute the exponent for each prime. Then it computes the product of the prime powers with these exponents, using a recursive algorithm, as follows:

- Use divide and conquer to compute the product of the primes whose exponents are odd

- Divide all of the exponents by two (rounding down to an integer), recursively compute the product of the prime powers with these smaller exponents, and square the result

- Multiply together the results of the two previous steps

The product of all primes up to n {\displaystyle n} is an O ( n ) {\displaystyle O(n)} -bit number, by the [prime number theorem](/source/Prime_number_theorem), so the time for the first step is O ( n log 2 ⁡ n ) {\displaystyle O(n\log ^{2}n)} , with one logarithm coming from the divide and conquer and another coming from the multiplication algorithm. In the recursive calls to the algorithm, the prime number theorem can again be invoked to prove that the numbers of bits in the corresponding products decrease by a constant factor at each level of recursion, so the total time for these steps at all levels of recursion adds in a [geometric series](/source/Geometric_series) to O ( n log 2 ⁡ n ) {\displaystyle O(n\log ^{2}n)} . The time for the squaring in the second step and the multiplication in the third step are again O ( n log 2 ⁡ n ) {\displaystyle O(n\log ^{2}n)} , because each is a single multiplication of a number with O ( n log ⁡ n ) {\displaystyle O(n\log n)} bits. Again, at each level of recursion the numbers involved have a constant fraction as many bits (because otherwise repeatedly squaring them would produce too large a final result) so again the amounts of time for these steps in the recursive calls add in a geometric series to O ( n log 2 ⁡ n ) {\displaystyle O(n\log ^{2}n)} . Consequentially, the whole algorithm takes time O ( n log 2 ⁡ n ) {\displaystyle O(n\log ^{2}n)} , proportional to a single multiplication with the same number of bits in its result.[89]

## Related sequences and functions

Main article: [List of factorial and binomial topics](/source/List_of_factorial_and_binomial_topics)

Several other integer sequences are similar to or related to the factorials:

**Alternating factorial**
- The [alternating factorial](/source/Alternating_factorial) is the absolute value of the [alternating sum](/source/Alternating_sum) of the first n {\displaystyle n} factorials, ∑ i = 1 n ( − 1 ) n − i i ! {\textstyle \sum _{i=1}^{n}(-1)^{n-i}i!} . These have mainly been studied in connection with their primality; only finitely many of them can be prime, but a complete list of primes of this form is not known.[90]

**Bhargava factorial**
- The [Bhargava factorials](/source/Bhargava_factorial) are a family of integer sequences defined by [Manjul Bhargava](/source/Manjul_Bhargava) with similar number-theoretic properties to the factorials, including the factorials themselves as a special case.[63]

**Double factorial**
- The product of all the odd integers up to some odd positive integer n {\displaystyle n} is called the [double factorial](/source/Double_factorial) of n {\displaystyle n} , and denoted by n ! ! {\displaystyle n!!} .[91] That is, ( 2 k − 1 ) ! ! = ∏ i = 1 k ( 2 i − 1 ) = ( 2 k ) ! 2 k k ! . {\displaystyle (2k-1)!!=\prod _{i=1}^{k}(2i-1)={\frac {(2k)!}{2^{k}k!}}.} For example, 9!! = 1 × 3 × 5 × 7 × 9 = 945. Double factorials are used in [trigonometric integrals](/source/List_of_integrals_of_trigonometric_functions),[92] in expressions for the [gamma function](/source/Gamma_function) at [half-integers](/source/Half-integer) and the [volumes of hyperspheres](/source/Volume_of_an_n-ball),[93] and in counting [binary trees](/source/Rooted_binary_tree) and [perfect matchings](/source/Perfect_matching).[91][94]

**Exponential factorial**
- Just as [triangular numbers](/source/Triangular_number) sum the numbers from 1 {\displaystyle 1} to n {\displaystyle n} , and factorials take their product, the [exponential factorial](/source/Exponential_factorial) exponentiates. The exponential factorial is defined recursively as a 0 = 1 , a n = n a n − 1 {\displaystyle a_{0}=1,\ a_{n}=n^{a_{n-1}}} . For example, the exponential factorial of 4 is 4 3 2 1 = 262144. {\displaystyle 4^{3^{2^{1}}}=262144.} These numbers grow much more quickly than regular factorials.[95]

**Falling factorial**
- The notations ( x ) n {\displaystyle (x)_{n}} or x n _ {\displaystyle x^{\underline {n}}} are sometimes used to represent the product of the greatest n {\displaystyle n} integers counting up to and including x {\displaystyle x} , equal to x ! / ( x − n ) ! {\displaystyle x!/(x-n)!} . This is also known as a [falling factorial](/source/Falling_and_rising_factorials) or backward factorial, and the ( x ) n {\displaystyle (x)_{n}} notation is a Pochhammer symbol.[96] Falling factorials count the number of different sequences of n {\displaystyle n} distinct items that can be drawn from a universe of x {\displaystyle x} items.[97] They occur as coefficients in the [higher derivatives](/source/Higher_derivative) of polynomials,[98] and in the [factorial moments](/source/Factorial_moment) of [random variables](/source/Random_variable).[99]

**Hyperfactorials**
- The [hyperfactorial](/source/Hyperfactorial) of n {\displaystyle n} is the product 1 1 ⋅ 2 2 ⋯ n n {\displaystyle 1^{1}\cdot 2^{2}\cdots n^{n}} . These numbers form the [discriminants](/source/Discriminant) of [Hermite polynomials](/source/Hermite_polynomials).[100] They can be continuously interpolated by the [K-function](/source/K-function),[101] and obey analogues to Stirling's formula[102] and Wilson's theorem.[103]

**Jordan–Pólya numbers**
- The [Jordan–Pólya numbers](/source/Jordan%E2%80%93P%C3%B3lya_number) are the products of factorials, allowing repetitions. Every [tree](/source/Tree_(graph_theory)) has a [symmetry group](/source/Symmetry_group) whose number of symmetries is a Jordan–Pólya number, and every Jordan–Pólya number counts the symmetries of some tree.[104]

**Primorial**
- The [primorial](/source/Primorial) n # {\displaystyle n\#} is the product of [prime numbers](/source/Prime_number) less than or equal to n {\displaystyle n} ; this construction gives them some similar divisibility properties to factorials,[36] but unlike factorials they are [squarefree](/source/Squarefree).[105] As with the [factorial primes](/source/Factorial_prime) n ! ± 1 {\displaystyle n!\pm 1} , researchers have studied [primorial primes](/source/Primorial_prime) n # ± 1 {\displaystyle n\#\pm 1} .[36]

**Subfactorial**
- The [subfactorial](/source/Subfactorial) yields the number of [derangements](/source/Derangement) of a set of n {\displaystyle n} objects. It is sometimes denoted ! n {\displaystyle !n} , and equals the closest integer to n ! / e {\displaystyle n!/e} .[29]

**Superfactorial**
- The [superfactorial](/source/Superfactorial) of n {\displaystyle n} is the product of the first n {\displaystyle n} factorials. The superfactorials are continuously interpolated by the [Barnes G-function](/source/Barnes_G-function).[106]

**Triangular number**
- Just as the n {\displaystyle n} th factorial is the product of the first n {\displaystyle n} positive integers, the n {\displaystyle n} th [triangular number](/source/Triangular_number) is the sum of the first n {\displaystyle n} positive integers. [Donald Knuth](/source/Donald_Knuth) has proposed the name *termial* and the notation n ? {\displaystyle n?} for the triangular numbers, making the analogy to factorials more explicit, but these are not in wide use.[107]

## References

1. ^ [***a***](#cite_ref-gkp_1-0) [***b***](#cite_ref-gkp_1-1) [***c***](#cite_ref-gkp_1-2) [Graham, Ronald L.](/source/Ronald_Graham); [Knuth, Donald E.](/source/Donald_Knuth); [Patashnik, Oren](/source/Oren_Patashnik) (1988). [*Concrete Mathematics*](/source/Concrete_Mathematics). Reading, MA: Addison-Wesley. p. 111. [ISBN](/source/ISBN_(identifier)) [0-201-14236-8](https://en.wikipedia.org/wiki/Special:BookSources/0-201-14236-8).

1. ^ [***a***](#cite_ref-datta-singh_2-0) [***b***](#cite_ref-datta-singh_2-1) [Datta, Bibhutibhusan](/source/Bibhutibhushan_Datta); Singh, Awadhesh Narayan (2019). "Use of permutations and combinations in India". In Kolachana, Aditya; Mahesh, K.; Ramasubramanian, K. (eds.). *Studies in Indian Mathematics and Astronomy: Selected Articles of Kripa Shankar Shukla*. Sources and Studies in the History of Mathematics and Physical Sciences. Springer Singapore. pp. 356–376. [doi](/source/Doi_(identifier)):[10.1007/978-981-13-7326-8_18](https://doi.org/10.1007%2F978-981-13-7326-8_18). [ISBN](/source/ISBN_(identifier)) [978-981-13-7325-1](https://en.wikipedia.org/wiki/Special:BookSources/978-981-13-7325-1). [S2CID](/source/S2CID_(identifier)) [191141516](https://api.semanticscholar.org/CorpusID:191141516).. Revised by K. S. Shukla from a paper in *[Indian Journal of History of Science](/source/Indian_Journal_of_History_of_Science)* 27 (3): 231–249, 1992, [MR](/source/MR_(identifier)) [1189487](https://mathscinet.ams.org/mathscinet-getitem?mr=1189487). See p. 363.

1. **[^](#cite_ref-3)** Jadhav, Dipak (August 2021). ["Jaina Thoughts on Unity Not Being a Number"](https://doi.org/10.18732%2Fhssa67). *History of Science in South Asia*. **9**. University of Alberta Libraries: 209–231. [doi](/source/Doi_(identifier)):[10.18732/hssa67](https://doi.org/10.18732%2Fhssa67). [S2CID](/source/S2CID_(identifier)) [238656716](https://api.semanticscholar.org/CorpusID:238656716).. See discussion of dating on p. 211.

1. **[^](#cite_ref-4)** [Biggs, Norman L.](/source/Norman_L._Biggs) (May 1979). "The roots of combinatorics". *[Historia Mathematica](/source/Historia_Mathematica)*. **6** (2): 109–136. [doi](/source/Doi_(identifier)):[10.1016/0315-0860(79)90074-0](https://doi.org/10.1016%2F0315-0860%2879%2990074-0). [MR](/source/MR_(identifier)) [0530622](https://mathscinet.ams.org/mathscinet-getitem?mr=0530622).

1. ^ [***a***](#cite_ref-katz_5-0) [***b***](#cite_ref-katz_5-1) [Katz, Victor J.](/source/Victor_J._Katz) (June 1994). "Ethnomathematics in the classroom". *[For the Learning of Mathematics](/source/For_the_Learning_of_Mathematics)*. **14** (2): 26–30. [JSTOR](/source/JSTOR_(identifier)) [40248112](https://www.jstor.org/stable/40248112).

1. **[^](#cite_ref-6)** [Sefer Yetzirah at Wikisource](https://en.wikisource.org/wiki/Sefer_Yetzirah#CHAPTER_IV), Chapter IV, Section 4

1. **[^](#cite_ref-7)** [Rashed, Roshdi](/source/Roshdi_Rashed) (1980). "Ibn al-Haytham et le théorème de Wilson". *[Archive for History of Exact Sciences](/source/Archive_for_History_of_Exact_Sciences)* (in French). **22** (4): 305–321. [doi](/source/Doi_(identifier)):[10.1007/BF00717654](https://doi.org/10.1007%2FBF00717654). [MR](/source/MR_(identifier)) [0595903](https://mathscinet.ams.org/mathscinet-getitem?mr=0595903). [S2CID](/source/S2CID_(identifier)) [120885025](https://api.semanticscholar.org/CorpusID:120885025).

1. **[^](#cite_ref-8)** Acerbi, F. (2003). "On the shoulders of Hipparchus: a reappraisal of ancient Greek combinatorics". *[Archive for History of Exact Sciences](/source/Archive_for_History_of_Exact_Sciences)*. **57** (6): 465–502. [doi](/source/Doi_(identifier)):[10.1007/s00407-003-0067-0](https://doi.org/10.1007%2Fs00407-003-0067-0). [JSTOR](/source/JSTOR_(identifier)) [41134173](https://www.jstor.org/stable/41134173). [MR](/source/MR_(identifier)) [2004966](https://mathscinet.ams.org/mathscinet-getitem?mr=2004966). [S2CID](/source/S2CID_(identifier)) [122758966](https://api.semanticscholar.org/CorpusID:122758966).

1. **[^](#cite_ref-9)** [Katz, Victor J.](/source/Victor_J._Katz) (2013). "Chapter 4: Jewish combinatorics". In [Wilson, Robin](/source/Robin_Wilson_(mathematician)); Watkins, John J. (eds.). *Combinatorics: Ancient & Modern*. [Oxford University Press](/source/Oxford_University_Press). pp. 109–121. [ISBN](/source/ISBN_(identifier)) [978-0-19-965659-2](https://en.wikipedia.org/wiki/Special:BookSources/978-0-19-965659-2). See p. 111.

1. **[^](#cite_ref-10)** Hunt, Katherine (May 2018). ["The Art of Changes: Bell-Ringing, Anagrams, and the Culture of Combination in Seventeenth-Century England"](https://ueaeprints.uea.ac.uk/id/eprint/83227/1/Accepted_Mnauscript.pdf) (PDF). *Journal of Medieval and Early Modern Studies*. **48** (2): 387–412. [doi](/source/Doi_(identifier)):[10.1215/10829636-4403136](https://doi.org/10.1215%2F10829636-4403136).

1. **[^](#cite_ref-11)** [Stedman, Fabian](/source/Fabian_Stedman) (1677). *Campanalogia*. London. pp. 6–9. The publisher is given as "W.S." who may have been William Smith, possibly acting as agent for the [Society of College Youths](/source/Ancient_Society_of_College_Youths), to which society the "Dedicatory" is addressed.

1. **[^](#cite_ref-12)** [Knobloch, Eberhard](/source/Eberhard_Knobloch) (2013). "Chapter 5: Renaissance combinatorics". In Wilson, Robin; Watkins, John J. (eds.). *Combinatorics: Ancient & Modern*. [Oxford University Press](/source/Oxford_University_Press). pp. 123–145. [ISBN](/source/ISBN_(identifier)) [978-0-19-965659-2](https://en.wikipedia.org/wiki/Special:BookSources/978-0-19-965659-2). See p. 126.

1. **[^](#cite_ref-FOOTNOTEKnobloch2013130–133_13-0)** [Knobloch 2013](#CITEREFKnobloch2013), pp. 130–133.

1. ^ [***a***](#cite_ref-exponential-series_14-0) [***b***](#cite_ref-exponential-series_14-1) [***c***](#cite_ref-exponential-series_14-2) [Ebbinghaus, H.-D.](/source/Heinz-Dieter_Ebbinghaus); [Hermes, H.](/source/Hans_Hermes); [Hirzebruch, F.](/source/Friedrich_Hirzebruch); [Koecher, M.](/source/Max_Koecher); [Mainzer, K.](/source/Klaus_Mainzer); [Neukirch, J.](/source/J%C3%BCrgen_Neukirch); Prestel, A.; [Remmert, R.](/source/Reinhold_Remmert) (1990). [*Numbers*](https://books.google.com/books?id=Z53SBwAAQBAJ&pg=PA131). Graduate Texts in Mathematics. Vol. 123. New York: Springer-Verlag. p. 131. [doi](/source/Doi_(identifier)):[10.1007/978-1-4612-1005-4](https://doi.org/10.1007%2F978-1-4612-1005-4). [ISBN](/source/ISBN_(identifier)) [0-387-97202-1](https://en.wikipedia.org/wiki/Special:BookSources/0-387-97202-1). [MR](/source/MR_(identifier)) [1066206](https://mathscinet.ams.org/mathscinet-getitem?mr=1066206).

1. **[^](#cite_ref-15)** Dutka, Jacques (1991). "The early history of the factorial function". *[Archive for History of Exact Sciences](/source/Archive_for_History_of_Exact_Sciences)*. **43** (3): 225–249. [doi](/source/Doi_(identifier)):[10.1007/BF00389433](https://doi.org/10.1007%2FBF00389433). [JSTOR](/source/JSTOR_(identifier)) [41133918](https://www.jstor.org/stable/41133918). [MR](/source/MR_(identifier)) [1171521](https://mathscinet.ams.org/mathscinet-getitem?mr=1171521). [S2CID](/source/S2CID_(identifier)) [122237769](https://api.semanticscholar.org/CorpusID:122237769).

1. **[^](#cite_ref-16)** [Dickson, Leonard E.](/source/Leonard_Eugene_Dickson) (1919). ["Chapter IX: Divisibility of factorials and multinomial coefficients"](https://archive.org/details/historyoftheoryo01dick/page/262). [*History of the Theory of Numbers*](/source/History_of_the_Theory_of_Numbers). Vol. 1. Carnegie Institution of Washington. pp. 263–278. See in particular p. 263.

1. ^ [***a***](#cite_ref-cajori_17-0) [***b***](#cite_ref-cajori_17-1) [Cajori, Florian](/source/Florian_Cajori) (1929). ["448–449. Factorial "n""](https://archive.org/details/AHistoryOfMathematicalNotationVolII/page/n93). [*A History of Mathematical Notations, Volume II: Notations Mainly in Higher Mathematics*](/source/A_History_of_Mathematical_Notations). The Open Court Publishing Company. pp. 71–77.

1. **[^](#cite_ref-18)** Miller, Jeff. ["Earliest Known Uses of Some of the Words of Mathematics (F)"](https://mathshistory.st-andrews.ac.uk/Miller/mathword/f/). *[MacTutor History of Mathematics archive](/source/MacTutor_History_of_Mathematics_archive)*. University of St Andrews.

1. ^ [***a***](#cite_ref-craik_19-0) [***b***](#cite_ref-craik_19-1) Craik, Alex D. D. (2005). "Prehistory of Faà di Bruno's formula". *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **112** (2): 119–130. [doi](/source/Doi_(identifier)):[10.1080/00029890.2005.11920176](https://doi.org/10.1080%2F00029890.2005.11920176). [JSTOR](/source/JSTOR_(identifier)) [30037410](https://www.jstor.org/stable/30037410). [MR](/source/MR_(identifier)) [2121322](https://mathscinet.ams.org/mathscinet-getitem?mr=2121322). [S2CID](/source/S2CID_(identifier)) [45380805](https://api.semanticscholar.org/CorpusID:45380805).

1. **[^](#cite_ref-20)** [Arbogast, Louis François Antoine](/source/Louis_Fran%C3%A7ois_Antoine_Arbogast) (1800). [*Du calcul des dérivations*](https://archive.org/details/ducalculdesdri00arbouoft/page/364) (in French). Strasbourg: L'imprimerie de Levrault, frères. pp. 364–365.

1. ^ [***a***](#cite_ref-hamkins_21-0) [***b***](#cite_ref-hamkins_21-1) [Hamkins, Joel David](/source/Joel_David_Hamkins) (2020). [*Proof and the Art of Mathematics*](https://books.google.com/books?id=Ns_tDwAAQBAJ&pg=PA50). Cambridge, Massachusetts: MIT Press. p. 50. [ISBN](/source/ISBN_(identifier)) [978-0-262-53979-1](https://en.wikipedia.org/wiki/Special:BookSources/978-0-262-53979-1). [MR](/source/MR_(identifier)) [4205951](https://mathscinet.ams.org/mathscinet-getitem?mr=4205951).

1. **[^](#cite_ref-22)** Dorf, Richard C. (2003). ["Factorials"](https://books.google.com/books?id=TCLOBgAAQBAJ&pg=SA5-PA5). *CRC Handbook of Engineering Tables*. CRC Press. p. 5-5. [ISBN](/source/ISBN_(identifier)) [978-0-203-00922-2](https://en.wikipedia.org/wiki/Special:BookSources/978-0-203-00922-2).

1. **[^](#cite_ref-23)** Goldenberg, E. Paul; Carter, Cynthia J. (October 2017). "A student asks about (−5)!". *[The Mathematics Teacher](/source/The_Mathematics_Teacher)*. **111** (2): 104–110. [doi](/source/Doi_(identifier)):[10.5951/mathteacher.111.2.0104](https://doi.org/10.5951%2Fmathteacher.111.2.0104). [JSTOR](/source/JSTOR_(identifier)) [10.5951/mathteacher.111.2.0104](https://www.jstor.org/stable/10.5951/mathteacher.111.2.0104).

1. **[^](#cite_ref-24)** Haberman, Bruria; Averbuch, Haim (2002). "The case of base cases: Why are they so difficult to recognize? Student difficulties with recursion". In Caspersen, Michael E.; Joyce, Daniel T.; Goelman, Don; Utting, Ian (eds.). *Proceedings of the 7th Annual SIGCSE Conference on Innovation and Technology in Computer Science Education, ITiCSE 2002, Aarhus, Denmark, June 24-28, 2002*. Association for Computing Machinery. pp. 84–88. [doi](/source/Doi_(identifier)):[10.1145/544414.544441](https://doi.org/10.1145%2F544414.544441).

1. **[^](#cite_ref-25)** Farrell, Orin J.; Ross, Bertram (1971). [*Solved Problems in Analysis: As Applied to Gamma, Beta, Legendre and Bessel Functions*](https://books.google.com/books?id=fXPDAgAAQBAJ&pg=PA10). Dover Books on Mathematics. Courier Corporation. p. 10. [ISBN](/source/ISBN_(identifier)) [978-0-486-78308-6](https://en.wikipedia.org/wiki/Special:BookSources/978-0-486-78308-6).

1. **[^](#cite_ref-ConwayGuy1998_26-0)** [Conway, John H.](/source/John_Horton_Conway); [Guy, Richard](/source/Richard_K._Guy) (1998). "Factorial numbers". [*The Book of Numbers*](/source/The_Book_of_Numbers_(math_book)). Springer Science & Business Media. pp. 55–56. [ISBN](/source/ISBN_(identifier)) [978-0-387-97993-9](https://en.wikipedia.org/wiki/Special:BookSources/978-0-387-97993-9).

1. **[^](#cite_ref-FOOTNOTEGrahamKnuthPatashnik1988156_27-0)** [Graham, Knuth & Patashnik 1988](#CITEREFGrahamKnuthPatashnik1988), p. 156.

1. **[^](#cite_ref-28)** [Riordan, John](/source/John_Riordan_(mathematician)) (1958). *An Introduction to Combinatorial Analysis*. Wiley Publications in Mathematical Statistics. Chapman & Hall. p. 76. [MR](/source/MR_(identifier)) [0096594](https://mathscinet.ams.org/mathscinet-getitem?mr=0096594). [Reprinted](https://books.google.com/books?id=Sbb_AwAAQBAJ&pg=PA76), Princeton Legacy Library, Princeton University Press, 2014, [ISBN](/source/ISBN_(identifier)) [9781400854332](https://en.wikipedia.org/wiki/Special:BookSources/9781400854332).

1. ^ [***a***](#cite_ref-FOOTNOTEGrahamKnuthPatashnik1988195_29-0) [***b***](#cite_ref-FOOTNOTEGrahamKnuthPatashnik1988195_29-1) [Graham, Knuth & Patashnik 1988](#CITEREFGrahamKnuthPatashnik1988), p. 195.

1. **[^](#cite_ref-FOOTNOTEGrahamKnuthPatashnik1988162_30-0)** [Graham, Knuth & Patashnik 1988](#CITEREFGrahamKnuthPatashnik1988), p. 162.

1. **[^](#cite_ref-31)** Randić, Milan (1987). "On the evaluation of the characteristic polynomial via symmetric function theory". *Journal of Mathematical Chemistry*. **1** (1): 145–152. [doi](/source/Doi_(identifier)):[10.1007/BF01205340](https://doi.org/10.1007%2FBF01205340). [MR](/source/MR_(identifier)) [0895533](https://mathscinet.ams.org/mathscinet-getitem?mr=0895533). [S2CID](/source/S2CID_(identifier)) [121752631](https://api.semanticscholar.org/CorpusID:121752631).

1. **[^](#cite_ref-32)** Hill, Victor E. (2000). ["8.1 Proposition: Symmetric group *S**n*"](https://books.google.com/books?id=yjL3DwAAQBAJ&pg=PA70). *Groups and Characters*. Chapman & Hall. p. 70. [ISBN](/source/ISBN_(identifier)) [978-1-351-44381-4](https://en.wikipedia.org/wiki/Special:BookSources/978-1-351-44381-4). [MR](/source/MR_(identifier)) [1739394](https://mathscinet.ams.org/mathscinet-getitem?mr=1739394).

1. **[^](#cite_ref-33)** Christensen, Kim; Moloney, Nicholas R. (2005). ["Appendix A: Taylor expansion"](https://books.google.com/books?id=bAIM1_EoQu0C&pg=PA341). *Complexity and Criticality*. Advanced physics texts. Vol. 1. Imperial College Press. p. 341. [ISBN](/source/ISBN_(identifier)) [978-1-86094-504-5](https://en.wikipedia.org/wiki/Special:BookSources/978-1-86094-504-5).

1. **[^](#cite_ref-34)** [Wilf, Herbert S.](/source/Herbert_Wilf) (2006). [*generatingfunctionology*](https://books.google.com/books?id=XOPMBQAAQBAJ&pg=PA22) (3rd ed.). Wellesley, Massachusetts: A K Peters. p. 22. [ISBN](/source/ISBN_(identifier)) [978-1-56881-279-3](https://en.wikipedia.org/wiki/Special:BookSources/978-1-56881-279-3). [MR](/source/MR_(identifier)) [2172781](https://mathscinet.ams.org/mathscinet-getitem?mr=2172781).

1. **[^](#cite_ref-35)** [Ore, Øystein](/source/%C3%98ystein_Ore) (1948). *Number Theory and Its History*. New York: McGraw-Hill. p. 66. [MR](/source/MR_(identifier)) [0026059](https://mathscinet.ams.org/mathscinet-getitem?mr=0026059). [Reprinted](https://books.google.com/books?id=Sl_6BPp7S0AC&pg=PA66), Courier Dover Publications, 1988, [ISBN](/source/ISBN_(identifier)) [9780486656205](https://en.wikipedia.org/wiki/Special:BookSources/9780486656205).

1. ^ [***a***](#cite_ref-caldwell-gallot_36-0) [***b***](#cite_ref-caldwell-gallot_36-1) [***c***](#cite_ref-caldwell-gallot_36-2) Caldwell, Chris K.; Gallot, Yves (2002). ["On the primality of n ! ± 1 {\displaystyle n!\pm 1} and 2 × 3 × 5 × ⋯ × p ± 1 {\displaystyle 2\times 3\times 5\times \dots \times p\pm 1} "](https://doi.org/10.1090%2FS0025-5718-01-01315-1). *[Mathematics of Computation](/source/Mathematics_of_Computation)*. **71** (237): 441–448. [doi](/source/Doi_(identifier)):[10.1090/S0025-5718-01-01315-1](https://doi.org/10.1090%2FS0025-5718-01-01315-1). [MR](/source/MR_(identifier)) [1863013](https://mathscinet.ams.org/mathscinet-getitem?mr=1863013).

1. **[^](#cite_ref-37)** [Guy, Richard K.](/source/Richard_K._Guy) (2004). "D25: Equations involving factorial n {\displaystyle n} ". *Unsolved Problems in Number Theory*. Problem Books in Mathematics. Vol. 1 (3rd ed.). New York: Springer-Verlag. pp. 301–302. [doi](/source/Doi_(identifier)):[10.1007/978-0-387-26677-0](https://doi.org/10.1007%2F978-0-387-26677-0). [ISBN](/source/ISBN_(identifier)) [0-387-20860-7](https://en.wikipedia.org/wiki/Special:BookSources/0-387-20860-7). [MR](/source/MR_(identifier)) [2076335](https://mathscinet.ams.org/mathscinet-getitem?mr=2076335).

1. **[^](#cite_ref-38)** [Neale, Vicky](/source/Vicky_Neale) (2017). [*Closing the Gap: The Quest to Understand Prime Numbers*](https://books.google.com/books?id=T7Q1DwAAQBAJ&pg=PA146). Oxford University Press. pp. 146–147. [ISBN](/source/ISBN_(identifier)) [978-0-19-878828-7](https://en.wikipedia.org/wiki/Special:BookSources/978-0-19-878828-7).

1. **[^](#cite_ref-39)** [Erdős, Pál](/source/Paul_Erd%C5%91s) (1932). ["Beweis eines Satzes von Tschebyschef"](https://users.renyi.hu/~p_erdos/1932-01.pdf) [Proof of a theorem of Chebyshev] (PDF). *Acta Litt. Sci. Szeged* (in German). **5**: 194–198. [Zbl](/source/Zbl_(identifier)) [0004.10103](https://zbmath.org/?format=complete&q=an:0004.10103).

1. **[^](#cite_ref-40)** [Chvátal, Vašek](/source/V%C3%A1clav_Chv%C3%A1tal) (2021). ["1.5: Erdős's proof of Bertrand's postulate"](https://books.google.com/books?id=_gVDEAAAQBAJ&pg=PA7). *The Discrete Mathematical Charms of Paul Erdős: A Simple Introduction*. Cambridge, England: Cambridge University Press. pp. 7–10. [doi](/source/Doi_(identifier)):[10.1017/9781108912181](https://doi.org/10.1017%2F9781108912181). [ISBN](/source/ISBN_(identifier)) [978-1-108-83183-3](https://en.wikipedia.org/wiki/Special:BookSources/978-1-108-83183-3). [MR](/source/MR_(identifier)) [4282416](https://mathscinet.ams.org/mathscinet-getitem?mr=4282416). [S2CID](/source/S2CID_(identifier)) [242637862](https://api.semanticscholar.org/CorpusID:242637862).

1. **[^](#cite_ref-41)** [Fraenkel, Aviezri S.](/source/Aviezri_Fraenkel) (1985). "Systems of numeration". *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **92** (2): 105–114. [doi](/source/Doi_(identifier)):[10.1080/00029890.1985.11971550](https://doi.org/10.1080%2F00029890.1985.11971550). [JSTOR](/source/JSTOR_(identifier)) [2322638](https://www.jstor.org/stable/2322638). [MR](/source/MR_(identifier)) [0777556](https://mathscinet.ams.org/mathscinet-getitem?mr=0777556).

1. **[^](#cite_ref-42)** Pitman, Jim (1993). "3.5: The Poisson distribution". *Probability*. New York: Springer. pp. 222–236. [doi](/source/Doi_(identifier)):[10.1007/978-1-4612-4374-8](https://doi.org/10.1007%2F978-1-4612-4374-8). [ISBN](/source/ISBN_(identifier)) [978-0-387-94594-1](https://en.wikipedia.org/wiki/Special:BookSources/978-0-387-94594-1).

1. **[^](#cite_ref-FOOTNOTEPitman1993153_43-0)** [Pitman 1993](#CITEREFPitman1993), p. 153.

1. **[^](#cite_ref-44)** [Kleinberg, Jon](/source/Jon_Kleinberg); [Tardos, Éva](/source/%C3%89va_Tardos) (2006). *Algorithm Design*. Addison-Wesley. p. 55.

1. ^ [***a***](#cite_ref-knuth-sorting_45-0) [***b***](#cite_ref-knuth-sorting_45-1) [Knuth, Donald E.](/source/Donald_Knuth) (1998). [*The Art of Computer Programming, Volume 3: Sorting and Searching*](https://books.google.com/books?id=cYULBAAAQBAJ&pg=PA182) (2nd ed.). Addison-Wesley. p. 182. [ISBN](/source/ISBN_(identifier)) [978-0-321-63578-5](https://en.wikipedia.org/wiki/Special:BookSources/978-0-321-63578-5).

1. **[^](#cite_ref-46)** [Sedgewick, Robert](/source/Robert_Sedgewick_(computer_scientist)); Wayne, Kevin (2011). [*Algorithms*](https://books.google.com/books?id=idUdqdDXqnAC&pg=PA466) (4th ed.). Addison-Wesley. p. 466. [ISBN](/source/ISBN_(identifier)) [978-0-13-276256-4](https://en.wikipedia.org/wiki/Special:BookSources/978-0-13-276256-4).

1. **[^](#cite_ref-47)** [Kardar, Mehran](/source/Mehran_Kardar) (2007). [*Statistical Physics of Particles*](/source/Statistical_Physics_of_Particles). [Cambridge University Press](/source/Cambridge_University_Press). pp. 107–110, 181–184. [ISBN](/source/ISBN_(identifier)) [978-0-521-87342-0](https://en.wikipedia.org/wiki/Special:BookSources/978-0-521-87342-0). [OCLC](/source/OCLC_(identifier)) [860391091](https://search.worldcat.org/oclc/860391091).

1. **[^](#cite_ref-48)** [Cameron, Peter J.](/source/Peter_Cameron_(mathematician)) (1994). "2.4: Orders of magnitude". *Combinatorics: Topics, Techniques, Algorithms*. Cambridge University Press. pp. 12–14. [ISBN](/source/ISBN_(identifier)) [978-0-521-45133-8](https://en.wikipedia.org/wiki/Special:BookSources/978-0-521-45133-8).

1. **[^](#cite_ref-49)** Magnus, Robert (2020). ["11.10: Stirling's approximation"](https://books.google.com/books?id=5hvxDwAAQBAJ&pg=PA391). *Fundamental Mathematical Analysis*. Springer Undergraduate Mathematics Series. Cham: Springer. p. 391. [doi](/source/Doi_(identifier)):[10.1007/978-3-030-46321-2](https://doi.org/10.1007%2F978-3-030-46321-2). [ISBN](/source/ISBN_(identifier)) [978-3-030-46321-2](https://en.wikipedia.org/wiki/Special:BookSources/978-3-030-46321-2). [MR](/source/MR_(identifier)) [4178171](https://mathscinet.ams.org/mathscinet-getitem?mr=4178171). [S2CID](/source/S2CID_(identifier)) [226465639](https://api.semanticscholar.org/CorpusID:226465639).

1. **[^](#cite_ref-50)** Palmer, Edgar M. (1985). "Appendix II: Stirling's formula". *Graphical Evolution: An introduction to the theory of random graphs*. Wiley-Interscience Series in Discrete Mathematics. Chichester: John Wiley & Sons. pp. 127–128. [ISBN](/source/ISBN_(identifier)) [0-471-81577-2](https://en.wikipedia.org/wiki/Special:BookSources/0-471-81577-2). [MR](/source/MR_(identifier)) [0795795](https://mathscinet.ams.org/mathscinet-getitem?mr=0795795).

1. ^ [***a***](#cite_ref-asymptotic_51-0) [***b***](#cite_ref-asymptotic_51-1) [***c***](#cite_ref-asymptotic_51-2) Chen, Chao-Ping; Lin, Long (2012). ["Remarks on asymptotic expansions for the gamma function"](https://doi.org/10.1016%2Fj.aml.2012.06.025). *Applied Mathematics Letters*. **25** (12): 2322–2326. [doi](/source/Doi_(identifier)):[10.1016/j.aml.2012.06.025](https://doi.org/10.1016%2Fj.aml.2012.06.025). [MR](/source/MR_(identifier)) [2967837](https://mathscinet.ams.org/mathscinet-getitem?mr=2967837).

1. ^ [***a***](#cite_ref-beiler_52-0) [***b***](#cite_ref-beiler_52-1) Beiler, Albert H. (1966). [*Recreations in the Theory of Numbers: The Queen of Mathematics Entertains*](https://books.google.com/books?id=NbbbL9gMJ88C&pg=PA49). Dover Recreational Math Series (2nd ed.). Courier Corporation. p. 49. [ISBN](/source/ISBN_(identifier)) [978-0-486-21096-4](https://en.wikipedia.org/wiki/Special:BookSources/978-0-486-21096-4).

1. **[^](#cite_ref-53)** [Chvátal 2021](#CITEREFChvátal2021). "1.4: Legendre's formula". pp. 6–7.

1. ^ [***a***](#cite_ref-padic_54-0) [***b***](#cite_ref-padic_54-1) [Robert, Alain M.](/source/Alain_M._Robert) (2000). "3.1: The p {\displaystyle p} -adic valuation of a factorial". *A Course in p {\displaystyle p} -adic Analysis*. [Graduate Texts in Mathematics](/source/Graduate_Texts_in_Mathematics). Vol. 198. New York: Springer-Verlag. pp. 241–242. [doi](/source/Doi_(identifier)):[10.1007/978-1-4757-3254-2](https://doi.org/10.1007%2F978-1-4757-3254-2). [ISBN](/source/ISBN_(identifier)) [0-387-98669-3](https://en.wikipedia.org/wiki/Special:BookSources/0-387-98669-3). [MR](/source/MR_(identifier)) [1760253](https://mathscinet.ams.org/mathscinet-getitem?mr=1760253).

1. **[^](#cite_ref-55)** [Peitgen, Heinz-Otto](/source/Heinz-Otto_Peitgen); [Jürgens, Hartmut](/source/Hartmut_J%C3%BCrgens); [Saupe, Dietmar](/source/Dietmar_Saupe) (2004). "Kummer's result and Legendre's identity". *Chaos and Fractals: New Frontiers of Science*. New York: Springer. pp. 399–400. [doi](/source/Doi_(identifier)):[10.1007/b97624](https://doi.org/10.1007%2Fb97624). [ISBN](/source/ISBN_(identifier)) [978-1-4684-9396-2](https://en.wikipedia.org/wiki/Special:BookSources/978-1-4684-9396-2).

1. **[^](#cite_ref-56)** [Alladi, Krishnaswami](/source/Krishnaswami_Alladi); Grinstead, Charles (1977). ["On the decomposition of n! into prime powers"](https://doi.org/10.1016%2F0022-314x%2877%2990006-3). *[Journal of Number Theory](/source/Journal_of_Number_Theory)*. **9** (4): 452–458. [doi](/source/Doi_(identifier)):[10.1016/0022-314x(77)90006-3](https://doi.org/10.1016%2F0022-314x%2877%2990006-3).

1. ^ [***a***](#cite_ref-koshy_57-0) [***b***](#cite_ref-koshy_57-1) Koshy, Thomas (2007). ["Example 3.12"](https://books.google.com/books?id=d5Z5I3gnFh0C&pg=PA178). *Elementary Number Theory with Applications* (2nd ed.). Elsevier. p. 178. [ISBN](/source/ISBN_(identifier)) [978-0-08-054709-1](https://en.wikipedia.org/wiki/Special:BookSources/978-0-08-054709-1).

1. **[^](#cite_ref-58)** [Sloane, N. J. A.](/source/Neil_Sloane) (ed.). ["Sequence A027868 (Number of trailing zeros in n!; highest power of 5 dividing n!)"](https://oeis.org/A027868). *The [On-Line Encyclopedia of Integer Sequences](/source/On-Line_Encyclopedia_of_Integer_Sequences)*. OEIS Foundation.

1. **[^](#cite_ref-59)** [Diaconis, Persi](/source/Persi_Diaconis) (1977). ["The distribution of leading digits and uniform distribution mod 1"](https://doi.org/10.1214%2Faop%2F1176995891). *[Annals of Probability](/source/Annals_of_Probability)*. **5** (1): 72–81. [doi](/source/Doi_(identifier)):[10.1214/aop/1176995891](https://doi.org/10.1214%2Faop%2F1176995891). [MR](/source/MR_(identifier)) [0422186](https://mathscinet.ams.org/mathscinet-getitem?mr=0422186).

1. **[^](#cite_ref-60)** [Bird, R. S.](/source/Richard_Bird_(computer_scientist)) (1972). "Integers with given initial digits". *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **79** (4): 367–370. [doi](/source/Doi_(identifier)):[10.1080/00029890.1972.11993051](https://doi.org/10.1080%2F00029890.1972.11993051). [JSTOR](/source/JSTOR_(identifier)) [2978087](https://www.jstor.org/stable/2978087). [MR](/source/MR_(identifier)) [0302553](https://mathscinet.ams.org/mathscinet-getitem?mr=0302553).

1. **[^](#cite_ref-61)** Kempner, A. J. (1918). "Miscellanea". *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **25** (5): 201–210. [doi](/source/Doi_(identifier)):[10.2307/2972639](https://doi.org/10.2307%2F2972639). [JSTOR](/source/JSTOR_(identifier)) [2972639](https://www.jstor.org/stable/2972639).

1. **[^](#cite_ref-62)** [Erdős, Paul](/source/Paul_Erd%C5%91s); Kastanas, Ilias (1994). ["The smallest factorial that is a multiple of n (solution to problem 6674)"](http://www-fourier.ujf-grenoble.fr/~marin/une_autre_crypto/articles_et_extraits_livres/irationalite/Erdos_P._Kastanas_I.The_smallest_factorial...-.pdf) (PDF). *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **101**: 179. [doi](/source/Doi_(identifier)):[10.2307/2324376](https://doi.org/10.2307%2F2324376). [JSTOR](/source/JSTOR_(identifier)) [2324376](https://www.jstor.org/stable/2324376)..

1. ^ [***a***](#cite_ref-bhargava_63-0) [***b***](#cite_ref-bhargava_63-1) [***c***](#cite_ref-bhargava_63-2) [Bhargava, Manjul](/source/Manjul_Bhargava) (2000). ["The factorial function and generalizations"](https://scholar.archive.org/work/dk6exbnlyrhp3bai62vnokou2q). *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **107** (9): 783–799. [CiteSeerX](/source/CiteSeerX_(identifier)) [10.1.1.585.2265](https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.585.2265). [doi](/source/Doi_(identifier)):[10.2307/2695734](https://doi.org/10.2307%2F2695734). [JSTOR](/source/JSTOR_(identifier)) [2695734](https://www.jstor.org/stable/2695734).

1. **[^](#cite_ref-64)** [Guy 2004](#CITEREFGuy2004). "B23: Equal products of factorials". p. 123.

1. **[^](#cite_ref-65)** [Luca, Florian](/source/Florian_Luca) (2007). "On factorials which are products of factorials". *[Mathematical Proceedings of the Cambridge Philosophical Society](/source/Mathematical_Proceedings_of_the_Cambridge_Philosophical_Society)*. **143** (3): 533–542. [Bibcode](/source/Bibcode_(identifier)):[2007MPCPS.143..533L](https://ui.adsabs.harvard.edu/abs/2007MPCPS.143..533L). [doi](/source/Doi_(identifier)):[10.1017/S0305004107000308](https://doi.org/10.1017%2FS0305004107000308). [MR](/source/MR_(identifier)) [2373957](https://mathscinet.ams.org/mathscinet-getitem?mr=2373957). [S2CID](/source/S2CID_(identifier)) [120875316](https://api.semanticscholar.org/CorpusID:120875316).

1. ^ [***a***](#cite_ref-davis_66-0) [***b***](#cite_ref-davis_66-1) [Davis, Philip J.](/source/Philip_J._Davis) (1959). ["Leonhard Euler's integral: A historical profile of the gamma function"](https://web.archive.org/web/20230101190952/https://www.maa.org/programs/maa-awards/writing-awards/leonhard-eulers-integral-an-historical-profile-of-the-gamma-function). *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **66** (10): 849–869. [doi](/source/Doi_(identifier)):[10.1080/00029890.1959.11989422](https://doi.org/10.1080%2F00029890.1959.11989422). [JSTOR](/source/JSTOR_(identifier)) [2309786](https://www.jstor.org/stable/2309786). [MR](/source/MR_(identifier)) [0106810](https://mathscinet.ams.org/mathscinet-getitem?mr=0106810). Archived from [the original](https://www.maa.org/programs/maa-awards/writing-awards/leonhard-eulers-integral-an-historical-profile-of-the-gamma-function) on 2023-01-01. Retrieved 2021-12-20.

1. ^ [***a***](#cite_ref-borwein-corless_67-0) [***b***](#cite_ref-borwein-corless_67-1) [Borwein, Jonathan M.](/source/Jonathan_Borwein); Corless, Robert M. (2018). "Gamma and factorial in the *Monthly*". *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **125** (5): 400–424. [arXiv](/source/ArXiv_(identifier)):[1703.05349](https://arxiv.org/abs/1703.05349). [doi](/source/Doi_(identifier)):[10.1080/00029890.2018.1420983](https://doi.org/10.1080%2F00029890.2018.1420983). [MR](/source/MR_(identifier)) [3785875](https://mathscinet.ams.org/mathscinet-getitem?mr=3785875). [S2CID](/source/S2CID_(identifier)) [119324101](https://api.semanticscholar.org/CorpusID:119324101).

1. **[^](#cite_ref-68)** [Remmert, Reinhold](/source/Reinhold_Remmert) (1996). "Wielandt's theorem about the Γ {\displaystyle \Gamma } -function". *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **103** (3): 214–220. [doi](/source/Doi_(identifier)):[10.1080/00029890.1996.12004726](https://doi.org/10.1080%2F00029890.1996.12004726). [JSTOR](/source/JSTOR_(identifier)) [2975370](https://www.jstor.org/stable/2975370). [MR](/source/MR_(identifier)) [1376175](https://mathscinet.ams.org/mathscinet-getitem?mr=1376175).

1. **[^](#cite_ref-69)** [Hadamard, J.](/source/Jacques_Hadamard) (1968) [1894]. ["Sur l'expression du produit 1·2·3· · · · ·(*n*−1) par une fonction entière"](http://www.luschny.de/math/factorial/hadamard/HadamardFactorial.pdf) (PDF). *Œuvres de Jacques Hadamard* (in French). Paris: Centre National de la Recherche Scientifiques.

1. **[^](#cite_ref-70)** Alzer, Horst (2009). "A superadditive property of Hadamard's gamma function". *Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg*. **79** (1): 11–23. [doi](/source/Doi_(identifier)):[10.1007/s12188-008-0009-5](https://doi.org/10.1007%2Fs12188-008-0009-5). [MR](/source/MR_(identifier)) [2541340](https://mathscinet.ams.org/mathscinet-getitem?mr=2541340). [S2CID](/source/S2CID_(identifier)) [123691692](https://api.semanticscholar.org/CorpusID:123691692).

1. **[^](#cite_ref-71)** [Robert 2000](#CITEREFRobert2000). "7.1: The gamma function Γ p {\displaystyle \Gamma _{p}} ". pp. 366–385.

1. **[^](#cite_ref-72)** Ross, Bertram (1978). "The psi function". *[Mathematics Magazine](/source/Mathematics_Magazine)*. **51** (3): 176–179. [doi](/source/Doi_(identifier)):[10.1080/0025570X.1978.11976704](https://doi.org/10.1080%2F0025570X.1978.11976704). [JSTOR](/source/JSTOR_(identifier)) [2689999](https://www.jstor.org/stable/2689999). [MR](/source/MR_(identifier)) [1572267](https://mathscinet.ams.org/mathscinet-getitem?mr=1572267).

1. **[^](#cite_ref-73)** Brase, Charles Henry; Brase, Corrinne Pellillo (2014). [*Understandable Statistics: Concepts and Methods*](https://books.google.com/books?id=a8OiAgAAQBAJ&pg=PA182) (11th ed.). Cengage Learning. p. 182. [ISBN](/source/ISBN_(identifier)) [978-1-305-14290-9](https://en.wikipedia.org/wiki/Special:BookSources/978-1-305-14290-9).

1. **[^](#cite_ref-74)** ["math — Mathematical functions"](https://docs.python.org/3/library/math.html). *Python 3 Documentation: The Python Standard Library*. Retrieved 2021-12-21.

1. **[^](#cite_ref-75)** ["Factorial"](https://www.boost.org/doc/libs/1_78_0/libs/math/doc/html/math_toolkit/factorials/sf_factorial.html). *Boost 1.78.0 Documentation: Math Special Functions*. Retrieved 2021-12-21.

1. **[^](#cite_ref-76)** Addis, Tom; Addis, Jan (2009). [*Drawing Programs: The Theory and Practice of Schematic Functional Programming*](https://books.google.com/books?id=cWM7ZBfEl_0C&pg=PA149). Springer. pp. 149–150. [ISBN](/source/ISBN_(identifier)) [978-1-84882-618-2](https://en.wikipedia.org/wiki/Special:BookSources/978-1-84882-618-2).

1. **[^](#cite_ref-77)** Chapman, Stephen J. (2019). ["Example 5.2: The factorial function"](https://books.google.com/books?id=jVEzEAAAQBAJ&pg=PA215). *MATLAB Programming for Engineers* (6th ed.). Cengage Learning. p. 215. [ISBN](/source/ISBN_(identifier)) [978-0-357-03052-3](https://en.wikipedia.org/wiki/Special:BookSources/978-0-357-03052-3).

1. **[^](#cite_ref-78)** Hey, Tony; Pápay, Gyuri (2014). [*The Computing Universe: A Journey through a Revolution*](https://books.google.com/books?id=q4FIBQAAQBAJ&pg=PA64). Cambridge University Press. p. 64. [ISBN](/source/ISBN_(identifier)) [9781316123225](https://en.wikipedia.org/wiki/Special:BookSources/9781316123225).

1. **[^](#cite_ref-79)** Bolboaca, Alexandru (2019). [*Hands-On Functional Programming with C++: An effective guide to writing accelerated functional code using C++17 and C++20*](https://books.google.com/books?id=GwSgDwAAQBAJ&pg=PA188). Packt Publishing. p. 188. [ISBN](/source/ISBN_(identifier)) [978-1-78980-921-3](https://en.wikipedia.org/wiki/Special:BookSources/978-1-78980-921-3).

1. **[^](#cite_ref-80)** Gray, John W. (2014). [*Mastering Mathematica: Programming Methods and Applications*](https://books.google.com/books?id=a4riBQAAQBAJ&pg=PA233). Academic Press. pp. 233–234. [ISBN](/source/ISBN_(identifier)) [978-1-4832-1403-0](https://en.wikipedia.org/wiki/Special:BookSources/978-1-4832-1403-0).

1. **[^](#cite_ref-81)** Torra, Vicenç (2016). [*Scala From a Functional Programming Perspective: An Introduction to the Programming Language*](https://books.google.com/books?id=eMwcDQAAQBAJ&pg=PA96). Lecture Notes in Computer Science. Vol. 9980. Springer. p. 96. [ISBN](/source/ISBN_(identifier)) [978-3-319-46481-7](https://en.wikipedia.org/wiki/Special:BookSources/978-3-319-46481-7).

1. **[^](#cite_ref-82)** [Sussman, Gerald Jay](/source/Gerald_Jay_Sussman) (1982). "LISP, programming, and implementation". *Functional Programming and Its Applications: An Advanced Course*. CREST Advanced Courses. Cambridge University Press. pp. 29–72. [ISBN](/source/ISBN_(identifier)) [978-0-521-24503-6](https://en.wikipedia.org/wiki/Special:BookSources/978-0-521-24503-6). See in particular [p. 34](https://books.google.com/books?id=O_M8AAAAIAAJ&pg=PA34).

1. **[^](#cite_ref-83)** Chaudhuri, Ranjan (June 2003). "Do the arithmetic operations really execute in constant time?". *ACM SIGCSE Bulletin*. **35** (2). Association for Computing Machinery: 43–44. [doi](/source/Doi_(identifier)):[10.1145/782941.782977](https://doi.org/10.1145%2F782941.782977). [S2CID](/source/S2CID_(identifier)) [13629142](https://api.semanticscholar.org/CorpusID:13629142).

1. ^ [***a***](#cite_ref-fateman_84-0) [***b***](#cite_ref-fateman_84-1) [Fateman, Richard J.](/source/Richard_Fateman) (April 11, 2006). ["Comments on Factorial Programs"](http://people.eecs.berkeley.edu/~fateman/papers/factorial.pdf) (PDF). University of California, Berkeley.

1. ^ [***a***](#cite_ref-sigplan_85-0) [***b***](#cite_ref-sigplan_85-1) Winkler, Jürgen F. H.; Kauer, Stefan (March 1997). ["Proving assertions is also useful"](https://doi.org/10.1145%2F251634.251638). *ACM SIGPLAN Notices*. **32** (3). Association for Computing Machinery: 38–41. [doi](/source/Doi_(identifier)):[10.1145/251634.251638](https://doi.org/10.1145%2F251634.251638). [S2CID](/source/S2CID_(identifier)) [17347501](https://api.semanticscholar.org/CorpusID:17347501).

1. ^ [***a***](#cite_ref-borwein_86-0) [***b***](#cite_ref-borwein_86-1) [Borwein, Peter B.](/source/Peter_Borwein) (1985). "On the complexity of calculating factorials". *[Journal of Algorithms](/source/Journal_of_Algorithms)*. **6** (3): 376–380. [doi](/source/Doi_(identifier)):[10.1016/0196-6774(85)90006-9](https://doi.org/10.1016%2F0196-6774%2885%2990006-9). [MR](/source/MR_(identifier)) [0800727](https://mathscinet.ams.org/mathscinet-getitem?mr=0800727).

1. **[^](#cite_ref-87)** Harvey, David; [van der Hoeven, Joris](/source/Joris_van_der_Hoeven) (2021). ["Integer multiplication in time O ( n log ⁡ n ) {\displaystyle O(n\log n)} "](https://hal.archives-ouvertes.fr/hal-02070778/file/nlogn.pdf) (PDF). *[Annals of Mathematics](/source/Annals_of_Mathematics)*. Second Series. **193** (2): 563–617. [doi](/source/Doi_(identifier)):[10.4007/annals.2021.193.2.4](https://doi.org/10.4007%2Fannals.2021.193.2.4). [MR](/source/MR_(identifier)) [4224716](https://mathscinet.ams.org/mathscinet-getitem?mr=4224716). [S2CID](/source/S2CID_(identifier)) [109934776](https://api.semanticscholar.org/CorpusID:109934776).

1. **[^](#cite_ref-88)** Arndt, Jörg (2011). "34.1.1.1: Computation of the factorial". [*Matters Computational: Ideas, Algorithms, Source Code*](http://jjj.de/fxt/fxtbook.pdf) (PDF). Springer. pp. 651–652. See also "34.1.5: Performance", pp. 655–656.

1. ^ [***a***](#cite_ref-schonhage_89-0) [***b***](#cite_ref-schonhage_89-1) Schönhage, Arnold (1994). *Fast algorithms: a multitape Turing machine implementation*. B.I. Wissenschaftsverlag. p. 226.

1. **[^](#cite_ref-90)** [Guy 2004](#CITEREFGuy2004). "B43: Alternating sums of factorials". pp. 152–153.

1. ^ [***a***](#cite_ref-callan_91-0) [***b***](#cite_ref-callan_91-1) Callan, David (2009). "A combinatorial survey of identities for the double factorial". [arXiv](/source/ArXiv_(identifier)):[0906.1317](https://arxiv.org/abs/0906.1317) [[math.CO](https://arxiv.org/archive/math.CO)].

1. **[^](#cite_ref-92)** Meserve, B. E. (1948). "Classroom Notes: Double Factorials". *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **55** (7): 425–426. [doi](/source/Doi_(identifier)):[10.2307/2306136](https://doi.org/10.2307%2F2306136). [JSTOR](/source/JSTOR_(identifier)) [2306136](https://www.jstor.org/stable/2306136). [MR](/source/MR_(identifier)) [1527019](https://mathscinet.ams.org/mathscinet-getitem?mr=1527019).

1. **[^](#cite_ref-93)** Mezey, Paul G. (2009). "Some dimension problems in molecular databases". *Journal of Mathematical Chemistry*. **45** (1): 1–6. [doi](/source/Doi_(identifier)):[10.1007/s10910-008-9365-8](https://doi.org/10.1007%2Fs10910-008-9365-8). [S2CID](/source/S2CID_(identifier)) [120103389](https://api.semanticscholar.org/CorpusID:120103389)..

1. **[^](#cite_ref-94)** Dale, M. R. T.; Moon, J. W. (1993). "The permuted analogues of three Catalan sets". *[Journal of Statistical Planning and Inference](/source/Journal_of_Statistical_Planning_and_Inference)*. **34** (1): 75–87. [doi](/source/Doi_(identifier)):[10.1016/0378-3758(93)90035-5](https://doi.org/10.1016%2F0378-3758%2893%2990035-5). [MR](/source/MR_(identifier)) [1209991](https://mathscinet.ams.org/mathscinet-getitem?mr=1209991)..

1. **[^](#cite_ref-95)** [Luca, Florian](/source/Florian_Luca); Marques, Diego (2010). ["Perfect powers in the summatory function of the power tower"](http://jtnb.cedram.org/item?id=JTNB_2010__22_3_703_0). *[Journal de Théorie des Nombres de Bordeaux](/source/Journal_de_Th%C3%A9orie_des_Nombres_de_Bordeaux)*. **22** (3): 703–718. [doi](/source/Doi_(identifier)):[10.5802/jtnb.740](https://doi.org/10.5802%2Fjtnb.740). [MR](/source/MR_(identifier)) [2769339](https://mathscinet.ams.org/mathscinet-getitem?mr=2769339).

1. **[^](#cite_ref-FOOTNOTEGrahamKnuthPatashnik1988x,_47–48_96-0)** [Graham, Knuth & Patashnik 1988](#CITEREFGrahamKnuthPatashnik1988), pp. x, 47–48.

1. **[^](#cite_ref-97)** [Sagan, Bruce E.](/source/Bruce_Sagan) (2020). ["Theorem 1.2.1"](https://books.google.com/books?id=DYgEEAAAQBAJ&pg=PA5). *Combinatorics: the Art of Counting*. Graduate Studies in Mathematics. Vol. 210. Providence, Rhode Island: American Mathematical Society. p. 5. [ISBN](/source/ISBN_(identifier)) [978-1-4704-6032-7](https://en.wikipedia.org/wiki/Special:BookSources/978-1-4704-6032-7). [MR](/source/MR_(identifier)) [4249619](https://mathscinet.ams.org/mathscinet-getitem?mr=4249619).

1. **[^](#cite_ref-98)** [Hardy, G. H.](/source/G._H._Hardy) (1921). ["Examples XLV"](https://archive.org/details/coursepuremath00hardrich/page/n229). [*A Course of Pure Mathematics*](/source/A_Course_of_Pure_Mathematics) (3rd ed.). Cambridge University Press. p. 215.

1. **[^](#cite_ref-99)** Daley, D. J.; Vere-Jones, D. (1988). ["5.2: Factorial moments, cumulants, and generating function relations for discrete distributions"](https://books.google.com/books?id=Af7lBwAAQBAJ&pg=PA112). *An Introduction to the Theory of Point Processes*. Springer Series in Statistics. New York: Springer-Verlag. p. 112. [ISBN](/source/ISBN_(identifier)) [0-387-96666-8](https://en.wikipedia.org/wiki/Special:BookSources/0-387-96666-8). [MR](/source/MR_(identifier)) [0950166](https://mathscinet.ams.org/mathscinet-getitem?mr=0950166).

1. **[^](#cite_ref-100)** [Sloane, N. J. A.](/source/Neil_Sloane) (ed.). ["Sequence A002109 (Hyperfactorials: Product_{k = 1..n} k^k)"](https://oeis.org/A002109). *The [On-Line Encyclopedia of Integer Sequences](/source/On-Line_Encyclopedia_of_Integer_Sequences)*. OEIS Foundation.

1. **[^](#cite_ref-101)** [Kinkelin, H.](/source/Hermann_Kinkelin) (1860). "Ueber eine mit der Gammafunction verwandte Transcendente und deren Anwendung auf die Integralrechung" [On a transcendental variation of the gamma function and its application to the integral calculus]. *[Journal für die reine und angewandte Mathematik](/source/Crelle's_Journal)* (in German). **1860** (57): 122–138. [doi](/source/Doi_(identifier)):[10.1515/crll.1860.57.122](https://doi.org/10.1515%2Fcrll.1860.57.122). [S2CID](/source/S2CID_(identifier)) [120627417](https://api.semanticscholar.org/CorpusID:120627417).

1. **[^](#cite_ref-102)** [Glaisher, J. W. L.](/source/James_Whitbread_Lee_Glaisher) (1877). ["On the product 11.22.33...*n**n*"](https://archive.org/details/messengermathem01glaigoog/page/n56). *[Messenger of Mathematics](/source/Messenger_of_Mathematics)*. **7**: 43–47.

1. **[^](#cite_ref-103)** Aebi, Christian; Cairns, Grant (2015). "Generalizations of Wilson's theorem for double-, hyper-, sub- and superfactorials". *[The American Mathematical Monthly](/source/The_American_Mathematical_Monthly)*. **122** (5): 433–443. [doi](/source/Doi_(identifier)):[10.4169/amer.math.monthly.122.5.433](https://doi.org/10.4169%2Famer.math.monthly.122.5.433). [JSTOR](/source/JSTOR_(identifier)) [10.4169/amer.math.monthly.122.5.433](https://www.jstor.org/stable/10.4169/amer.math.monthly.122.5.433). [MR](/source/MR_(identifier)) [3352802](https://mathscinet.ams.org/mathscinet-getitem?mr=3352802). [S2CID](/source/S2CID_(identifier)) [207521192](https://api.semanticscholar.org/CorpusID:207521192).

1. **[^](#cite_ref-104)** [Sloane, N. J. A.](/source/Neil_Sloane) (ed.). ["Sequence A001013 (Jordan-Polya numbers: products of factorial numbers)"](https://oeis.org/A001013). *The [On-Line Encyclopedia of Integer Sequences](/source/On-Line_Encyclopedia_of_Integer_Sequences)*. OEIS Foundation.

1. **[^](#cite_ref-105)** Nelson, Randolph (2020). [*A Brief Journey in Discrete Mathematics*](https://books.google.com/books?id=m8PPDwAAQBAJ&pg=PA127). Cham: Springer. p. 127. [doi](/source/Doi_(identifier)):[10.1007/978-3-030-37861-5](https://doi.org/10.1007%2F978-3-030-37861-5). [ISBN](/source/ISBN_(identifier)) [978-3-030-37861-5](https://en.wikipedia.org/wiki/Special:BookSources/978-3-030-37861-5). [MR](/source/MR_(identifier)) [4297795](https://mathscinet.ams.org/mathscinet-getitem?mr=4297795). [S2CID](/source/S2CID_(identifier)) [213895324](https://api.semanticscholar.org/CorpusID:213895324).

1. **[^](#cite_ref-106)** [Barnes, E. W.](/source/Ernest_Barnes) (1900). ["The theory of the G-function"](https://gdz.sub.uni-goettingen.de/id/PPN600494829_0031?tify={%22pages%22:%5b268%5d,%22view%22:%22toc%22}). *[The Quarterly Journal of Pure and Applied Mathematics](/source/The_Quarterly_Journal_of_Pure_and_Applied_Mathematics)*. **31**: 264–314. [JFM](/source/JFM_(identifier)) [30.0389.02](https://zbmath.org/?format=complete&q=an:30.0389.02).

1. **[^](#cite_ref-107)** [Knuth, Donald](/source/Donald_Knuth) (1997). *Fundamental Algorithms*. [The Art of Computer Programming](/source/The_Art_of_Computer_Programming). Vol. 1 (3rd ed.). Reading, MA: Addison-Wesley Professional. p. 48.

## External links

- [Arithmetic portal](https://en.wikipedia.org/wiki/Portal:Arithmetic)
- [Mathematics portal](https://en.wikipedia.org/wiki/Portal:Mathematics)

Wikimedia Commons has media related to [Factorial (function)](https://commons.wikimedia.org/wiki/Category:Factorial_(function)).

- OEIS [sequence A000142 (Factorial numbers)](https://oeis.org/A000142)

- ["Factorial"](https://www.encyclopediaofmath.org/index.php?title=Factorial). *[Encyclopedia of Mathematics](/source/Encyclopedia_of_Mathematics)*. [EMS Press](/source/European_Mathematical_Society). 2001 [1994].

- [Weisstein, Eric W.](/source/Eric_W._Weisstein) ["Factorial"](https://mathworld.wolfram.com/Factorial.html). *[MathWorld](/source/MathWorld)*.

v t e Calculus Precalculus Binomial theorem Concave function Continuous function Factorial Finite difference Free variables and bound variables Graph of a function Linear function Radian Rolle's theorem Secant Slope Tangent Limits Indeterminate form Limit of a function One-sided limit Limit of a sequence Order of approximation (ε, δ)-definition of limit Differential calculus Derivative Second derivative Partial derivative Differential Differential operator Mean value theorem Notation Leibniz's notation Newton's notation Rules of differentiation linearity Power Sum Chain L'Hôpital's Product General Leibniz's rule Quotient Other techniques Implicit differentiation Inverse function rule Logarithmic derivative Related rates Stationary points First derivative test Second derivative test Extreme value theorem Maximum and minimum Further applications Newton's method Taylor's theorem Differential equation Ordinary differential equation Partial differential equation Stochastic differential equation Integral calculus Antiderivative Arc length Riemann integral Basic properties Constant of integration Fundamental theorem of calculus Differentiating under the integral sign Integration by parts Integration by substitution trigonometric Euler Tangent half-angle substitution Partial fractions in integration Quadratic integral Trapezoidal rule Volumes Washer method Shell method Integral equation Integro-differential equation Vector calculus Derivatives Curl Directional derivative Divergence Gradient Laplacian Basic theorems Line integrals Green's Stokes' Gauss' Multivariable calculus Divergence theorem Geometric Hessian matrix Jacobian matrix and determinant Lagrange multiplier Line integral Matrix Multiple integral Partial derivative Surface integral Volume integral Advanced topics Differential forms Exterior derivative Generalized Stokes' theorem Tensor calculus Sequences and series Arithmetico-geometric sequence Types of series Alternating Binomial Fourier Geometric Harmonic Infinite Power Maclaurin Taylor Telescoping Tests of convergence Abel's Alternating series Cauchy condensation Direct comparison Dirichlet's Integral Limit comparison Ratio Root Term Special functions and numbers Bernoulli numbers e (mathematical constant) Exponential function Natural logarithm Stirling's approximation History of calculus Adequality Brook Taylor Colin Maclaurin Generality of algebra Gottfried Wilhelm Leibniz Infinitesimal Infinitesimal calculus Isaac Newton Fluxion Law of Continuity Leonhard Euler Method of Fluxions The Method of Mechanical Theorems Lists Integrals rational functions irrational algebraic functions exponential functions logarithmic functions hyperbolic functions inverse trigonometric functions inverse Secant Secant cubed List of limits List of derivatives Miscellaneous topics Complex calculus Contour integral Differential geometry Manifold Curvature of curves of surfaces Tensor Euler–Maclaurin formula Gabriel's horn Integration Bee Proof that 22/7 exceeds π Regiomontanus' angle maximization problem Steinmetz solid

v t e Sequences and series List of mathematical series Integer sequences Basic Arithmetic progression Geometric progression Harmonic progression Square number Cubic number Factorial Powers of two Powers of three Powers of 10 Advanced (list) Complete sequence Fibonacci sequence Figurate number Heptagonal number Hexagonal number Lucas number Pell number Pentagonal number Polygonal number Triangular number array Properties of sequences Cauchy sequence Monotonic function Periodic sequence Properties of series Series Alternating Convergent Divergent Telescoping Convergence Absolute Conditional Uniform Explicit series Convergent 1/2 − 1/4 + 1/8 − 1/16 + ⋯ 1/2 + 1/4 + 1/8 + 1/16 + ⋯ 1/4 + 1/16 + 1/64 + 1/256 + ⋯ 1 + 1/2s + 1/3s + ... (Riemann zeta function) Arithmetico-geometric Binomial Divergent 1 + 1 + 1 + 1 + ⋯ 1 − 1 + 1 − 1 + ⋯ (Grandi's series) 1 + 2 + 3 + 4 + ⋯ 1 − 2 + 3 − 4 + ⋯ 1 + 2 + 4 + 8 + ⋯ 1 − 2 + 4 − 8 + ⋯ Infinite arithmetic series 1 − 1 + 2 − 6 + 24 − 120 + ⋯ (alternating factorials) 1 + 1/2 + 1/3 + 1/4 + ⋯ (harmonic series) 1/2 + 1/3 + 1/5 + 1/7 + 1/11 + ⋯ (inverses of primes) Kinds of series Geometric Taylor series Power series Formal power series Laurent series Puiseux series Dirichlet series Trigonometric series Fourier series Generating series Tests of convergence Abel's Alternating series Cauchy condensation Direct comparison Dirichlet's Integral Limit comparison Ratio Root Term Hypergeometric series Generalized hypergeometric series Hypergeometric function of a matrix argument Lauricella hypergeometric series Modular hypergeometric series Riemann's differential equation Theta hypergeometric series Category

Authority control databases GND

---
Adapted from the Wikipedia article [Factorial](https://en.wikipedia.org/wiki/Factorial) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Factorial?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
