Talk:Factorial

Moved from article
An imperative way of calculating factorial may be more understandable. In Python code:

and in C:

Moved from the article. Is this really worth mention? -- Taku 21:38, 25 April 2003 (UTC)

Computation of the factorial
Is it worth mention the basic commands for the factorial in some programming languages or math environments like matlab or maple? 9 April 2007 —Preceding unsigned comment added by 63.150.207.3 (talk • contribs) 19:38, 29 April 2007


 * No, I do not think so. In Maple, for example, you can write 5! —Preceding unsigned comment added by 82.149.175.194 (talk • contribs) 06:48, 30 June 2007

Editing the references
The page says: "Peter Luschny. The Homepage of Factorial Algorithms (no longer existent)." This is no longer true. The page does exist again. However, I was not able to eliminate the "(no longer existent)" from the text. If you can change it please remove this misleading comment. Thanks. —Preceding unsigned comment added by 82.149.175.194 (talk • contribs) 06:48, 30 June 2007

Gamma function
In the Wiki Article, that is quoted in part below the dashed line, on the binomial theorem and its extension to negative non integer, we find the Gamma Function. It uses capital Pi in two completely different ways that seems designed to confuse readers. It uses it as: (1.)  a function  Pi(z) = integral of t^Z exp(-t) dt,   and  as  (2.) a PRODUCT operator, that multiples a series of terms index by a dummy variable k.  The person who wrote this article was talking to themselves and made about 100 hidden assumptions. If he or she would share those hidden assumption, as they are made, and stop using the same symbol for multiple meaning, the article might actually help readers, instead of just confusing them.

Reading it gives one no clue of what (-1/2)! is or how to calculate it. If an illustration of the expansion of (-1/2)! were added, it would make the article 10 times easier to understand. The author blithely writes (-1/2)! and expects people to know what it means. Furthermore, the author asserts that (if the secret computation were revealed), (-1/2)! = square root of pi, with not one shred of evidence as to why. Not one reader concerned about the topic, in 10,000 will have any idea what is going on here.

The article also states Euler's original Gamma function as  capital Pi function = to a Limit, as n goes to infinity, of a ratio with  n^z n!  as the numerator. Most readers will have no clue what infinity raised to a power is, or what infinity factorial is. Most will not not know if such terms are well defined or exist. Some explanation is obviously require to make this readable.

Will some one figure out what the author was trying to say, determine if it is correct, and then rewrite it so it is correct and can be understood.

The Gamma and Pi functions Main article: Gamma function The Gamma function, as plotted here along the real axis, extends the factorial to a smooth function defined for all non-integer values. The factorial function, generalized to all complex numbers except negative integers. For example, 0! = 1! = 1, (−0.5)! = √π, (0.5)! = √π/2.

Besides nonnegative integers, the factorial function 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) is called the Gamma function, denoted Γ(z), defined for all complex numbers z except the non-positive integers, and given when the real part of z is positive by

\Gamma(z)=\int_0^\infty t^{z-1} e^{-t}\, \mathrm{d}t. \!

Its relation to the factorials is that for any natural number n

n!=\Gamma(n+1).\,

Euler's original formula for the Gamma function was

\Gamma(z)=\lim_{n\to\infty}\frac{n^zn!}{\prod_{k=0}^n (z+k)}. \!

It is worth mentioning that there is an alternative notation that was originally introduced by Gauss which is sometimes used. The Pi function, denoted Π(z) for real numbers z no less than 0, is defined by

\Pi(z)=\int_0^\infty t^{z} e^{-t}\, \mathrm{d}t\,.

In terms of the Gamma function it is

\Pi(z) = \Gamma(z+1) \,. —Preceding unsigned comment added by Jaimster (talk • contribs) 22:56, 23 October 2010

Hmmm....
The sum of the reciprocals of the sum of the first n integers (the Triangular numbers) is 2. The sum of the reciprocals of the sum of the first n Triangular numbers (the Tetrahedral numbers) is 1.5.

The sum of the reciprocals of the product of the first n integers (the Factorials) is e, so I wonder, is the sum of the reciprocals of the product of the first n Factorials (the Superfactorials), which is 1.5868056, or the sum of the reciprocals of the sum of the first n Factorials which is 1.47608642, expressible in terms of e? — Preceding unsigned comment added by Robo37 (talk • contribs) 20:01, 12 August 2011 (UTC)

Avogadro's number
I would like to propose adding Avogadro's number (NA = 6.02214076×1023) to the table of factorials. It has some practical significance in that the factorial is the number of possible arrangements of molecules in one mole of gas.--agr (talk) 16:57, 20 December 2021 (UTC)
 * Nope. I see no evidence that this is a significant enough connection to factorials to mention anywhere in the article, let alone to put in the table in the lead. I can find some sources (chemistry texts mostly) noting that the factorial of Avogadro's number is huge; they don't tend to give the value. I am trying to clean the article of cruft, not add more. —David Eppstein (talk) 17:11, 20 December 2021 (UTC)
 * I appreciate your efforts to remove cruft, bit if some textbooks mention NA! without giving a value, it seems to me that gives NA! a better claim to be in the table than most of the other rows, which offer no such provenance.--agr (talk) 20:05, 24 December 2021 (UTC)
 * Re the need for sourcing calculations, see WP:CALC. Re the notability of "googolbang" at the last line of the table, for instance, see and . —David Eppstein (talk) 20:25, 24 December 2021 (UTC)
 * I don't think we need to say anything about $$N_A!$$ specifically. It is true more generally that factorials naturally appear in formulae from quantum and statistical physics, because one considers all the possible permutations of a set of particles. There might be something worth saying about that in the article; I'll have to think about it. XOR&#39;easter (talk) 20:52, 24 December 2021 (UTC)
 * Something like that could definitely go in the applications section (probably in the paragraph about applications to fields beyond mathematics) if it can be adequately sourced. —David Eppstein (talk) 20:54, 24 December 2021 (UTC)
 * Here's a draft of a sentence we could use for the statistical side of this, but I'm not sure of the best source for it. Also because this is material I'm unfamiliar with I'm likely to have made a mistake in summarizing it or in choosing the level of detail appropriate for this topic: "In statistical mechanics, calculations of entropy such as Boltzmann's entropy formula or the Sackur–Tetrode equation must correct the count of microstates by dividing by the factorials of the numbers of each type of indistinguishable particle to avoid the Gibbs paradox." — Preceding unsigned comment added by David Eppstein (talk • contribs)
 * That sounds right, and it could be sourced to pages 107–110 of the textbook that I added. XOR&#39;easter (talk) 17:09, 25 December 2021 (UTC)

Infinitely many continuous extensions
The statement "There are infinitely many ways to extend the factorials to a continuous function." is true, but trivial and rather useless. As the cited source states, This is ridiculously easy to solve. [...] Merely take a pencil and draw some curve—any curve will do—which passes through the points. Such a curve automatically defines a function which solves the interpolation problem. This is of course true of any set of discrete points. The interesting part is that there are infinite ways to do it within certain confines, most importantly while still satisfying the recurrence relation. I therefore added the qualifier "that satisfies the recurrence relation $f(x+1)=(x+1)\cdot f(x)$ for non-integer values", which was reverted on the basis that it would exclude an interpolation based on Hadamard's gamma function. That, to me, misses the point. It also excludes interpolating the points linearly or indeed arbitrarily. I suppose it would be possible to rephrase it to make both statements at once (e.g. "There are infinitely many ways to extend the factorials to a continuous function, which remains true if the resulting function $f$ is required to satisfy the recurrence relation $f(x+1)=(x+1)\cdot f(x)$ for non-integer values."), but I don't think the bare statements that we have now is satisfactory. TompaDompa (talk) 11:36, 19 August 2023 (UTC)


 * The point is that you have to constrain things somehow to be able to say that Gamma is the canonical interpolation. Your edit adds half the constraint, turning that thought from "you have to constrain things" to "we have already constrained things but you have to constrain more things". What is so natural about that choice? Why not instead start with the other half of the Bohr–Mollerup theorem, and only consider log-convex functions? Or why not leave the constraints out of it until they are needed for uniqueness? I'm not embarrassed to say trivial things when they're relevant. Not every statement in our mathematics articles has to have deep reasoning behind it. —David Eppstein (talk) 13:02, 19 August 2023 (UTC)
 * The recurrence relation is a fundamental and defining property of factorials—it's what makes factorials factorials, so to speak. When I first heard of interpolating factorials many years ago, I took for granted that the recurrence relation would hold for the non-integer relations, because I thought that without that property it wouldn't be much of an interpolating function. The non-uniqueness of the Gamma function in this regard is, I think, very important. TompaDompa (talk) 16:07, 19 August 2023 (UTC)
 * Hadamard's Γ obeys a form of the recurrence relation. But it is a form with an extra term that happens to be zero on the positive integers. —David Eppstein (talk) 07:35, 20 August 2023 (UTC)
 * I must admit that I don't understand what you're getting at. TompaDompa (talk) 07:53, 20 August 2023 (UTC)
 * Hadamard's gamma function. When you generalize from integers to reals, it may be the case that part of a formula that vanish for integers becomes visible for reals. So although I agree that the usual Γ is usually the correct interpolation, I don't see the rationale for insisting that only functions obeying the integer version of the recurrence can be of any interest. —David Eppstein (talk) 09:15, 20 August 2023 (UTC)
 * That's not what I'm saying. What I'm saying is way closer to the Gamma function not being the "correct" interpolation—or perhaps even more to the point not the correct interpolation. Had there been infinitely many interpolations but only one satisfying the recurrence relation for non-integer values, it may very well have been the case that many interpolations are interesting for one reason or another but the only one with that property might be considered the "correct" extension to non-integer values. But that's not the case (and what I wanted to make clearer to readers). The Gamma function is the most commonly used interpolation because it has useful properties, but using it to extend the factorials to non-integer values, in general, is convention rather than correct. TompaDompa (talk) 17:20, 20 August 2023 (UTC)

Adding factoriel of 'imaginary unit'
I couldn't find anything about the factorial of the imaginary unit on this page. Adding the factorial of the imaginary unit can be quite useful. Bera678 (talk) 16:18, 21 December 2023 (UTC)


 * You probably could find a section titled "Continuous interpolation and non-integer generalization" and headed by "Main article: Gamma function". That suggests that if this material is anywhere it should be in the Gamma function article. However, I did not see anything about $$\Gamma(i+1)$$ in Gamma function. Is there any reason to think that $$i+1$$ has any special meaning as a parameter of the Gamma function, making it significant enough to report its value in that article? —David Eppstein (talk) 16:58, 21 December 2023 (UTC)

Negative number factorial solution
Is the reference ok it' s all ok even in the version in Spanish it is https://es.wikipedia.org/wiki/Factorial#Soluci%C3%B3n_n%C3%BAmero_negativo_factorial

So, why they regressed my edition? Arrobaman (talk) 22:47, 30 December 2023 (UTC)


 * The reason given for the first revert was "not an improvement, broken citation, technically not make reader understand". The reason given for the second revert was "This was recently reverted. Please do not reinsert it without first discussing it on the talk page". Another reason would be that the standard extension of the factorial to numbers other than the non-negative integers is given by the gamma function and that function diverges to infinity rather than having a finite value at all negative integers. Additionally, the link you give cannot be used as a reference (Wikipedia cannot be used as a reference for itself). —David Eppstein (talk) 22:59, 30 December 2023 (UTC)
 * That is not true the gamma function is for $(n -1)!$ and the equation that I make reference find value for $(-n)!$ and the reference is to this paper https://figshare.com/articles/journal_contribution/beta_SM_project/24901614 Arrobaman (talk) 23:06, 30 December 2023 (UTC)
 * That is also not a reliable source. And do you really think there is a difference between $$(n-1)!$$ (for $$n$$ a non-positive integer) and $$(-n)!$$ (for $$n$$ a positive integer)? They are both expressions for the factorial function at negative integers. Besides being incorrect (for the standard extension of factorial to gamma) this material appears to be original research, forbidden on both the Spanish and English Wikipedias. —David Eppstein (talk) 23:27, 30 December 2023 (UTC)


 * Yet another problem is the equation


 * $${\displaystyle {\displaystyle {\displaystyle {\frac {n+1}{n!}}=(-1)^{n}(-n)!}}}$$


 * uses $$(-n)!$$ before it is defined.—Anita5192 (talk) 23:36, 30 December 2023 (UTC)
 * I remember you and import limit of the gamma function is that he can' t represent negative factorial that' s why the limits are infinity to 0 if can resolve also negative factorials will be to infinity to -infinity.
 * And what you say of original research if you read a little bit more you can see "material—such as facts, allegations, and ideas" is some of this the paper I making reference no so it not a original research.
 * And what Anita say is just the equation you have to isolate $(-n)!$ having the solution
 * $(-n)! = \frac{n +1}{n! (-1)^n}$ Arrobaman (talk) 23:44, 30 December 2023 (UTC)
 * Can I make the modification? Arrobaman (talk) 11:59, 31 December 2023 (UTC)
 * These equations are mathematically incorrect. Please do not insert them again.—Anita5192 (talk) 13:35, 31 December 2023 (UTC)
 * Why is incorrect? Explain to me please Arrobaman (talk) 13:45, 31 December 2023 (UTC)
 * Please read the lead carefully and you will see that the factorial function and the gamma function are not defined at all for negative integers. Thus the equations you inserted make no sense at all.—Anita5192 (talk) 15:14, 31 December 2023 (UTC)
 * Do you even read the paper that I' m making reference? Look the name of the paper is Beta SM project in the introduction say the objective of the project is literally this "This project want to resolve all the problems or functions that are calculations with a difficult solution or they are limits of the basis of mathematical" so yes is solving a problem of the maths is the point of the paper.
 * Before we continue talking please read the paper that I' m making reference and please also read this Edit warring Arrobaman (talk) 15:30, 31 December 2023 (UTC)
 * Your above cites are not WP:reliable sources and cannot therefore be used here. Otherwise, I fully agree with Anita192. D.Lazard (talk) 16:14, 31 December 2023 (UTC)
 * You are right figshare isn' t a very good reference I will comment the problem that you say to the mail of the author Arrobaman (talk) 16:51, 31 December 2023 (UTC)