# 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}}:

n! = n times (n-1) times (n-2) times (n-3) times cdots times 3 times 2 times 1 ,.

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 use counts the possible distinct sequences â€“ the permutations â€“ of {{mvar|n}} distinct objects: there are {{math|*n*!}}.The factorial function can also be extended to non-integer arguments while retaining its most important properties. This involves using gamma function to define {{math|1=

*x*! = Î“(

*x*+ 1)}}. However, this extension does not work when {{mvar|x}} is a negative integer.

## 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, 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):{{CquoteStedmanp=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 cdots (n-2) cdot (n-1) cdot n,

for integer {{math|*n*â‰¥ 1}}. This may be written in 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

The factorial of {{math|0}} is {{math|1}}, or in symbols, {{math|1=0! = 1}}.There are several motivations for this definition:- For {{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!}.

- It extends the recurrence relation to 0.

## 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) = frac{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 theoryBOOK, Statistical Physics of Particles, Kardar, Mehran, 2007-06-25, Cambridge University Press, 9780521873420, 35â€“56, English, Chapter 2: Probability, Mehran Kardar, and number theory (see below).
- 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 n^nand 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 5}} is a composite number if and only if
(n-1)! equiv 0 pmod n.

A stronger result is Wilson's theorem, which states that
(p-1)! equiv -1 pmod p

if and only if {{mvar|p}} is prime.{{MacTutor Biography|id=Al-Haytham|title=Abu Ali al-Hasan ibn al-Haytham}}{{MathWorld|url=WilsonsTheorem.html|title=Wilson's Theorem|access-date=2017-05-17}}Legendre's formula gives the multiplicity of the prime {{mvar|p}} occurring in the prime factorization of {{math|*n*!}} as

sum_{i=1}^infty left lfloor frac n {p^i} right rfloor

or, equivalently,
frac{n - s_p(n)}{p - 1},

where {{math|*sp*(

*n*)}} denotes the sum of the standard base-{{mvar|p}} digits of {{mvar|n}}.Adding 1 to a factorial {{math|

*n*!}} yields a number that is divisible by a prime larger than {{mvar|n}}. This fact can be used to prove Euclid's theorem that the number of primes is infinite.{{sfn|Bostock |Chandler |Rourke |2014|pages=168}} Primes of the form {{math|

*n*! Â± 1}} are called factorial primes.

## Series of reciprocals

The reciprocals of factorials produce a convergent series whose sum is the exponential base {{mvar|e}}:
sum_{n=0}^infty frac{1}{n!} = frac{1}{1} + frac{1}{1} + frac{1}{2} + frac{1}{6} + frac{1}{24} + frac{1}{120} + cdots = e,.

Although the sum of this series is an irrational number, it is possible to multiply the factorials by positive integers to produce a convergent series with a rational sum:
sum_{n=0}^infty frac 1 {(n+2)n!} = frac{1}{2}+frac{1}{3}+frac{1}{8} + frac{1}{30} + frac{1}{144} + cdots=1,.

The convergence of this series to 1 can be seen from the fact that its partial sums are less than one by an inverse factorial.Therefore, the factorials do not form an irrationality sequence.{{sfn|Guy |2004|page=[{{google books|plainurl=yes|id=1AP2CEGxTkgC|pg=PA346}} 346]}}## Factorial of non-integer values

### The gamma and pi functions

File:Factorial Interpolation.svg|thumb|320px|The gamma function interpolates the factorial function to non-integer values. The main clue is the recurrence relationrecurrence relationBesides nonnegative integers, the factorial can also be defined for non-integer values, but this requires more advanced tools from mathematical analysis.One function that fills in the values of the factorial (but with a shift of 1 in the argument), that is often used, is called the gamma function, denoted {{math|Î“(*z*)}}. It is defined for all complex numbers {{mvar|z}} except for the non-positive integers, and given when the real part of {{mvar|z}} is positive by

Gamma(z)=int_0^infty t^{z-1} e^{-t}, dt.

Its relation to the factorial is that {{math|1=*n*! = Γ(

*n*+ 1)}} for every nonnegative integer {{mvar|n}}.Euler's original formula for the gamma function was

Gamma(z)=lim_{ntoinfty}frac{n^zn!}{displaystyleprod_{k=0}^n (z+k)}.

Carl Friedrich Gauss used the notation {{math|Î (*z*)}} to denote the same function, but with argument shifted by 1, so that it agrees with the factorial for nonnegative integers. This

**pi function**is defined by

Pi(z)=int_0^infty t^z e^{-t}, dt.

The pi function and gamma function are related by the formula {{math|1=Π(*z*) = Γ(

*z*+ 1)}}. Likewise, {{math|1=Π(

*n*) =

*n*!}} for any nonnegative integer {{mvar|n}}.(File:Generalized factorial function.svg|thumb|right|upright=1.6|The factorial function, generalized to all real numbers except negative integers. For example, {{nowrap|1=0! = 1! = 1}}, {{nowrap|1=(âˆ’{{sfrac|1|2}})! = {{sqrt|{{pi}}}}}}, {{nowrap|1={{sfrac|1|2}}! = {{sfrac|{{sqrt|{{pi}}}}|2}}}}.)In addition to this, the pi function satisfies the same recurrence as factorials do, but at every complex value {{mvar|z}} where it is defined

Pi(z) = zPi(z-1),.

In fact, this is no longer a recurrence relation but a functional equation. Expressed in terms of the gamma function this functional equation takes the form
Gamma(n+1)=nGamma(n),.

The values of these functions at half-integer values is therefore determined by a single one of them; one has
Gammaleft (frac{1}{2}right )=left (-frac{1}{2}right )!=Pileft (-frac{1}{2}right ) = sqrt{pi},,

from which it follows that for {{math|*n*âˆˆ

**N**}},

begin{align}

& Gammaleft (frac{1}{2}+nright ) = left (-frac{1}{2}+nright )! = Pileft (-frac{1}{2}+nright ) [5pt]# {} & sqrt{pi} prod_{k1}^n frac{2k - 1}{2} frac{(2n)!}{4^n n!} sqrt{pi} frac{(2n-1)!}{2^{2n-1}(n-1)!} sqrt{pi},.

end{align}For example,
Gammaleft(frac{9}{2}right) = frac{7}{2}! = Pileft(frac{7}{2}right) = frac{1}{2} cdot frac{3}{2} cdot frac{5}{2} cdot frac{7}{2} sqrt{pi} = frac{8!}{4^4 4!} sqrt{pi} = frac{7!}{2^7 3!} sqrt{pi} = frac{105}{16} sqrt{pi} approx 11.631,728ldots

It also follows that for {{math|*n*âˆˆ

**N**}},

Gammaleft (frac{1}{2}-nright ) = left (-frac{1}{2}-nright )! = Pileft (-frac{1}{2}-nright ) = sqrt{pi} prod_{k=1}^n frac{2}{1 - 2k} = frac{left(-4right)^n n!}{(2n)!} sqrt{pi},.

For example,
Gammaleft(-frac{5}{2}right) = left(-frac{7}{2}right)! = Pileft(-frac{7}{2}right) = frac{2}{-1}cdotfrac{2}{-3}cdotfrac{2}{-5} sqrt{pi} = frac{left(-4right)^3 3!}{6!} sqrt{pi} = -frac{8}{15} sqrt{pi} approx -0.945,308ldots

The pi function is certainly not the only way to extend factorials to a function defined at almost all complex values, and not even the only one that is analytic wherever it is defined. Nonetheless it is usually considered the most natural way to extend the values of the factorials to a complex function. For instance, the Bohrâ€“Mollerup theorem states that the gamma function is the only function that takes the value 1 at 1, satisfies the functional equation {{math|Î“(*n*+ 1) {{=}}

*n*Î“(

*n*)}}, is meromorphic on the complex numbers, and is log-convex on the positive real axis. A similar statement holds for the pi function as well, using the {{math|Î (

*n*) {{=}}

*n*Î (

*n*âˆ’ 1)}} functional equation.However, there exist complex functions that are probably simpler in the sense of analytic function theory and which interpolate the factorial values. For example, Hadamard's 'gamma' function {{harv|Hadamard|1894}} which, unlike the gamma function, is an entire function.WEB, Peter, Luschny,weblink Hadamard versus Euler â€“ Who found the better Gamma function?, yes,weblink" title="web.archive.org/web/20090818171719weblink">weblink 2009-08-18, Euler also developed a convergent product approximation for the non-integer factorials, which can be seen to be equivalent to the formula for the gamma function above:

begin{align}

n! = Pi(n) &= prod_{k = 1}^infty left(frac{k+1}{k}right)^n!!frac{k}{n+k} &= left[ left(frac{2}{1}right)^nfrac{1}{n+1}right]left[ left(frac{3}{2}right)^nfrac{2}{n+2}right]left[ left(frac{4}{3}right)^nfrac{3}{n+3}right]cdots end{align}However, this formula does not provide a practical means of computing the pi function or the gamma function, as its rate of convergence is slow.### Applications of the gamma function

The volume of an {{mvar|n}}-dimensional hypersphere of radius {{mvar|R}} is
V_n=frac{pi^{n/2}}{Gammaleft(frac{n}{2}+1right)}R^n,.

### Factorial in the complex plane

(File:Factorial05.jpg|upright=1.8|thumb|Amplitude and phase of factorial of complex argument)Representation through the gamma function allows evaluation of factorial of complex argument. Equilines of amplitude and phase of factorial are shown in figure. Let
f=rho e^{ivarphi}=(x+iy)!=Gamma(x+iy+1) ,.

Several levels of constant modulus (amplitude) {{mvar|Ï}} and constant phase {{mvar|Ï†}} are shown. The grid covers the range {{math|âˆ’3 â‰¤ *x*â‰¤ 3}}, {{math|âˆ’2 â‰¤

*y*â‰¤ 2}}, with unit steps. The scratched line shows the level {{math|

*Ï†*{{=}} Â±Ï€}}.Thin lines show intermediate levels of constant modulus and constant phase. At the poles at every negative integer, phase and amplitude are not defined. Equilines are dense in vicinity of singularities along negative integer values of the argument.For {{math|{{abs|

*z*}} < 1}}, the Taylor expansions can be used:

z!=sum_{n=0}^infty g_n z^n,.

The first coefficients of this expansion are{| class="wikitable"! {{mvar|n}}! {{mvar|gn}}! approximationâˆ’Î³}} | -0.5772156649}} |

{{sfrac | 12}} + {{sfrac | Î³2>2}}}} | 0.9890559955}} |

âˆ’{{sfrac | Î¶(3)>3}} âˆ’ {{sfrac | 12}} âˆ’ {{sfrac | Î³3>6}}}} | -0.9074790760}} |

*Î¶*}} is the Riemann zeta function. Computer algebra systems such as SageMath can generate many terms of this expansion.

### Approximations of the factorial

For the large values of the argument, the factorial can be approximated through the integral of the digamma function, using the continued fraction representation. This approach is due to T. J. Stieltjes (1894).{{citation needed|date=November 2018}} Writing {{math|*z*! {{=}}

*e*

*P*(

*z*)}} where {{math|

*P*(

*z*)}} is

P(z) = p(z) + frac{ln 2pi}{2} - z + left(z+frac{1}{2}right)ln(z) ,,

Stieltjes gave a continued fraction for {{math|*p*(

*z*)}}:

*a*

*n*}} areWEB,weblink 5.10, Digital Library of Mathematical Functions, 2010-10-17, no,weblink" title="web.archive.org/web/20100529224939weblink">weblink 2010-05-29,

{| class="wikitable"! {{math|

| 0

| 1

| 2

| 3

| 4

| 5

| 6

There is a misconception that {{math|ln

*n*}}! {{math|*a**n*}}1|12}} |

1|30}} |

53|210}} |

195|371}} |

{{val | {{val|22737}}}} |

{{val | {{val|19733142}}}} |

{{val | {{val|48264275462}}}} |

*z*! {{=}}*P*(*z*)}} or {{math|ln Î“(*z*+ 1) {{=}}*P*(*z*)}} for any complex {{math|*z*â‰ 0}}.{{citation needed|date=February 2015}} Indeed, the relation through the logarithm is valid only for a specific range of values of {{mvar|z}} in the vicinity of the real axis, where {{math|âˆ’Ï€ < Im(Î“(*z*+ 1)) < Ï€}}. The larger the real part of the argument, the smaller the imaginary part should be. However, the inverse relation, {{math|*z*! {{=}}*e**P*(*z*)}}, is valid for the whole complex plane apart from {{math|*z*{{=}} 0}}. The convergence is poor in the vicinity of the negative part of the real axis;{{citation needed|date=February 2015}} it is difficult to have good convergence of any approximation in the vicinity of the singularities. When {{math|{{abs|Im*z*}} > 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} .

However, 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 of a nonzero value 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| jstor = 2306136

}} 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| jstor = 2306136

}} 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 > k.end{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**({{Math|n#}}) {{OEIS|id=A002110}} is similar to the factorial, but with the product taken only over the prime numbers. For example the primorial of 11 is
11#=11times7times5times3times2=2310.

In general, For the *{{mvar|n}}*th prime number*{{mvar|pn}}*
p_n# equiv prod_{k=1}^n p_k,

where *{{mvar|pk}}*is the*{{mvar|k}}*th prime number.### Superfactorial

{{See also|Large numbers}}{{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^{(6n^2 + 6n + 1)/12} e^{-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
- 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|title-link=Concrete Mathematics}}
- {{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: 1:48am EDT - Wed, Sep 18 2019

- "

__factorial__" does not exist on GetWiki (yet)- time: 1:48am EDT - Wed, Sep 18 2019

[ this remote article is provided by Wikipedia ]

LATEST EDITS [ see all ]

GETWIKI 09 JUL 2019

GETWIKI 09 MAY 2016

GETWIKI 18 OCT 2015

GETWIKI 20 AUG 2014

GETWIKI 19 AUG 2014

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