Talk:Factorial/Archive 2
This is an archive of past discussions about Factorial. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 |
Computation
I'm not comfortable with the section on computation leaving out the fact that most of the examples given use some small floating point representation for calculations, and therefore the value given for factorials will not be exact even for relatively small numbers. In some cases the returned (printed) value might not necessarily be using the maximum precision of the assumed representation. For example, google calculator reports a truncated value for 16!, even though this value can be represented exactly by an IEEE-754 64-bit variable. But regardless of the printout, most of the examples given use some underlying float representation and one must be careful. —Preceding unsigned comment added by 71.176.104.251 (talk) 02:38, 28 September 2008 (UTC)
Yeah, actually I went back, and the information is really misleading, claiming that the value returned by the calculators is indicative of the use of a 1024 bit integer. As it happens that is the maximum most likely because of an underlying IEEE-754 64-bit floating point value, not an integer, and therefore will only have 56 bits of precision. —Preceding unsigned comment added by 71.176.104.251 (talk) 02:42, 28 September 2008 (UTC)
- The law of universal gravitation developes the concept that every particle attracts every other particle. This results in the gravitational force value being a factorial of the number of particles involved. But nobody believes that. So we change to the integral of lost free energy concept, to find the energy increment value. Is that logically and mathematically correct? WFPMWFPM (talk) 16:52, 16 October 2008 (UTC)
precedence of factorial
(This is my first edit of a new topic on a talk page, I hope I did it right). Why is there no mention of precedence of the factorial. For example, (and currently of interest to me) what is -5! ?~~ —Preceding unsigned comment added by Mortgagemeister (talk • contribs) 10:56, 31 July 2009 (UTC)
- Close to right. Please put new comments at the bottom, and use four tildes (~~~~, or use the signature button just above the text window) to sign your messages. The generalization of factorials to numbers other than positive integers is given by the gamma function, but it diverges (essentially, has an infinite value) for negative integers. —David Eppstein (talk) 15:03, 31 July 2009 (UTC)
I asked why there is no mention of precedence, not about generalization of factorials to numbers other than positive. You are viewing -5! as the factorial of the number negative 5. That makes sense of course, but it also begs the question. Do you read -5! as the factorial of negative 5, or unary minus operating on 5 which has the factorial operator operating on it. That is when the issue of precedence comes up. While I (think I) agree that -5! should be read the way you do, other's read it as resulting in -120 (since they think the factorial should come first, followed by the unary minus - which looks just like the negative) Note that -5^2 is not read the way you read -5!. -5^2 is equal to -25 (the exponent operator comes first)Mortgagemeister (talk) 16:11, 31 July 2009 (UTC)
I would say that the factorial binds as tightly as exponentiation, so that -5! is -(5!), and ab! is a(b!). That's just my two cents; I don't have any references to back me up. Quantling (talk) 15:12, 12 March 2010 (UTC)
- Hmm. So what about 2^n! ? Marc van Leeuwen (talk) 17:10, 12 March 2010 (UTC)
I'd write either of these:
Both are clear. Michael Hardy (talk) 19:09, 12 March 2010 (UTC)
In a programming language one might have to deal with 2^n! without the visual aid of having some or all of it in a superscript. Both Google and Maple (version 7) say 2^3! is 64 implying that the factorial binds more tightly than the exponentiation. Quantling (talk) 13:56, 15 March 2010 (UTC)
There is two aspects to a question like this: 1) Order of operation and 2) Operator associativity. Precedence of operators may vary between interpretations/languages (e.g., Google, Maple, Python, etc...), but generally factorial is given (along with exponentiation) the highest precedence. When precedence is the same, it's only a question of associativity. Factorial (just like exponentiation) is usually "right associative". So "2^n!" would be interpreted "2^(n!)" and not "(2^n)!" (i.e., as if it were left-associative). Jwesley78
- Likewise "2^3^4" should interpreted as "2^(3^4)". To interpret it otherwise (left-associative), one would obtain what is likely to be an undesirable interpretation: "2^3^4" = "(2^3)^4" = "2^(3*4)". Jwesley78 15:59, 15 March 2010 (UTC)
The factorial operator is a unary operator, not a binary operator like exponentiation, and I don't know what right-associative means for a unary operator. For instance, if I have 3!!, should the right-associative interpretation be 3(!!), whatever that means? I'm not saying you are wrong; only that I am confused. Quantling (talk) 20:33, 15 March 2010 (UTC)
- Sorry. I 'went off on a tangent there. You have a good point. Typically, one only considers "associativity" when considering the order of evaluation for equal-precedent (k>1)-ary operations written in infix notation. Factorial is a unary operator written in the postfix position. Associativity appears to have no meaning in this context.
- For example, define fuctions "!(x)" and "^(x,y)" to be prefix expressions for the factorial and exponent operations.
- "3!^4" = "^(!(3),4)", and
- "3^4!" = "^(3,!(4))".
- In both cases the exponent operation is evaluated last.
- For example, define fuctions "!(x)" and "^(x,y)" to be prefix expressions for the factorial and exponent operations.
- (I remember this being a huge headache when I was writing the specification for a parser in a compilers class that I took. And now I'm fairly rusty in my knowledge of
formal grammarparsing.)Jwesley78 21:06, 15 March 2010 (UTC) (Updated: --Jwesley78 22:23, 15 March 2010 (UTC))- From this, it appears to me that "for all intents-and-purposes", the factorial operation has a higher precedence than exponentiation. I cannot see a situation for which exponentiation, or some other operation (excluding the use of parenthesis), would be evaluated first.Jwesley78 21:16, 15 March 2010 (UTC)
- Consider "-4!". If the precedence of "-" and "!" were the same, then an associativity rule might provide clarification as to which to evaluate first. The need for such a rule also extends to other even more ambiguous cases involving (prefix and postfix) unary operators, such as "ln -3!!". Should this be interpreted as "(ln -3)!!" or "ln -(3!!)", or something else? Jwesley78 23:31, 15 March 2010 (UTC)
I read the extension to the complex plane bit of this article, but something seems to be missing...
...what is i!? Robo37 (talk) 09:33, 6 July 2011 (UTC)
- Ah, I got it, it's 0.498015668 - 0.154949828i. Should this be inserted into this article do you think?
Notation for Factorial
In the thirteenth edition of the "Handbook of Chemistry and Physics", Copywrite 1914,... (USA), published by the "Chemical Rubber Publishing Co.", Authors Hodgman, C. D. and Lange, N. A. use the following notation for factorial:
|n, where |n = n!
Possible reasons for this are that:
(i) Recalling that the factorial is related to the Gamma function, the notation used looks like the capital Greek letter, gamma (Γ), flipped about a horizontal line.
(ii) the used notation looks like the line(s) used for short/long divison.
(iii) it may have something to with Blaise Pascal's version of the well known triangle (to the right) that is of the right angled variety and thus forms L shapes.
Reasons aside, I thought that others might be interested in this notation. Mhallwiki (talk) 19:26, 9 August 2011 (UTC)
- All three reasons proposed seem highly implausible to me; lacking any sources they would certainly be WP:OR. Also, unless any more recent uses can be found, it would seem like an attempt to introduce (yet) another notation for n!, which after almost a century can be safely considered to have failed. So I don't see much reason to mention it in the article (or maybe just briefly in the history section). Marc van Leeuwen (talk) 11:12, 10 August 2011 (UTC)
philosophically
Besides the permutations of rearranging a given number: factorials may also be considered philosophically pertinent if all numbers are considered things-in-themselves. Wilst requiring all constituent numbers as an infrastructure upon which the following integer can be extant and therefore subsequently enumerated. Nagelfar (talk) 06:12, 12 September 2011 (UTC)
- Thanks, now I can sleep properly tonight. McKay (talk) 07:34, 12 September 2011 (UTC)
Last table entry
Why has the table at the beginning an entry for n = 1.7976931349×10308? Does this number enjoy some particular interesting non-obvious property? --Lambiam 19:30, 23 December 2011 (UTC)
To answer my own question: it appears to be (within the given precision) equal to 2210. But is that sufficiently interesting to list this here? And isn't that rather pointless without further explanation? --Lambiam 19:44, 23 December 2011 (UTC)
- It was once linked. I agree the current form doesn't make much sense after the link was removed in [1]. PrimeHunter (talk) 23:06, 23 December 2011 (UTC)
- So it is the maximum value representable in the IEEE floating-point standard's double-precision floating-point format. From a mathematical point of view, that number has no special significance. From a numeric-computational point of view: (A) Why stop with double precision? Why not quadruple precision? (B) It seems more relevant what the largest n is such that n! does not exceed the maximally representable value. If I did not make a mistake, the representability limits are reached with 170! for double precision and 1754! for quadruple precision, which underscores how fast the factorial grows. But the reference to IEEE floating-point formats seems unnecessarily abstruse for this article on such an elementary integer-valued function, and my preference is to avoid referring to floating-point formats and to delete this table entry. --Lambiam 00:18, 24 December 2011 (UTC)
- The table already shows 170! and 171! for this reason, mentioned in Factorial#Computation. But I wouldn't object to removing all table entries caused by IEEE limits. PrimeHunter (talk) 04:54, 24 December 2011 (UTC)
- So it is the maximum value representable in the IEEE floating-point standard's double-precision floating-point format. From a mathematical point of view, that number has no special significance. From a numeric-computational point of view: (A) Why stop with double precision? Why not quadruple precision? (B) It seems more relevant what the largest n is such that n! does not exceed the maximally representable value. If I did not make a mistake, the representability limits are reached with 170! for double precision and 1754! for quadruple precision, which underscores how fast the factorial grows. But the reference to IEEE floating-point formats seems unnecessarily abstruse for this article on such an elementary integer-valued function, and my preference is to avoid referring to floating-point formats and to delete this table entry. --Lambiam 00:18, 24 December 2011 (UTC)
Sample code?
Do we really need a code example? The current implementation is overly clumsy and does not even compile. But as noted at the start of the section, it's trivial to write, so instead of fixing it, I'd propose to remove it altogether. Any objections? --Clickingban (talk) 08:16, 26 June 2012 (UTC)
- Agreed. The only point of showing such code would be to show how utterly trivial it is to compute factorials without recursion, thereby implicitly showing how silly it is to systematically use factorials as (first) examples of recursive functions. Marc van Leeuwen (talk) 11:13, 26 June 2012 (UTC)
- Agree completely. -- Elphion (talk) 15:02, 26 June 2012 (UTC)
- The current implementation also has the disadvantage that it is unnecessarily inefficient: it would be faster to precompute a lookup table for the first 20 factorials (anything larger overflows). To me, the sample code says more about the limitations of C++ than about computing factorials. I don't mind having sample code in some articles (as long as it doesn't start looking like a code farm instead of an article) and in particular I think pseudocode can often be helpful in pointing out some non-obvious implementation tricks (like the one mentioned above about multiplying bignums out of order). But there's nothing non-obvious in the present example, it needs even more cruft to be adequately engineered (it should not just overflow silently), and I think C++ was a bad choice (pseudocode or something closer to pseudocode like Python would have been better), so I agree that we're better off without it. —David Eppstein (talk) 16:55, 26 June 2012 (UTC)
- It added nothing and is gone. McKay (talk) 07:48, 27 June 2012 (UTC)
table at the introduction of the sample values far too wide to the right margin
Need a wiki-table expert to correct this -- it "glues" at the right browser-visible margin with its data in the right most column. :-( About 1/2 half inch free space needed (as else in the whole article). — Preceding unsigned comment added by 2001:638:504:C00E:214:22FF:FE49:D786 (talk) 14:49, 19 September 2012 (UTC)
Articles to Factorial and Gamma function
These two articles overlap very much -- FAR too much, IMHO. Especially I wonder why the picture "File:Factorial05.jpg" is shown here, but not in the article Gamma function -- the truth is: this fact triggered my comment here. This "politic" is really for head-shaking.
I think either these two articles should be joined, or clearly separated for (integer argument and real/complex) consideration. Now it looks like there is an ongoing fighting of two author groups in wikipedia which can present the same topic better. Maybe this is indeed the case? Too many amateurs are proud to show their basic mathematical knowledge and especially press their oppinion how to present this. :-( Regards. — Preceding unsigned comment added by 2001:638:504:C00E:214:22FF:FE49:D786 (talk) 11:01, 21 September 2012 (UTC)
Two integral formulas for the Factorial function
— 79.113.241.192 (talk) 03:04, 7 March 2013 (UTC)
Why is this?
It says at http://www.wolframalpha.com/input/?i=%28-1%29%5Ex that the series expansion of (-1)^x at x=0 is
... notice a bit of Factorialness in the demoninators there. Why is this? — Preceding unsigned comment added by Robo37 (talk • contribs)
- You would be much better off asking such questions at the Mathematics Reference Desk, where people who answer such questions hang out. This talk page is for discussions related to improving this article only.--JohnBlackburnewordsdeeds 01:32, 19 August 2011 (UTC)
- The answer is actually in the article. Factorial#Applications says:
- "Factorials also turn up in calculus; for example they occur in the denominators of the terms of Taylor's formula, basically to compensate for the fact that the n-th derivative of xn is n!."
- The first derivative of xn is n×xn-1. It follows from induction that he nth derivative of xn is n!. So if we start with xn/n! then the nth derivative becomes 1. PrimeHunter (talk) 02:00, 19 August 2011 (UTC)
- -1 = ei pi and ex = Sum(xn/n!), ergo -1x = ei pi x = Sum[(i pi x)n/n!] — 79.113.230.39 (talk) 00:14, 9 March 2013 (UTC)
Derivative Definition
How about we add the definition (d/dx)^n x^n = n! ? Okidan (talk) 11:38, 15 March 2013 (UTC)
- It's already mentioned under Applications.--JohnBlackburnewordsdeeds 14:11, 15 March 2013 (UTC)
- Do you think it warrants a mention in the definition section? Okidan (talk) 00:27, 17 March 2013 (UTC)
- It seems an odd way to define the factorial. Have you seen reliable sources do that? PrimeHunter (talk) 00:49, 17 March 2013 (UTC)
- I found it on the MIT Open Courseware Notes - it's near the bottom on the third page. Adding external link:
Okidan (talk) 00:03, 18 March 2013 (UTC)
- Huh? It says 'The notation n! is called "n factorial" and defined by n!=n·(n−1)·2·1.' They then prove the property (d/dx)^n x^n = n! I don't see why that should make the property belong in the definition section. PrimeHunter (talk) 18:34, 18 March 2013 (UTC)
Factorial root?
What is x when x! = n? Robo37 (talk) 09:58, 14 July 2011 (UTC)
- Are you asking whether there is a name or whether there is a notation (or both)? I would say that, as with nearly any function, it is fair to speak of an inverse. So, "the factorial inverse of is ." As for notation, if you like working with , you could write . I don't know that I've seen it written with an exclamation point. —Quantling (talk | contribs) 14:05, 14 July 2011 (UTC)
- Thanks. I'm more looking for some kind of closed equation that would calculate an integar when a factoral number is entered? Robo37 (talk) 18:07, 15 July 2011 (UTC)
- For small integers, just use an array. This would be an excellent application of a binary search. Think of the "lower/higher" guessing game. You could even use the logarithmic operator and one of the approximations listed in the article (invert the exponent into a ln function) to get an estimate on where to start your search in the array. However, the array would obviously only have a very small number of values to search through so it's probably not worth it. To fill the array is an exercise I'll leave to readers. ;) An alternative (obviously poor, IMO) is to use a select...case structure.
- See these: http://en.wikipedia.org/wiki/Stirling%27s_approximation http://mathforum.org/kb/thread.jspa?messageID=342551 75.70.89.124 (talk) 07:27, 31 July 2013 (UTC)
- Thanks. I'm more looking for some kind of closed equation that would calculate an integar when a factoral number is entered? Robo37 (talk) 18:07, 15 July 2011 (UTC)
Jargon; plus N, n and n!
Ok - so wikipedia is supposed to be readable as if general interest to the reasonably intelligent person without foreknowledge. I am sure this article is very readable to mathemticians, but I came here on a circuitous path trying to pin down the different uses of n for https://en.wiktionary.org/wiki/n. The WP article and the disambiguation page seems in some ways most helpful, although as the specialist pages please go a littlebit more slowly given the confusion and explain (gently, slowly, thoroughly) notational use/variations of n as a necessary introduction for your your general readership, please. Kathybramley (talk) 12:13, 18 November 2013 (UTC)
- I'm very confused by your comment -- this article (which is about the factorial function, denoted "!") uses "n" only in the completely standard way that it is a variable on a certain domain (nonnegative integers, mostly). So, I don't see the relationship with your search, nor can I make sense of most of your other comments (the comments about jargon are vague; the comments about other pages, also). Can you clarify? --JBL (talk) 13:44, 18 November 2013 (UTC)
- I see it is indeed listed at N (disambiguation) but that is debatable. It's really a meaning of "!" and not of "n". n is just a variable name. n is the most commonly used variable name for factorials but also for natural numbers in general (competing with x in some environments but mathematicians use x more for reals than integers). We could also have written x!, a! and so on. For a dictionary it's much better suited for wikt:! and is already there. It's also at our own article about ! (a redirect to Exclamation mark) as well as ! (disambiguation). I don't edit Wiktionary and don't know their practices but I wouldn't expect to see n! or other mathematical expressions like -n, n2, and so on at wiktionary:n, but there might be a mention that n is a common variable name for a natural number. A capital N (or sometimes if you're fancy) denotes the set of natural numbers. PrimeHunter (talk) 15:52, 18 November 2013 (UTC)
- Oy, that's terrible -- I've removed the link to this page from the disambiguation page for N. --JBL (talk) 17:22, 18 November 2013 (UTC)
Navbox
Why is the Navbox for series and sequences attached to this article? While you can make an integer sequence out of factorials, a factorial is certainly not an integer sequence. If a reader is on this page and is looking for other related integer sequences, that reader is so fundamentally lost that no Navbox is going to be of any help. I suggest that this one be tossed. Bill Cherowitzo (talk) 05:07, 7 December 2014 (UTC)
Categories
In response to this reversion of my edit, I've updated Category:Factorial and binomial topics to explicitly list the main articles for the category.
I'm happy to accept that Category:Factorial and binomial topics is correct for the Factorial article, but I suspect that Category:Gamma and related functions is not a "valid" category, and/or is not correctly positioned in the category hierarchy and/or the Factorial article ought not be in it. Are all Gamma and related functions a subset of Factorial and binomial topics, as the current hierarchy implies? (See WP:SUBCAT Possibly the Factorial article ought not be in Category:Gamma and related functions. Possibly Category:Gamma and related functions should simply be "Gamma functions", with {{Related category}} hatnotes to the "related functions" categories. Mitch Ames (talk) 05:42, 7 December 2014 (UTC)
- Category:Factorial and binomial topics primarily concerns combinatorics and number theory (things about integers, if you prefer). Category:Gamma and related functions primarily concerns certain continuous functions on the real and complex numbers. The factorial function is defined only for integers, and so it primarily belongs in Category:Factorial and binomial topics. However, it is very very closely related to the Gamma function, the main topic of Category:Gamma and related functions, so close that for many purposes they are interchangeable. (The Gamma function extends the factorial function to the complex numbers after shifting its argument by one.) So my feeling is that these two categories should probably *not* be related as parent and child, but should instead have see-also links to each other, and that the Factorial article should remain in both of them. One or two other articles, but far from most of them, could also be in both categories; Stirling's approximation is an example. The fact that most articles from one of these categories would be a bad fit for the other category lends support I think to removing the parent-child relation from them. (Also, I'm a bit confused by another recent category edit by User:Wcherowi removing this from the integer sequence category, since the sequence of factorial numbers given in the table at the top right of the article is one of the most important integer sequences. And his addition of Category:Combinatorics is also wrong for the reason you gave for your edit: it's a parent category of an already-listed category.) —David Eppstein (talk) 05:59, 7 December 2014 (UTC)
- So maybe my thinking about this isn't absolutely correct, but this is why I made the change. I agree that the factorial sequence (as displayed on this page) is an important integer sequence and belongs in that category, however, this page is about factorials and not the factorial sequence. It just didn't feel right to have this page in the integer sequence category, so if you move it out of there it goes into the parent category of combinatorics (at least as a rough cut, perhaps there is a better subcategory of combinatorics to put it in). Am I being unreasonable about this? Bill Cherowitzo (talk) 06:52, 7 December 2014 (UTC)
Multifactorial
The recursive definition of the multifactorial in this article differs from that given in the article "Fakultät" in the german Wikipedia (for example, 2!!! is defined here as = 1, whereas on the german site is defined 2!!! = 2). Which definition is now the right one? I remember, on the german site the definition has previously been the same as here, but has then been changed with the purpose to correct it. Should the definition here be adapted to the one on the german site, or has the correction been wrong? --79.243.235.186 (talk) 21:53, 1 July 2013 (UTC)
- I don't know what meaning the multifactorials exactly have, but I think the following definition is more consistent than the one in our article:
- n!(k) = { 1 , for (1-k) ≤ n < 1 ; n*(n-k)!(k) , for n ≥ 1 .
- Although written differently, this definition should have the same results than the one on the German Wikipedia site, except the expansion onto negative integers > -k. With that definition, 2!!! would be = 2. --79.243.224.89 (talk) 17:26, 27 July 2013 (UTC)
- According to http://mathworld.wolfram.com/Multifactorial.html the definition above gives the correct values for n!(k), unlike the one in the article (2!!! = 2 etc). The only problem is that the definition above already extends to negative integers, so it's no definition for non-negative integers, as it should be. At first a definition of n!(k) for 0,1,2,... should be given, then one can argue that the definition is extendible to certain negative integers, similarly to the double factorial. The definition in the German wikipedia article
n!(k) = { 1 for n = 0 { n for n = 1, ..., k { n*(n-k)!(k) for n > k
- apparently is the best one. But unfortunately I haven't been succesful in changing the formula without killing the format... --79.243.243.97 (talk) 23:52, 19 February 2015 (UTC)
- I have corrected the definiton.[2] The wrong definition was added in 2004.[3] It was right before that. PrimeHunter (talk) 03:34, 20 February 2015 (UTC)
i! and gamma function
Hi I was wondering what is and how to calculate it. Wolfram Alpha gives
(http://www.wolframalpha.com/input/?i=i%21)
however I wanted to show this analytically, if possible. All I could get was:
How can I get from here to the numerical value of i! that's given by Wolfram Alpha?!?
(Just curious:P) — Preceding unsigned comment added by 142.160.100.195 (talk) 21:48, 17 January 2016 (UTC)
- This is not an appropriate venue for this question; try the reference desk instead. --JBL (talk) 22:29, 17 January 2016 (UTC)
(In-)Correction of Factorial value (googol)
The value @50.86.48.180: changed this to was 10 000 000 000157.970003654. 109.956570552×10101 was the previous value. Note that n! > n^(n/2) for large n. Hence we have googol^(googol/2) = 10^(50*googol) vs (10^10)^158 = 10^1580. These aren't even close. ∰Bellezzasolo✡ Discuss 00:43, 18 January 2018 (UTC)
Alternating Product
Does anyone know if there's a name for the function defined by:
- ?
It is essentially the factorial, but it alternates from multiplication to division. -- He Who Is[ Talk ] 18:35, 21 July 2006 (UTC)
- So thats
- for n odd
- for n even
- Just looking at n even, say s=n/2. Then using some identities for the double factorial which relate it to the Gamma function we get
- which, if you write as gives a Beta function:
- I think you can do something similar for n odd. PAR 16:43, 20 October 2006 (UTC)
≤ —Preceding unsigned comment added by 41.242.188.116 (talk) 14:29, 18 March 2009 (UTC)
Rational combination, Rational permutation. Should be in that article, not factorial. Victor Kosko (talk) 23:32, 18 August 2018 (UTC)
Superfactorials
Superfactorials get large very rapidly. Between what two consecutive superfactorials does Graham's number lie?? 1$ = 1 and 2$ = 4, but even 3$ is too big to write; it is 6^6^6^6^6^6. 66.32.244.149 21:43, 2 Nov 2004 (UTC)
- In the Superfactorials (alternative definition) and above it isn't perfectly clear whether
- represents
- or
- —DIV (128.250.80.15 (talk) 04:49, 21 August 2008 (UTC))
What is the reference to "superduperfactorials"? Can some please remove this if it is not legitimate. —Preceding unsigned comment added by 65.103.203.33 (talk) 03:35, 23 November 2009 (UTC)
Notationally one always prefers the larger number since the smaller number can be produced by a simpler formulation.
Victor Kosko (talk) 01:07, 21 August 2018 (UTC)
Positive versus nonnegative
About the last few edits. The following statements are all true:
- the factorial of a positive integer n is the product of all positive integers less than or equal to n.
- 0! = 1
- the factorial of a nonnegative integer is the product of all positive integers less than or equal to n (with the understanding that the case of 0! is an empty product and so is 1)
Of these statements, the first two together provide a definition of n! for all nonnegative integers n. The last also provides such a definition. However, the first two together are easier to understand for most people than the last. Also, they are more in keeping with the recursive definition, which requires the initial value 0! to be determined a priori, and which is the usual definition a person would first encounter when studying the factorial. Modern mathematicians like a certain kind of terseness and cleverness in our definitions, excluding redundant cases -- but articles about objects that can be understood by middle school students should not have their first sentence aimed at the aesthetic preferences of people with PhDs. --JBL (talk) 17:42, 10 December 2018 (UTC)
- There are two issues with the current status (i.e. the first two items together):
- When reading the first sentence, one has the impression that the factorial is defined only on the positive integers (i.e. not including 0). This would need to be rephrased.
- The 0! is presented as a particular case, while it is not. The fact that it is part of the general case is very important for the recursive formula, which remains the same when going from 0! to 1!.
- And no, "they are more in keeping with the recursive definition" is wrong: if you modify the chosen value for 0!, you would also need to modify the "the factorial of a positive integer n is the product of all positive integers less than or equal to n". Precisely, if you want a definition similar to the recursive one, you would need to say: "the factorial of a positive integer n is 0! multiplied by the product of all positive integers less than or equal to n". Vincent Lefèvre (talk) 17:58, 10 December 2018 (UTC)
- I much prefer the version reinstated by Vincent Lefèvre: it is true, concise, and not confusing. If the user starts to wonder why the definition covers n=0, the sentence immediately following the definition explains why. The point is more than that 0! can be defined to make the definition consistent; it is the natural definition that follows the pattern of the product of a set of positive integers. -- Elphion (talk) 18:49, 10 December 2018 (UTC)
- @Vincent Lefèvre: I cannot disagree more strongly about the recursive formula (but maybe we are just misunderstanding each other). Here is how the recursive definition works: 0! is defined specially, according to one rule (namely, the rule 0! = 1). Every other factorial is defined recursively, according to a different rule (namely, the rule n! = n * (n - 1)!). Specially calling out the initial value(s) is at the essence of any recursive definition, and so specially calling out 0! here is much more in keeping with the recursive definition than making a uniform definition.
- @Elphion: You say that it is not confusing only because you have completely absorbed the (correct; and elegant; but not intuitive at all) notion of an empty product. But almost no secondary students (say) have been introduced to this idea, and for them the idea of "the product of all the positive integers less than 0" just reads as nonsense or absurdity. As I said in my original post, this notion of "natural" is what is natural for people who have been exposed to a significant amount of higher education in mathematics -- it is definitely not natural for that part of the audience of this article that does not hold a PhD in mathematics.
- Finally, I cannot help but notice that one of you objects to the positive version on the grounds that one might have to read to the third sentence to completely understand, whereas the other of you defends the nonnegative version on the ground that no misunderstanding is possible because one only needs to read to the third sentence to understand :-/. --JBL (talk) 22:04, 10 December 2018 (UTC)
- Addendum: I hold a PhD in mathematics and a faculty position at a research university. When I talk to my peers, and to my graduate students, and when I teach classes to upper-level mathematics majors, I happily embrace the uniform, nonnegative version. It is concise, and clever, and natural. However, even among (say) science and engineering undergraduates taking classes like multivariable calculus or linear algebra, this notion of an empty product is new, odd, and requires getting used to. The audience for this article is not professors in mathematics, or graduate students in mathematics, or even undergraduate majors in mathematics -- it is everyone who might want to learn something about the factorial, which includes some number of people who have only primary school level mathematics. It would be a real disservice to the world to write the first sentence of this article for a more advanced audience than necessary out of a misguided adherence to the norms of modern research mathematics. --JBL (talk) 22:10, 10 December 2018 (UTC)
- The point is that all the values of the factorial are linked to each other with the recurrence relation. For instance, 1! = 1 × 0! (directly from the recurrence relation). If you just say "the factorial of a positive integer n is the product of all positive integers less than or equal to n", the relation with 0! does not appear. I repeat, it is very important to link 0! to the other values, otherwise people cannot understand why 0! is defined as 1; for instance, people may wonder why 0! isn't defined as 0 (or why it is defined at all). About 0!, with your change, the article only says "The value of 0! is 1, according to the convention for an empty product." but it is not explained where the empty product comes from. The expected answer is that "the product of all positive integers less than or equal to n" is applied to n = 0 as well, which gives the empty product. Hence the better definition: "the factorial of a nonnegative integer n is the product of all positive integers less than or equal to n."
- Moreover, there is no need to have a PhD to understand the meaning of the empty product. In any case, this is needed to properly define 0!, just as it is needed to define xn where n is a nonnegative integer (which is taught in primary school) and to understand why x0 is 1 (for nonzero x to avoid any ambiguity). And as usual, people who do not know the empty product should follow the link (that's an important notion). Vincent Lefèvre (talk) 23:23, 10 December 2018 (UTC)
- I much prefer the version reinstated by Vincent Lefèvre: it is true, concise, and not confusing. If the user starts to wonder why the definition covers n=0, the sentence immediately following the definition explains why. The point is more than that 0! can be defined to make the definition consistent; it is the natural definition that follows the pattern of the product of a set of positive integers. -- Elphion (talk) 18:49, 10 December 2018 (UTC)
- Maybe we are confusing two different definitions?
- The non-recursive definition that n! is the product of positive integers up to n works directly for zero, but requires some mathematical sophistication to understand in this case.
- The recursive definition that it's n times the factorial of n – 1 does not work at all for zero. (It would give something times zero, rather than the desired result of one.) So with this definition, zero needs to be set aside as a base case.
- Instead somehow we are trying to use the non-recursive definition, but with a base case. Non-recursive definitions don't need base cases. I think the non-recursive definition is the more familiar one, so that's the one we lead with, but with that definition we need to explain that 0!=1 is a consequence of the definition, rather than declaring that it's a separate case. Somewhere later in the article we should also give the recursive definition, explain that 0 is a base case rather than a consequence of the general formula for this definition, and also explain that the two definitions produce the same results. —David Eppstein (talk) 00:46, 11 December 2018 (UTC)
- I agree to there being these two elementary accessible ways for factorials, and I also see the iterative one as the more transparent, by far, especially compared to the recursive one. Hiding a "beautiful" closed verbal definition because the "empty product" is addressed, and requiring to have a disjoint starting condition might be considered as an inappropriate patronizing of readers without PhDs, being perhaps undergraduate, or at an elementary level, in insinuating they were incapable of digesting "the empty product being 1." Transporting esthetics in math, as should be done in an encyclopedia, requires showing it.
- FYI, I formulated an approach along these lines, already with nowraps and ready for improvement, but it was reverted. Purgy (talk) 17:02, 11 December 2018 (UTC)
- Yes, I like this much better, as this shows that 0! is just a particular case of the general definition. I just think that it could be rephrased to something like: "For n = 0, this definition yields an empty product, hence 0! = 1." and I would put the example in a separate paragraph. Vincent Lefèvre (talk) 18:11, 11 December 2018 (UTC)
I admit to having trouble following how much of this discussion relates to the question at hand. No one has proposed replacing the definition currently in the lead section with the recursive definition. The question is whether the first sentence should say that the factorial of a positive integer n is the product of the first n positive integers, or that the factorial of a nonnegative integer n is the product of the first n positive integers. Both statements are correct. But the second one (with "nonnegative") is much less accessible: the concept of an empty product is a more advanced concept than the concept of a nonempty product. The first sentence of this article could potentially be understandable by, say, any American middle school student -- but if we insist on including the case 0!, it will not be. And that sin is much worse than the sin of not giving the aesthetically pleasing definition that one would give to an audience at the advanced undergraduate level or above, particularly when that audience can be satisfied with the link empty product much more easily than a less sophisticated reader can be. Incidentally (or not?), the positive-first approach also more closely parallels the actual body text of the article. --JBL (talk) 01:50, 13 December 2018 (UTC)
- Sorry to have come late to this discussion, it couldn't be avoided. I agree with Joel and think that mentioning an empty product in the first paragraph is a very bad idea. None of the combinatorics texts that I have present it in this way, while many of them assume that readers have seen the definition in lower level courses, where they certainly wouldn't have seen this. Later in the article, where it is possible to spend some time with the concepts, it makes sense to include the essence of the above arguments and point out how in one approach it is a definition while in the other it follows naturally from advanced ideas. We should not be making a choice of which approach to take in the lead of this article. --Bill Cherowitzo (talk) 05:09, 13 December 2018 (UTC)
Subfactorial
I believe that this can be inserted to article:
Number of derangements of n elements is:
where !n, known as the subfactorial, with the starting values !0 = 1 and !1 = 0.
Starting with n = 0, the numbers of derangements of n are:
- 1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, ... (sequence A000166 in the OEIS).
AndrejJ (talk) 19:17, 1 August 2019 (UTC)
- @Andrejj: It's not really helpful to just repeat that you want to add this material unless you also say why you think it belongs. I'll say, however, that the rest of the section contains items that involve some closely related process to taking the factorial, such as the double factorial, which involves taking products of every other number up to a certain value, or the primorial, which involves taking the products of all the primes up to a given value. Derangements on the other hand don't fit into this sort of scheme. –Deacon Vorbis (carbon • videos) 19:31, 1 August 2019 (UTC)
- It is closely related in name and applications (counting a special class of permutations rather than all permutations). But if you interpret the section as being about closely related functions defined by a similar product formula, I think it also qualifies, given its calculation as rounding n!/e to the nearest integer. —David Eppstein (talk) 20:29, 1 August 2019 (UTC)
- I agree with David Eppstein that a section about the subfactorial seems appropriate, if not with exactly the information in the first draft added by Andrejj. —JBL (talk) 20:46, 1 August 2019 (UTC)
- The topic is pertinent, but the text above is too fragmentary and would need prose expansion and smoothing. XOR'easter (talk) 15:09, 2 August 2019 (UTC)
Rate of growth
We need to add info about n^n, also double exponenential func. like 2^0.5^n which is VALID exp. func. are slower, also any sum of multiplication of exponent and polynomial functions grow slower. The same in russian wiki: "Факториал является чрезвычайно быстро растущей функцией. Он растёт быстрее, чем любая показательная функция или любая степенная функция, а также быстрее, чем любая сумма произведений этих функций. Однако, степенно-показательная функция n^n растёт быстрее факториала, так же как и большинство двойных степенных, например e^e^n."ZBalling (talk) 22:14, 17 August 2019 (UTC)
- Most people here don't speak Russian, so I'm not sure how helpful that text is. Anyway, to clarify, we could always change to something like: ... , but slower than double exponential functions (those of the form for ) in n. The bit about sums and products is probably overkill. For example, any product of a polynomial and an exponential grows slower than some other exponential anyway. And then you'd have to be careful about specifying a finite number of operations, etc etc. –Deacon Vorbis (carbon • videos) 22:57, 17 August 2019 (UTC)
- At least you support n^n. Sigh. Do you understand that () in double exp. func. are from right to left? I hope so... I support that bit about a, b > 1. Though finite number of operations... Yeah, that IS pedantic)) But OK. Anyway it is normal to find limit (n->+inf) 7^n*n^4/n! = 0. I suppose you should edit it yourself though. ZBalling (talk) 23:47, 17 August 2019 (UTC)
- (Invited from WT:MATH.) The article double exponential function specifies a, b > 1. — Arthur Rubin (talk) 11:01, 18 August 2019 (UTC)
- If you think you (or somebody you asked) can edit article and then use it against me in disscussion, you are very mistaken. And you only show your derange by adding obviously wrong info in the article. ZBalling (talk) 23:08, 19 August 2019 (UTC)
- Please don't attack or insult other editors -- it is really not helpful at all. (It is also against Wikipedia policies: WP:NPA.)
- Substantively, I agree with everyone else about the meaning of the phrase "doubly exponential growth" (equivalently "doubly exponential function" in the context of growth rates at infinity, and equivalently "double" in place of "doubly"): it refers only to the case where both numbers are larger than 1. This is true even though there are other functions that can be formed by iterating the exponential. --JBL (talk) 00:15, 20 August 2019 (UTC)
- If you think you (or somebody you asked) can edit article and then use it against me in disscussion, you are very mistaken. And you only show your derange by adding obviously wrong info in the article. ZBalling (talk) 23:08, 19 August 2019 (UTC)
- (Invited from WT:MATH.) The article double exponential function specifies a, b > 1. — Arthur Rubin (talk) 11:01, 18 August 2019 (UTC)
- At least you support n^n. Sigh. Do you understand that () in double exp. func. are from right to left? I hope so... I support that bit about a, b > 1. Though finite number of operations... Yeah, that IS pedantic)) But OK. Anyway it is normal to find limit (n->+inf) 7^n*n^4/n! = 0. I suppose you should edit it yourself though. ZBalling (talk) 23:47, 17 August 2019 (UTC)