# GetWiki

*factorial*

ARTICLE SUBJECTS

being →

database →

ethics →

fiction →

history →

internet →

language →

linux →

logic →

method →

news →

policy →

purpose →

religion →

science →

software →

truth →

unix →

wiki →

ARTICLE TYPES

essay →

feed →

help →

system →

wiki →

ARTICLE ORIGINS

critical →

forked →

imported →

original →

factorial

[ temporary import ]

**please note:**

- the content below is remote from Wikipedia

- it has been imported raw for GetWiki

*n*}}! {{math|

*n*!}}

| 1 |

| 1 |

| 2 |

| 6 |

| 24 |

| 120 |

| 720 |

5040|fmt=gaps}} |

40320}} |

362880}} |

3628800}} |

39916800}} |

479001600}} |

6227020800}} |

87178291200}} |

1307674368000}} |

20922789888000}} |

355687428096000}} |

6402373705728000}} |

121645100408832000}} |

2432902008176640000}} |

{{val | e=25}} |

{{val | e=64}} |

{{val | e=100}} |

{{val | e=157}} |

{{val | e=1000|fmt=gaps}} |

1000|fmt=gaps}} | {{val | e=2567|fmt=gaps}} |

3249|fmt=gaps}} | {{val | e=10000}} |

10000|fmt=gaps}} | {{val | e=35659}} |

25206|fmt=gaps}} | {{val | e=100000}} |

100000|fmt=gaps}} | {{val | e=456573}} |

205023|fmt=gaps}} | {{val | e=1000004}} |

1000000|fmt=gaps}} | {{val | e=5565708}} |

googol>{{val | > | e=101.9981097754820}} |

**factorial**of a positive integer {{mvar|n}}, denoted by {{math|

*n*!}}, is the product of all positive integers less than or equal to {{mvar|n}}. For example,

5! = 5 times 4 times 3 times 2 times 1 = 120 ,.

The value of 0! is 1, according to the convention for an empty product.{{sfn|Graham|Knuth|Patashnik|1988|page=111}}The factorial operation is encountered in many areas of mathematics, notably in combinatorics, algebra, and mathematical analysis. Its most basic occurrence is the fact that there are {{math|*n*!}} ways to arrange {{mvar|n}} distinct objects into a sequence. These arrangements are called the permutations of the set of objects.The definition of the factorial function can also be extended to non-integer arguments, while retaining its most important properties; this involves more advanced mathematics, notably techniques from mathematical analysis.

## History

Factorials were used to count permutations at least as early as the 12th century, by Indian scholars.JOURNAL, Biggs, Norman L., Norman L. Biggs, May 1979, The roots of combinatorics, Historia Mathematica, 6, 2, 109â€“136, 10.1016/0315-0860(79)90074-0, 0315-0860, ScienceDirect, In 1677, Fabian Stedman described factorials as applied to change ringing, a musical art involving the ringing of many tuned bells.{{sfn|Stedman|1677|pages=6â€“9}} After describing a recursive approach, Stedman gives a statement of a factorial (using the language of the original):Now the nature of these methods is such, that the changes on one number comprehends [includes] the changes on all lesser numbers ... insomuch that a compleat Peal of changes on one number seemeth to be formed by uniting of the compleat Peals on all lesser numbers into one entire body.{{sfn|Stedman|1677|p=8}}The notation {{math|{{math|*n*!}}}} was introduced by the French mathematician Christian Kramp in 1808.{{harvnb|Higgins|2008|page=12}}

## Definition

The factorial function is defined by the product
n! = 1 cdot 2 cdot 3 cdotldotscdot (n-2) cdot (n-1) cdot n,

initially for integer {{math|*n*â‰¥ 1}}. This may be written in the Pi product notation as

n! = prod_{i = 1}^n i.

From these formulas, one may derive the recurrence relation
n! = n cdot (n-1)! .

For example, one has
begin{align}

5! &= 5 cdot 4!

6! &= 6 cdot 5!

50! &= 50 cdot 49!end{align}and so on.6! &= 6 cdot 5!

### Factorial of zero

In order for the recurrence relation to be extended to {{math|1=*n*= 0}}, it is necessary to define

0! = 1

so that
1! = 1 cdot 0! = 1.

There are several independent reasons to view this definition as harmonious. These include the following: - In the case {{math|1=
*n*= 0}}, the definition of {{math|*n*!}} as a product involves the product of no numbers at all, and so is an example of the broader convention that the product of no factors is equal to the multiplicative identity (see empty product). - There is exactly one permutation of zero objects (with nothing to permute, the only rearrangement is to do nothing).
- It makes many identities in combinatorics valid for all applicable sizes. The number of ways to choose 0 elements from the empty set is given by the binomial coefficient

binom{0}{0} = frac{0!}{0!0!} = 1 .

More generally, the number of ways to choose all {{mvar|n}} elements among a set of {{mvar|n}} is
binom{n}{n} = frac{n!}{n!0!} = 1 .

- It allows for the compact expression of many formulae, such as the exponential function, as a power series:

e^x = sum_{n = 0}^infty frac{x^n}{n!}.

### Factorial of a non-integer

The factorial function can also be defined for non-integer values using more advanced mathematics (the gamma function {{math|1=*n*! = Î“(

*n*+ 1)}}), detailed in the section below. This more generalized definition is used by advanced calculators and mathematical software such as Maple, Mathematica, or APL.

## Applications

Although the factorial function has its roots in combinatorics, formulas involving factorials occur in many areas of mathematics.- There are {{math|
*n*!}} different ways of arranging {{mvar|n}} distinct objects into a sequence, the permutations of those objects.BOOK, Beyond Infinity: An expedition to the outer limits of the mathematical universe, Cheng, Eugenia, 2017-03-09, Profile Books, 9781782830818, en, Eugenia Cheng, BOOK, The Book of Numbers, Conway, John H., Guy, Richard, 1998-03-16, Springer Science & Business Media, 9780387979939, en, John Horton Conway, Richard K. Guy, - Often factorials appear in the denominator of a formula to account for the fact that ordering is to be ignored. A classical example is counting {{mvar|k}}-combinations (subsets of {{mvar|k}} elements) from a set with {{mvar|n}} elements. One can obtain such a combination by choosing a {{mvar|k}}-permutation: successively selecting and removing one element of the set, {{mvar|k}} times, for a total of

(n-0)(n-1)(n-2)cdotsleft(n-(k-1)right) = tfrac{n!}{(n-k)!} = n^{underline k}

possibilities. This however produces the {{mvar|k}}-combinations in a particular order that one wishes to ignore; since each {{mvar|k}}-combination is obtained in {{math|*k*!}} different ways, the correct number of {{mvar|k}}-combinations is

frac{n(n-1)(n-2)cdots(n-k+1)}{k(k-1)(k-2)cdots 1} = frac{n^{underline k}}{k!}= frac{n!}{(n-k)!k!} = binom {n}{k}.

This number is knownBOOK, The Art of Computer Programming: Volume 1: Fundamental Algorithms, Knuth, Donald E., 1997-07-04, Addison-Wesley Professional, 9780321635747, en, Donald Knuth, as the binomial coefficient, because it is also the coefficient of {{math|*x*

*k*}} in {{math|(1 +

*x*)

*n*}}. The term n^{underline k} is often called a falling factorial (pronounced "

*n*to the falling

*k*").

- Factorials occur in algebra for various reasons, such as via the already mentioned coefficients of the binomial formula, or through averaging over permutations for symmetrization of certain operations.
- Factorials also turn up in calculus; for example, they occur in the denominators of the terms of Taylor's formula,WEB,weblink 18.01 Single Variable Calculus, Lecture 37: Taylor Series, Fall 2006, MIT OpenCourseWare,weblink" title="web.archive.org/web/20121706133400weblink">weblink 2018-04-26, no, 2017-05-03, where they are used as compensation terms due to the {{mvar|n}}th derivative of {{math|
*x**n*}} being equivalent to {{math|*n*!}}. - Factorials are also used extensively in probability theory.BOOK, Statistical Physics of Particles, Kardar, Mehran, 2007-06-25, Cambridge University Press, 9780521873420, 35â€“56, English, Chapter 2: Probability, Mehran Kardar,
- Factorials can be useful to facilitate expression manipulation. For instance the number of {{mvar|k}}-permutations of {{mvar|n}} can be written as

n^{underline k}=frac{n!}{(n-k)!},;

while this is inefficient as a means to compute that number, it may serve to prove a symmetry property of binomial coefficients:
binom nk=frac{n^{underline k}}{k!}=frac{n!}{(n-k)!k!} = frac{n^{underline{n-k}}}{(n-k)!} = binom n{n-k},.

- The factorial function can be shown, using the power rule, to be

n! = D^n,x^n = frac{d^n}{dx^n},x^n

where {{math|*D*

**'n**

*x**'n*}} is Euler's notation for the {{mvar|n}}th derivative of {{math|

*xn*}}.WEB,weblink 18.01 Single Variable Calculus, Lecture 4: Chain rule, higher derivatives, Fall 2006, MIT OpenCourseWare,weblink" title="web.archive.org/web/20121706133400weblink">weblink 2018-04-26, no, 2017-05-03,

## Rate of growth and approximations for large *{{mvar|n}}*

(File:Log-factorial.svg|upright=1.35|thumb|right|Plot of the natural logarithm of the factorial)As {{mvar|n}} grows, the factorial {{math|*n*!}} increases faster than all polynomials and exponential functions (but slower than double exponential functions) in {{mvar|n}}.Most approximations for

*n*! are based on approximating its natural logarithm

ln n! = sum_{x=1}^n ln x ,.

The graph of the function {{math|*f*(

*n*) {{=}} ln

*n*!}} is shown in the figure on the right. It looks approximately linear for all reasonable values of {{mvar|n}}, but this intuition is false. We get one of the simplest approximations for {{math|ln

*n*!}} by bounding the sum with an integral from above and below as follows:

int_1^n ln x , dx leq sum_{x=1}^n ln x leq int_0^n ln (x+1) , dx

which gives us the estimate
nlnleft(frac{n}{e}right)+1 leq ln n! leq (n+1)lnleft( frac{n+1}{e} right) + 1 ,.

Hence {{math|ln *n*! âˆ¼

*n*ln

*n*}} (see Big {{mvar|O}} notation). This result plays a key role in the analysis of the computational complexity of sorting algorithms (see comparison sort). From the bounds on {{math|ln

*n*!}} deduced above we get that

left(frac neright)^n e leq n! leq left(frac{n+1}eright)^{n+1} e ,.

It is sometimes practical to use weaker but simpler estimates. Using the above formula it is easily shown that for all {{mvar|n}} we have {{math|({{sfrac|*n*|3}})

*n*<

*n*!}}, and for all {{math|

*n*â‰¥ 6}} we have {{math|

*n*! < ({{sfrac|

*n*|2}})

*n*}}.(File:Mplwp factorial gamma stirling.svg|thumb|right|upright=1.35|Comparison of Stirling's approximation with the factorial)For large {{mvar|n}} we get a better estimate for the number {{math|

*n*!}} using Stirling's approximation:

n!simsqrt{2pi n}left(frac{n}{e}right)^n,.

This in fact comes from an asymptotic series for the logarithm, and {{mvar|n}} factorial lies between this and the next approximation:
sqrt{2pi n}left(frac{n}{e}right)^n 2}} or {{math|Re

*z*> 2}}, the six coefficients above are sufficient for the evaluation of the factorial with complex double precision. For higher precision more coefficients can be computed by a rational QD scheme (Rutishauser's QD algorithm).WEB, Peter, Luschny,weblink On Stieltjes' Continued Fraction for the Gamma Function, yes,weblink" title="web.archive.org/web/20110514230817weblink">weblink 2011-05-14,### Non-extendability to negative integers

The relation {{math|*n*! {{=}}

*n*Ã— (

*n*âˆ’ 1)!}} allows one to compute the factorial for an integer given the factorial for a smaller integer. The relation can be inverted so that one can compute the factorial for an integer given the factorial for a larger integer:

(n-1)! = frac{n!}{n} .

Note, however, that this recursion does not permit us to compute the factorial of a negative integer; use of the formula to compute (âˆ’1)! would require a division by zero, and thus blocks us from computing a factorial value for every negative integer. Similarly, the gamma function is not defined for zero or negative integers, though it is defined for all other complex numbers.## Factorial-like products and functions

There are several other integer sequences similar to the factorial that are used in mathematics:### Double factorial

The product of all the odd integers up to some odd positive integer {{mvar|n}} is called the**double factorial**of {{mvar|n}}, and denoted by {{math|

*n*!!}}.{{citation|title=A combinatorial survey of identities for the double factorial|first=David|last=Callan|arxiv=0906.1317|year=2009|bibcode=2009arXiv0906.1317C}}. That is,

(2k-1)!! = prod_{i=1}^k (2i-1) = frac{(2k)!}{2^k k!} = frac {_{2k}P_k} {2^k} = frac {left(2kright)^{underline k}} {2^k},.

For example, {{nowrap|1=9!! = 1 Ã— 3 Ã— 5 Ã— 7 Ã— 9 = 945}}.The sequence of double factorials for {{math|*n*{{=}} 1, 3, 5, 7,...}} starts as

1, 3, 15, 105, 945, {{val|10395}}, {{val|135135}},... {{OEIS|id=A001147}}

Double factorial notation may be used to simplify the expression of certain trigonometric integrals,{{citation
| last = Meserve | first = B. E.

| doi = 10.2307/2306136

| issue = 7

| journal = The American Mathematical Monthly

| mr = 1527019

| pages = 425â€“426

| title = Classroom Notes: Double Factorials

| volume = 55

| year = 1948}} to provide an expression for the values of the gamma function at half-integer arguments and the volume of hyperspheres,{{citation|title=Some dimension problems in molecular databases|first=Paul G.|last=Mezey|year=2009|journal=Journal of Mathematical Chemistry|volume=45|issue=1|pages=1â€“6|doi=10.1007/s10910-008-9365-8}}. and to solve many counting problems in combinatorics including counting binary trees with labeled leaves and perfect matchings in complete graphs.{{citation

| last1 = Dale | first1 = M. R. T.

| last2 = Moon | first2 = J. W.

| doi = 10.1016/0378-3758(93)90035-5

| issue = 1

| journal = Journal of Statistical Planning and Inference

| mr = 1209991

| pages = 75â€“87

| title = The permuted analogues of three Catalan sets

| volume = 34

| year = 1993}}.

| doi = 10.2307/2306136

| issue = 7

| journal = The American Mathematical Monthly

| mr = 1527019

| pages = 425â€“426

| title = Classroom Notes: Double Factorials

| volume = 55

| year = 1948}} to provide an expression for the values of the gamma function at half-integer arguments and the volume of hyperspheres,{{citation|title=Some dimension problems in molecular databases|first=Paul G.|last=Mezey|year=2009|journal=Journal of Mathematical Chemistry|volume=45|issue=1|pages=1â€“6|doi=10.1007/s10910-008-9365-8}}. and to solve many counting problems in combinatorics including counting binary trees with labeled leaves and perfect matchings in complete graphs.{{citation

| last1 = Dale | first1 = M. R. T.

| last2 = Moon | first2 = J. W.

| doi = 10.1016/0378-3758(93)90035-5

| issue = 1

| journal = Journal of Statistical Planning and Inference

| mr = 1209991

| pages = 75â€“87

| title = The permuted analogues of three Catalan sets

| volume = 34

| year = 1993}}.

### Multifactorials

A common related notation is to use multiple exclamation points to denote a**multifactorial**, the product of integers in steps of two ({{math|

*n*!!}}), three ({{math|

*n*!!!}}), or more (see generalizations of the double factorial). The double factorial is the most commonly used variant, but one can similarly define the triple factorial ({{math|

*n*!!!}}) and so on. One can define the {{mvar|k}}-tuple factorial, denoted by {{math|

*n*!(

*k*)}}, recursively for positive integers as

n!^{(k)} = begin{cases}

n & text{if } 0 < n leq k nleft({(n-k)!}^{(k)}right) & text{if } n > kend{cases}.In addition, similarly to {{nowrap|0! {{=}} {{sfrac|1!|1}} {{=}} 1}}, one can define:
{n!}^{(k)} = 1 quad text{if } -k < n leq 0

For sufficiently large {{math|*n*â‰¥ 1}}, the ordinary single factorial function is expanded through the multifactorial functions as follows:

begin{align}

n! & = n!! cdot (n-1)!!,, &n &geq 1 [5px]
& = n!!! cdot (n-1)!!! cdot (n-2)!!!,, &n &geq 2 [5px]

& = prod_{i=0}^{k-1} (n-i)!^{(k)},quad text{ for } k in mathbb{Z}^{+},, &n &geq k-1,.

end{align}In the same way that {{math|& = prod_{i=0}^{k-1} (n-i)!^{(k)},quad text{ for } k in mathbb{Z}^{+},, &n &geq k-1,.

*n*!}} is not defined for negative integers, and {{math|

*n*!!}} is not defined for negative even integers, {{math|

*n*!(

*k*)}} is not defined for negative integers divisible by {{mvar|k}}.

### Primorial

The primorial {{OEIS|id=A002110}} is similar to the factorial, but with the product taken only over the prime numbers.### Superfactorial

{{redirect|N$|the currency|Namibian dollar}}Neil Sloane and Simon Plouffe defined a**superfactorial**in The Encyclopedia of Integer Sequences (Academic Press, 1995) to be the product of the first {{mvar|n}} factorials. So the superfactorial of 4 is

operatorname{sf}(4)=1! times 2! times 3! times 4!=288,.

In general
begin{align}

operatorname{sf}(n) =prod_{k=1}^n k! &=prod_{k=1}^n k^{n-k+1}
& =1^ncdot2^{n-1}cdot3^{n-2}cdots(n-1)^2cdot n^1,.

end{align} Equivalently, the superfactorial is given by the formula
operatorname{sf}(n) =prod_{0 le i < j le n} (j-i)

which is the determinant of a Vandermonde matrix.The sequence of superfactorials starts (from {{math|*n*{{=}} 0}}) as

1, 1, 2, 12, 288, {{val|34560}}, {{val|24883200}}, {{val|125411328000}},... {{OEIS|id=A000178}}

By this definition, we can define the {{mvar|k}}-superfactorial of {{mvar|n}} (denoted {{math|sf*k*(

*n*)}}) as:

operatorname{sf}_k(n) = begin{cases}

n & text{if } k=0prod_{r=1}^n operatorname{sf}_{k-1}(r) & text{if } k ge 1end{cases}The 2-superfactorials of {{mvar|n}} are
1, 1, 2, 24, {{val|6912|fmt=gaps}}, {{val|238878720}}, {{val|5944066965504000}}, {{val|745453331864786829312000000}},... {{OEIS|id=A055462}}

The 0-superfactorial of {{mvar|n}} is {{mvar|n}}.#### Pickoverâ€™s superfactorial

In his 1995 book*Keys to Infinity*, Clifford Pickover defined a different function {{math|

*n*$}} that he called the superfactorial. It is defined by

n$equiv begin{matrix} underbrace{ n!^{{n!}^{{cdot}^{{cdot}^{{cdot}^{n!}}}}}} n! mbox{ copies of } n! end{matrix}.

This sequence of superfactorials starts
begin{align}

1$&=1,,2$&=2^2=4,,3$&=6^{6^{6^{6^{6^6}}}},.end{align}(Here, as is usual for compound exponentiation, the grouping is understood to be from right to left: {{math|*abc*{{=}}

*a*(

*bc*)}}.)This operation may also be expressed as the tetration

n$={}^{n!}(n!),,

or using Knuth's up-arrow notation as
n$=(n!)uparrowuparrow(n!),.

### Hyperfactorial

Occasionally the**hyperfactorial**of

*n*is considered. It is written as {{math|

*H*(

*n*)}} and defined by

begin{align}

H(n) &=prod_{k=1}^n k^k & =1^1cdot2^2cdot3^3cdots(n-1)^{n-1}cdot n^n.end{align} For {{math|*n*{{=}} 1, 2, 3, 4,...}} the values of {{math|

*H*(

*n*)}} are 1, 4, 108, {{val|27648}},... {{OEIS|id=A002109}}.The asymptotic growth rate is

H(n) sim A n^frac{6n^2 + 6n + 1}{12} e^{-frac{n^2}{4}}

where {{mvar|A}} = 1.2824... is the Glaisherâ€“Kinkelin constant.{{MathWorld | urlname=Glaisher-KinkelinConstant | title=Glaisherâ€“Kinkelin Constant}} {{math|*H*(14)}} â‰ˆ {{val|1.8474e99}} is already almost equal to a googol, and {{math|

*H*(15)}} â‰ˆ {{val|8.0896e116}} is almost of the same magnitude as the Shannon number, the theoretical number of possible chess games. Compared to the Pickover definition of the superfactorial, the hyperfactorial grows relatively slowly.The hyperfactorial function can be generalized to complex numbers in a similar way as the factorial function. The resulting function is called the {{mvar|K}}-function.

## See also

{{div col|colwidth=30em}}- Alternating factorial
- Bhargava factorial
- Digamma function
- Exponential factorial
- Factorial number system
- Factorial prime
- Factorion
- List of factorial and binomial topics
- Pochhammer symbol, which gives the falling or rising factorial
- Subfactorial
- Trailing zeros of factorial
- Triangular number, the additive analogue of factorial

## References

{{Reflist}}### Sources

- {{Citation |last=Bostock |first=Linda |title=Further Pure Mathematics |date=2014-11-01 |publisher=Nelson Thornes |language=en |isbn=9780859501033 |last2=Chandler |first2=Suzanne |last3=Rourke |first3=C.}}
- {{citation|first1=Ronald L.|last1=Graham|first2=Donald E.|last2=Knuth|first3=Oren|last3=Patashnik|date=1988|title=Concrete Mathematics|publisher=Addison-Wesley|location=Reading, MA|isbn=0-201-14236-8}}
- {{Citation |last=Guy |first=Richard K. |title=Unsolved problems in number theory |url={{google books|plainurl=yes|id=1AP2CEGxTkgC}} |year=2004 |contribution=E24 Irrationality sequences |edition=3rd |publisher=Springer-Verlag |isbn=0-387-20860-7 |zbl=1058.11001 |author-link=Richard K. Guy}}
- {{Citation |last=Higgins |first=Peter |title=Number Story: From Counting to Cryptography |year=2008 |place=New York |publisher=Copernicus |isbn=978-1-84800-000-1}}
- {{citation|last=Stedman|first=Fabian|authorlink=Fabian Stedman|title=Campanalogia|year=1677||place=London}} The publisher is given as "W.S." who may have been William Smith, possibly acting as agent for the Society of College Youths, to which society the "Dedicatory" is addressed.

### Further reading

- {{citation |first=M. J. |last=Hadamard|chapter=Sur Lâ€™Expression Du Produit 1Â·2Â·3Â· Â· Â· Â· Â·(
*n*âˆ’1) Par Une Fonction EntiÃ¨republisher=Centre National de la Recherche Scientifiques |location=Paris (1968)

- {hide}citation|first=Srinivasa|last=Ramanujan|title=The Lost Notebook and Other Unpublished Papers

## External links

{{commons category|Factorial (function)}}- {{springer|title=Factorial|id=p/f038080}}
- {{MathWorld | urlname=Factorial | title=Factorial}}
- {{PlanetMath | urlname=Factorial | title=Factorial}}

**- content above as imported from Wikipedia**

- "

- time: 8:15am EST - Fri, Feb 22 2019

- "

__factorial__" does not exist on GetWiki (yet)- time: 8:15am EST - Fri, Feb 22 2019

[ this remote article is provided by Wikipedia ]

LATEST EDITS [ see all ]

GETWIKI 09 MAY 2016

GETWIKI 18 OCT 2015

GETWIKI 20 AUG 2014

GETWIKI 19 AUG 2014

GETWIKI 18 AUG 2014

© 2019 M.R.M. PARROTT | ALL RIGHTS RESERVED