Talk:Factorial

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
WikiProject Mathematics (Rated B-class, Mid-priority)
WikiProject iconThis article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
B-Class article B  This article has been rated as B-Class on the project's quality scale.
 Mid  This article has been rated as Mid-priority on the project's priority scale.
 

Moved from article[edit]

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

def fact(x):      result = 1      while x > 1:          result *= x   # multiply result by x          x -= 1        # decrease x by 1      return result  

and in C:

// function factorial  int fac(int fc)     {     int i, ret = 1;     for (i = 1; i<=fc; i++)        {        ret*= i;        }     return (ret);     }  

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

Computation of the factorial[edit]

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 (talkcontribs) 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 (talkcontribs) 06:48, 30 June 2007

Editing the references[edit]

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 (talkcontribs) 06:48, 30 June 2007

Gamma function[edit]

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 (talkcontribs) 22:56, 23 October 2010

Hmmm....[edit]

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?

old notation[edit]

The history section should mention the old notation consisting of a line to the left and below, see here for examples. This was quite common well into the first half of the 20th century; I have some old books that use it. I'm not sure how to write it though (except as an image). Probably nPn should be mentioned too. McKay (talk) 05:32, 4 October 2019 (UTC)[]

This notation is still commonly used in India. So I added it, but it got undone. MaharajaAD (talk) 06:19, 24 June 2021 (UTC)[]

quote vs cquote[edit]

Alright, let's waste some time, I guess. =/

An editor (User:DESiegel) changed the format of a a quotation, changing an invocation of {{cquote}} to the more plain {{quote}}, that is, changing


to

Now the nature of these methods is such, that the changes on one number comprehends [includes] the changes on all lesser numbers ... insomuch that a compleat Peal of changes on one number seemeth to be formed by uniting of the compleat Peals on all lesser numbers into one entire bodyy.[reference]

That's his perfect right per WP:BOLD, so no problem. I changed it back, with a an edit summary of

Restore format per WP:BRD, take it to talk and (or, better, MOS talk) and get consensus for change, absent that it's just pointless roiling of format, just as good before as after.

However, another editor -- User:Deacon Vorbis -- changed it back, although WP:BRD says not to do so if its not an emergency, which it isn't, so here we go. Let's work it out. User:Deacon Vorbis is supposed to open a thread on the talk page, but no prob; I'll do it. Here to help.

It is true that the MOS says not to use {{Cquote}}. {{Cquote}} says the same thing, putting it in logical and functional agreement with the MOS. Although the Wikipedia goes beyond basic HTML for most of its presentation, we do use and recommend the raw HTML tags <blockquote>...</blockquote> for long quotes (there's also a {{quote}} template which I think is just a rapper for <blockquote>...</blockquote>), and -- in the MOS -- no other, and in fact others are specifically deprecated. Why? Well, it's an artifact really. <blockquote>...</blockquote> is the HTML tag used for quotes, HTML is widely used, and it got imported over here. There's been a lot of back-and-forth on the question of long quotes over the years, and a lot of ink spilled.

It's a complicated issue, and I suppose a good place to start getting a handle it would be looking at one of the more recent and longer of the very many discussions that have occurred around this issue over the years: Wikipedia talk:Manual of Style/Archive 184.

Read that? OK good, continuing on...

My take on all this is this: the Wikipedia is not rule-bound. Rules follow (or are supposed to follow) common practice and good practice. Only the basic key rules -- NPOV, V, and a few others -- are not up for discussion. The Wikipedia is not a bureaucracy, not a battlefield, and not a typical hierarchical organization, and per WP:IAR our first duty is to bestify the encyclopedia.

As to how long quotes should be formatted, there are a number of "camps". Some people like {{quote}}, some people like {{quotebox}}, and some people like {{cquote}}, and there may be other quote templates. Some people like more than one. Some people think that having more than one template is chaotic or sloppy, some people think that having only one is overly rigid. Some people think that {{quote}} should be used sometimes and {{quotebox}} at other times, depending on the page layout and what you're trying to do and so forth. Some people don't think that long quotes should be used at all, and that all quotations should be in-line (with only quotation marks to differentiate them from normal text). Some people like one of the templates but aren't into micromanaging what other editors do. Some people are just annoyed by what a time sink this has proven to be over the years. And so forth.

As a matter of practice, a lot of editors have "voted with their feet" to create a de facto consensus that its OK to use different templates. You can tell by counting the transclusions: a lot of editors have transcluded {{quote}}, a lot of editors have transcluded {{quotebox}}, and a lot of editors have transcluded {{cquote}}.

Some people are inclined to favor a very plain presentation even at the possible cost of some readability and other problems, and so they favor plain <blockquote>...</blockquote> (or its wrapper, {{quote}}), and have the MOS to hammer on and generally annoy people who don't agree with them, and so forth.

There isn't really a consensus for any of this. It's hard to get consensus. But you can try if you want. Want to you want to do is take some hours or days to study the matter and its history, bone up on your knowledge of ergonomics, page layout, industry practices (particularly for other encyclopedias), and so forth, formulate a CENT RfC (probably preceded by a series of RfCs so that the core issue(s) can be clarified and presented succinctly), and like that.

Or, of you wish, you can make a case here that this particular article has some special nature such that templates other than {{quote}} won't work in this particular article. Can't imagine what's unique about this article, but willing to be educated.

Til then, respect WP:CONSENSUS and its enforcement arm, WP:BRD. The floor is open. We are all ears and willing to be convinced. Herostratus (talk) 16:06, 20 December 2019 (UTC)[]

I have read your comment (not following any links) and see no answer to the following question: why do you think cquote is better here? (Ideally, I hope for a reply of one or at most two sentences.) --JBL (talk) 16:12, 20 December 2019 (UTC)[]
User:Joel B. Lewis, sure, there are a few reasons why this change in this place is not something to be done without discussion
1) On the merits of the user experience, when leading into a quote, it's important for the reader to understand that they are reading a quote. The large pastel quote symbols do this well, slightly better than just indenting. Or not; that's my guess, but it's hard to prove either way, without controlled-study data (which may exist somewhere) and anyway we're mostly talking about milliseconds here. But the large quote marks surely aren't worse for this purpose. The reader's experience is by far the most important thing, but:
2) On the merits of the editorial environment, it's not good to micromanage editors. Somebody went to the trouble of finding that quote and a good source for it and formatting it an putting in in the article -- in other words, the actual work of the project. They chose to use {{tl}cquote}} and you have to respect that. Well, you don't have to, but all things being equal you should, if you're wanting to build an organization made of motivated volunteers.
3) On the merits of the Wikipedia process, since quotes are used (in various formats) on thousands and thousands of pages, trying to get a WP:LOCALCONSENSUS for each one is not the best way forward in my opinion. If you want consensus to have the right and permission to go around changing other editors contributions to a form more pleasing to you personally, go get that permission -- at an MOS RfC, not on a page-by-page basis -- and write a bot or make it a personal goal or put together a team to fix it. It's either a problem in which case it needs to be fixed everywhere, or it's not a problem and it doesn't need to be fixed anywhere.
4) If it's a matter of aesthetics (and don't be silly, of course it is), well... assuming that aesthetics is entirely a matter of personal taste (not exactly true, but close enough), then that's insufficient reason to roil the text. It just ends up as a time sink. I certainly don't go around changing your formats to my preference. If you write "He graduated from Harvard" I don't go around changing that to "He was graduated from Harvard" even tho that's how I'd write it. And so forth.
So I mean that's four right there. I can think of more but that's a start. Herostratus (talk) 00:53, 21 December 2019 (UTC)[]
I guess you didn't read the part about one or at most two sentences? Also, trying to avoid local consensus is an argument for going with what the MOS says (no decorated quotes), not for going against it. —David Eppstein (talk) 01:13, 21 December 2019 (UTC)[]
MOS:BLOCKQUOTE and the documentation for {{cquote}} already deprecate its usage in mainspace. The onus is thus really on you to get consensus for using it, and this isn't the place for doing so. Simple transclusion count is a useless metric; if someone sees a template being used, they'll often just copy it without realizing that it's not appropriate. –Deacon Vorbis (carbon • videos) 16:21, 20 December 2019 (UTC)[]
  • It seems to me that the use of cquote, rquote, or other forms of decorative quotes, or boxed quotations, generally gives undue weight to a quotation. Perhaps in an article with a specific quotation is the topic, sauch as Ain't I a Woman or I Have a Dream. I note however that neither decorative quotes nor boxed quotes are used in the former article, while one boxed quote 9but not a cquote style) is used in the I Have a Dream article. Outside of such articles that are actually about a speech or quotation or text, it seems to me that the use of cquote is pretty much always going to give undue weight, and should, inline with the MOS, never be used. I removed it here for that reason. DES (talk)DESiegel Contribs 17:21, 20 December 2019 (UTC)[]
  • The consensus on MOS not to use cquote or other decorative quotes is clear. This is not the place to fight it. —David Eppstein (talk) 17:33, 20 December 2019 (UTC)[]
  • Procedural comment WP:BRD says that after an action is reverted, a discussion should be opened, and more specifically says After someone reverts your change, thus taking a stand for the existing version or against the change, you can proceed toward a consensus with the challenging editor through discussion on a talk page. While discussing the disputed content, neither editors should revert or change the content being discussed until a compromise or consensus is reached. BRD does not say that no other editors my reinstate the challanged change. Indeed it strongly implies that doing nso is a legitimate part of the cycle. BRD also says: BRD is never a reason for reverting. Unless the reversion is supported by policies, guidelines or common sense, the reversion is not part of BRD cycle. and RD is not an excuse to revert any change more than once. If your reversion is met with another bold effort, then you should consider not reverting, but discussing. Therefore it seems to me that this edit is not one properly applying BRD, and is arguably edit-warring although not a 3RR violation. Also, note that BRD, while widely respected and followed, is an essay, not policy. DES (talk)DESiegel Contribs 19:09, 20 December 2019 (UTC)[]
  • I am not seeing in the above discussion any actual reason to prefer the use of cquote, or of decorative quote marks or set-off quotations, beyond the standard indetation which the blockquote tag implements. The only reason I see is "lots of editors have done this in the past." Academic and scientific publications never use such styles, nor do most serious non-fiction books. But beyond that, there is a pretty clear consensus here not to do that, documented in the MOS provision. There should be a good reason for departing from or changing any such consensus, and I don't yet see that here, nor can I think of one. Why should cquote be used here? DES (talk)DESiegel Contribs 19:15, 20 December 2019 (UTC)[]
Right, I laid this out above, where you can look for details, but as an overview, the existing status should be kept because:
1) It's better for the reader (arguable)
2) It's better for the community (arguable, I suppose, if you squint)
3) It's poor process to do this case-by-case, needs a centralized discussion
4) Assuming its really mainly about personal aesthetic taste (which, probably), that is insufficient cause for undoing other editors' work. 01:47, 21 December 2019 (UTC) — Preceding unsigned comment added by Herostratus (talkcontribs) 20:47, 20 December 2019 (UTC)[]
This is not,Herostratus a matter primarily of personal aesthetic taste it is a matter of compliance with our hose style, and of lending undue weight to some quoted, thereby violating WP:NPOV. As a polixy issue, aesthetic judgemnts are not relevant, and the "reader exprience" is not highly relevant either, althoguh i disagree with your reasoning there. If it is "important that the reader realize that this is a quotation": they why supply decoratice quotes for only soem quotations? Obviously to emphasize thsoe quotes over other quotes and the rest of the articel text, and that is undue weight, clear as day. DES (talk)DESiegel Contribs 02:09, 21 December 2019 (UTC)[]
While coming late to this discussion, I'd still like to add my two cents. I have found the use of those big bold quotation marks to be quite jarring visually and this in turn leads to undue weight being given to the quoted material. While there may be some rare instances where this can be useful, I do not see any need for them in any mathematical (actually, any academic) article. We should follow the WP:MOS and not use them here.--Bill Cherowitzo (talk) 20:01, 20 December 2019 (UTC)[]

Underlined exponent "k" in Double Factorial section[edit]

This notation is also used in the Double Factorial article. To whoever did this: Nobody knows what that is. Please do not assume that the audience of Wikipedia has a graduate level math degree when choosing notation. This is becoming a general problem with Wiki articles, but that's another conversation. 74.140.199.156 (talk) 06:18, 26 May 2021 (UTC)[]

Number of prime factors of [edit]

Dear everyone. I have a suggestion of what can be added to the factorial Wikipedia page, which is sadly missing under the 'Number Theory' section in the article. Most of the interesting number theoretic properties of the factorial, including Wilson's theorem and Legendre's formula are already mentioned. There is, however, one quite natural question that is not mentioned anywhere. Namely: How many prime factors does n! have, when counted with multiplicity, on average?

This is a known result, and the answer to the question is the following:

For any positive integer , let denote the number of prime factors of , counted with multiplicity (I.e., for , we have ).
Then, for every integer , one has

as where are constants. Specifically

, where is the (Meissel-)Merten constant, and for all positive integers .


Proof: This result is a special case / easy consequence of Theorem 1 in the paper:

Saffari, B. Sur quelques applications de la "methode de l'hyperbole" de Dirichlet a la theorie des nombres premiers. (1970) Enseign. Math. (2) 14, (p.205-224)
Link to publisher: L'Enseignement Mathématique
(I do have a copy of this document, which I am willing to share upon request).

Why am I interested in this? Quite frankly, there are not all that many number-theoretic questions one can ask about the factorial, so I am a little bit surprised that this is not mentioned in the article. The reason I am aware of this result is that I wrote my bachelor thesis on this exact result. I did try to add the above formula to the Wikipedia page, but I had a hard time figuring out how to cite and write up it up. The reason for this is that: (1.) B. Saffari does not state the above special case of his formula, and I am not aware of any place in published literature where anyone has written this exact formula. (2.) The only exception to (1.) is ironically my own Bachelor thesis: Number of prime factors of the factorial , but this has not been published in any Journal, so I refuse to cite it on the page. If you look in the thesis (Theorem 5.4, p.34), you see how one obtains the above formula from Saffari's Theorem, in addition to some information about the constants in the formula.

Is there anyone who can recommend a course of action? Or who would be willing to create this entry?
Thanks. : )

Amusing numbers (talk) 19:36, 16 June 2021 (UTC)[]

Why is the alternative factorial sign being undone?[edit]

Why is the alternative factorial notation being undone? Not only has this notation been used in a very popular textbook in India, but also many teachers use this notation. But I did not found this notation in Wikipedia. Then on searching about the notation of factorial in Google, I was surprised to see that this notation, which such a popular book uses, is not found anywhere except a very uncommon website (didn't try to remember the name of that website). So I thought of adding that here. MaharajaAD (talk) 06:17, 24 June 2021 (UTC)[]

It doesn't belong in the lead. If there is a reliable source for this notation it can go elsewhere in the article (maybe the history section), with a description of the context in which this alternative notation is used. —David Eppstein (talk) 14:28, 24 June 2021 (UTC)[]

So, shall I create a new heading about notation and there put both the notations there? MaharajaAD (talk) 15:42, 24 June 2021 (UTC)[]

I have created a new subheading about notation and put it there. MaharajaAD (talk) 16:39, 24 June 2021 (UTC)[]