Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Factorial
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Product of numbers from 1 to n}} {{Use mdy dates|cs1-dates=ly|date=December 2021}} {{about|a mathematical function|the game|Factorio|other uses}} {{Good article}} {| class="wikitable" style="margin:0 0 0 1em; text-align:right; float:right;" |+ Selected factorials; values in scientific notation are rounded |- ! <math>n</math> ! <math>n!</math> |- | 0 || 1 |- | 1 || 1 |- | 2 || 2 |- | 3 || 6 |- | 4 || 24 |- | 5 || 120 |- | 6 || 720 |- | 7 || {{val|5040|fmt=gaps}} |- | 8 || {{val|40320}} |- | 9 || {{val|362880}} |- | 10 || {{val|3628800}} |- | 11 || {{val|39916800}} |- | 12 || {{val|479001600}} |- | 13 || {{val|6227020800}} |- | 14 || {{val|87178291200}} |- | 15 || {{val|1307674368000}} |- | 16 || {{val|20922789888000}} |- | 17 || {{val|355687428096000}} |- | 18 || {{val|6402373705728000}} |- | 19 || {{val|121645100408832000}} |- | 20 || {{val|2432902008176640000}} |- | 25 | style="text-align:left" | {{val|1.551121004|e=25}} |- | 50 | style="text-align:left" | {{val|3.041409320|e=64}} |- | 70 | style="text-align:left" | {{val|1.197857167|e=100}} |- | 100 | style="text-align:left" | {{val|9.332621544|e=157}} |- | 450 | style="text-align:left" | {{val|1.733368733|e=1000|fmt=gaps}} |- | {{val|1000|fmt=gaps}} | style="text-align:left" | {{val|4.023872601|e=2567|fmt=gaps}} |- | {{val|3249|fmt=gaps}} | style="text-align:left" | {{val|6.412337688|e=10000}} |- | {{val|10000|fmt=gaps}} | style="text-align:left" | {{val|2.846259681|e=35659}} |- | {{val|25206|fmt=gaps}} | style="text-align:left" | {{val|1.205703438|e=100000}} |- | {{val|100000|fmt=gaps}} | style="text-align:left" | {{val|2.824229408|e=456573}} |- | {{val|205023|fmt=gaps}} | style="text-align:left" | {{val|2.503898932|e=1000004}} |- | {{val|1000000|fmt=gaps}} | style="text-align:left" | {{val|8.263931688|e=5565708}} |- | [[googol|{{val|e=100}}]] ||10<sup>{{val|e=101.9981097754820}}</sup> |} In [[mathematics]], the '''factorial''' of a non-negative {{nowrap|[[integer]] <math>n</math>,}} denoted {{nowrap|by <math>n!</math>,}} is the [[Product (mathematics)|product]] of all positive integers less than or equal {{nowrap|to <math>n</math>.}} The factorial {{nowrap|of <math>n</math>}} also equals the product of <math>n</math> with the next smaller factorial: <math display="block"> \begin{align} n! &= n \times (n-1) \times (n-2) \times (n-3) \times \cdots \times 3 \times 2 \times 1 \\ &= n\times(n-1)!\\ \end{align}</math> For example, <math display="block">5! = 5\times 4! = 5 \times 4 \times 3 \times 2 \times 1 = 120. </math> The value of 0! is 1, according to the convention for an [[empty product]].<ref name="gkp">{{cite book|first1=Ronald L.|last1=Graham|author1-link=Ronald Graham |first2=Donald E.|last2=Knuth|author2-link=Donald Knuth|first3=Oren|last3=Patashnik|author3-link=Oren Patashnik|date=1988|title=Concrete Mathematics|publisher=Addison-Wesley|location=Reading, MA|isbn=0-201-14236-8|title-link=Concrete Mathematics|page=111}}</ref> Factorials have been discovered in several ancient cultures, notably in [[Indian mathematics]] in the canonical works of [[Jain literature]], and by Jewish mystics in the Talmudic book ''[[Sefer Yetzirah]]''. The factorial operation is encountered in many areas of mathematics, notably in [[combinatorics]], where its most basic use counts the possible distinct [[sequence]]s β the [[permutation]]s β of <math>n</math> distinct objects: there {{nowrap|are <math>n!</math>.}} In [[mathematical analysis]], factorials are used in [[power series]] for the [[exponential function]] and other functions, and they also have applications in [[algebra]], [[number theory]], [[probability theory]], and [[computer science]]. Much of the mathematics of the factorial function was developed beginning in the late 18th and early 19th centuries. [[Stirling's approximation]] provides an accurate approximation to the factorial of large numbers, showing that it grows more quickly than [[exponential growth]]. [[Legendre's formula]] describes the exponents of the prime numbers in a [[prime factorization]] of the factorials, and can be used to count the trailing zeros of the factorials. [[Daniel Bernoulli]] and [[Leonhard Euler]] [[interpolate]]d the factorial function to a continuous function of [[complex number]]s, except at the negative integers, the (offset) [[gamma function]]. Many other notable functions and number sequences are closely related to the factorials, including the [[binomial coefficient]]s, [[double factorial]]s, [[falling factorial]]s, [[primorial]]s, and [[subfactorial]]s. Implementations of the factorial function are commonly used as an example of different [[computer programming]] styles, and are included in [[scientific calculator]]s 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 algorithm]]s for numbers with the same number of digits.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)