Talk:Factorial
From Wikipedia, the free encyclopedia
[edit] Moved from article
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
Moved from the article. Is this really worth mention? -- Taku 21:38 Apr 25, 2003 (UTC)
[edit] Derivative of the factorial
Does anyone know some values of the function that can be recieved by differentiating the factorial, using the ? symbol for this function?? A graphing calculator can be helpful. Try to see if you know the values of:
- 1? =
- 2? =
- 3? =
- 4? =
- 5? =
- 6? =
- 7? =
- 8? =
- 9? =
- 10? =
Dou you see a pattern for the values of n? for the integers?? (Look! We now have a mathematical meaning for just about every symbol on the computer; any counterexamples??) —Preceding unsigned comment added by 66.32.253.51 (talk • contribs) 21:17, 9 March 2004 (UTC)
- How can you differentiate the factorial when it isn't a continuous function? You could differentiate the gamma function, though. Eric119 22:41, Jun 30, 2004 (UTC)
-
- It's continuous over certain intervals. It just has pole as non-positive integers. Its not continuous, but its still differentiable. He Who Is 01:06, 6 June 2006 (UTC)
-
-
- Of course you can differntiate the factorial function! It is not defined for integral values only but for all real values execept {-1,-2,-3,...}. The definition is x! = Gamma(x+1). Peter, 20 October 2006. —Preceding unsigned comment added by 84.136.150.222 (talk • contribs) 15:51, 20 October 2006 (UTC)
-
- Wouldn't it be better to mention the integral definition
- in the discussion of the gamma function? 4pq1injbok 02:32, 16 Jul 2004 (UTC)
-
- No, it has obvious relevance here also. Dysprosia 02:38, 16 Jul 2004 (UTC)
-
-
- Sure, but isn't it still primarily about the gamma function? After all, the factorial is discrete, so defining it for nonintegral arguments is essentially defining the gamma function. It seems a bit scattered to me to talk about nonintegral z in two distinct places. 4pq1injbok 21:27, 16 Jul 2004 (UTC)
-
- Is there a term for the sum of positive integers less than or equal to the given number? Bless me if I can't find reference to one. —Preceding unsigned comment added by 69.196.178.201 (talk • contribs) 04:31, 5 August 2004 (UTC)
-
- Yes, a triangular number. --- User:Karl Palmen 5 August 2004
- Adding an external link:
- http://www.luschny.de/math/factorial/FastFactorialFunctions.htm
- This site shows several interesting algorithms to compute the factorial. —Preceding unsigned comment added by 82.126.207.162 (talk • contribs) 22:26, 2 September 2004 (UTC)
- This is easy. However, I prefer the systematic mathematical notation !' to the private invention ?.
-
- 0!' = -gamma
- 1!' = 1-gamma
- 2!' = 3-2*gamma
- 3!' = 11-6*gamma
- 4!' = 50-24*gamma
- 5!' = 274-120*gamma
- 6!' = 1764-720*gamma
- 7!' = 13068-5040*gamma
- 8!' = 109584-40320*gamma
- 9!' = 1026576-362880*gamma
- The 'pattern' is:
- n!' = (-1)^(n+1) * StirlingNumberFirstKind(n + 1, 2) - n! * gamma
- and 'gamma' is the Euler-Mascheroni constant. See also sequence A000254 on the On-Line Encyclopedia of Integer Sequences! Peter, 20 October 2006. —Preceding unsigned comment added by 84.136.150.222 (talk • contribs) 15:51, 20 October 2006 (UTC)
[edit] Incorrect reference to "the above recursive relation"
"Proper attention to the value of the empty product is important in this case, because <...> it makes the above recursive relation work for n = 1;"
But the recursive relation is given at the end of the next section (Applications), not above. —Preceding unsigned comment added by Mgedmin (talk • contribs) 18:01, 25 October 2004 (UTC)
[edit] 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)
[edit] factorials for halves?
How does one calculate factorials that are in the form (n + .5)!, where n is a whole number? On windows calculator, it says 3.5! = 11.631728396567448929144224109426. how is this calculated? —Preceding unsigned comment added by 12.223.117.71 (talk • contribs) 02:57, 9 February 2005 (UTC)
- With the gamma function. Fredrik | talk 02:59, 9 Feb 2005 (UTC)
-
- Yup, 3.5! is the same as Γ(4.5). --MarkSweep 06:19, 9 Feb 2005 (UTC)
Strange... The Windows calculator returns about 0.88 as .5!, which is less than 1 and clearly not sqrt(pi)... He Who Is 00:51, 6 June 2006 (UTC)
- Looks right to me. 0.5! = Γ(1.5) = 0.5 Γ(0.5) = √π / 2 = 0.88623... —Steven G. Johnson 00:59, 6 June 2006 (UTC)
-
- Ahhh... I forgot about the phase change between factorials and gammas, and interpereted Γ(.5) as root pi. I've always wondered why the gamma function is more commonly used in evaluating factorials. The Pi function has no phase change and a slightly simpler formula, so why does everyone opt for the one that requires more work? He Who Is 01:02, 6 June 2006 (UTC)
-
-
- Well, not everyone. Gauss did not! Sometimes the so called 'Mellin-transform' is said to be the reason: The Gamma function is the Mellin transform of the exponential function. See also the remarks at: http://www.luschny.de/math/factorial/factandgamma.html Peter, 20 October 2006. —Preceding unsigned comment added by 84.136.150.222 (talk • contribs) 19:33, 20 October 2006 (UTC)
-
[edit] Fast computation
Luschny's "prime swing" algorithm is quite neat. I've translated his source code into Python/gmpy, and found it to be four times faster than Mathematica's n! and twice as fast as gmp's built-in factorial (testing with n up to 1000000). The algorithm is unfortunately poorly documented, so there doesn't seem to be much hope for writing about it here. Anyone here with more knowledge about this? Fredrik | tc 13:53, 25 November 2005 (UTC)
where can i get this program??? theres no1 at school 2day so decided 2 hav sum fun calculatin factorials but its to hard manualy an the calculater doesnt giv any nice answers(only upto 13!) —Preceding unsigned comment added by Msknathan (talk • contribs) 09:04, 16 January 2007
It'd be nice if this page mentioned the record largest factorial computed, maybe along with the number of digits of the result. —Preceding unsigned comment added by 66.235.40.197 (talk • contribs) 14:36, 16 August 2007
[edit] Factorials for Fun
I've seen numerous videos and countless images using factorials utalizing their unique designs. Someone should make a section with a picture maybe showing this. 65.9.89.94 03:46, 2 March 2006 (UTC)
- What "designs" are you referring to? Michael Hardy 20:04, 2 March 2006 (UTC)
I think he is confusing "factorials" and "fractals". Hugo Dufort
definitly —Preceding unsigned comment added by Msknathan (talk • contribs) 12:05, 19 January 2007
[edit] Identities
Some identies for evaluating the factuarials of common binary functions would make a good addition to this article. For instance:
Or hopefully something without the recursivity in the denomitator. He Who Is 00:59, 6 June 2006 (UTC)
- I don't think you mean that. For example if a=3 and b=4, you would get (a+b)!=5040 while the right hand side would be 6*24/1. --Audiovideo 22:22, 21 June 2006 (UTC)
- We definitely need a section about identities and formulas (if any). That's what I was looking for when I wiki'ed this page. Of course, the example formula is wrong. Some identities for factorials are presented on the MathWorld site, for example the "raising factorials" and the "falling factorials" using the Pochhammer symbol.
[edit] Superfactorial notation
By the magic of TeX, it's possible to wrangle the notation for superfactorials so it indeed does look like a superimposed S and !: . Should this go live in the article? Or are we happy with how this looks already? Dysprosia 13:17, 4 July 2006 (UTC)
i think it should be changed, althought the "code" would look pretty extensive. anyways, i vote change it. Cako 02:34, 30 November 2006 (UTC)
[edit] 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 − Γ( − 1 / 2) / 2 gives a Beta function:
- I think you can do something similar for n odd. PAR 16:43, 20 October 2006 (UTC)
[edit] 0!
Can someone explain 0!=1 because intuitivle I would think 0!=0...
- This page is to discuss editing problems, not for discussing elementary learner problems. See newsgroups like sci.math for questions of this kind.
- Actually, I would say intuitively it is undefined. However, the Gamma function is the continuous version of the factorial (Γ(x+1)=x!) it effectively defines the factorial of any number, and it says 0!=1. Also, there's the binomial expansion. For example, raising (x+1) to the third power, we have
- which works for all the terms, including the n=3 term, if 0!=1. Its like that over and over, every time you want to generalize to use 0!, it turns out to be 1. PAR 04:04, 5 November 2006 (UTC)
- If we define the factorial recursively by n! = n × (n−1)!, we must take 0! = 1 or we would get that 1! = 0, 2! = 0, 3! = 0, ..., which surely doesn't make sense. If we define n! as the product of the list {1, 2, ..., n}, 0! would be the product of a list of zero numbers, which is the empty product and equals 1. What goes on in both cases is that 0! must be 1 because 1 is neutral under multiplication. Your intuition is based on the behavior of functions defined through addition, where 0 is neutral. - Fredrik Johansson 09:41, 5 November 2006 (UTC)
I still don't quite get it. Given that the definition of a factorial is the value of a number, N, multiplied by every integer N through 1 inclusive, the factorial of 0 is the value of 0 multiplied by the integers 0 through 1 inclusive. The only integers that qualify are 0 and 1. Therefore, 0!=0*1=0. Please critique. —Preceding unsigned comment added by 2k6168 (talk • contribs) 22:01, 21 May 2008 (UTC)
- If n denotes a natural number (including 0), then n! is, by definition, the product of the integers from 1 to n inclusive, that is, the set of integers i such that 1 ≤ i ≤ n. If n = 3, for example, this is the set {1, 2, 3}, and indeed 3! = 1×2×3 = 6. If n = 0, you get the empty set: there are no integers i that satisfy 1 ≤ i ≤ 0. The product of the elements of the empty set is known as the empty product, and its value is 1.
- The recurrence relation (n+1)! = (n+1) × n! shows that n is a factor of n! if n ≥ 1. You can revert the direction, giving
- n! = (n+1)! / (n+1).
- For example, 3! = 4! / 4 = 24 / 4 = 6. Then 0! = 1! / 1 = 1 / 1 = 1. --Lambiam 16:27, 23 May 2008 (UTC)
- So then because 0 doesn't fit that rule, we have an empty set, and although by definition factorializ(s)ing (correct term?) means multiplying that 0 by some number, that isn't what we do, because it's an empty set. Urgh. My mind's still stuck on that to factorializ(s)e, you must at least multiply n by something else, and when n is 0, the result is always 0. Oh well, that's my problem. Thanks. 2k6168 (talk) 12:17, 29 May 2008 (UTC)
- You write "by definition factorializ(s)ing (correct term?) means multiplying that 0 by some number". In no way does the definition of the factorial mean that 0! is the result of multiplying 0 by some number. It is just like the powers of 10. Most are a multiple of 10, since 10n+1 = 10 × 10n. This does not mean that all powers of 10 are the result of multiplying 10 by some number. In particular, 100 = 1, which is not a multiple of 10.
[edit] definition
Fixed definition to >0, =>0 can't work for the recursive part of the def, since then you would always get 0.
I take that back. It does work with =>. Although I did leave in the nonnegative integer bit. I'm getting rusty. . . .71.102.186.234 05:30, 11 November 2006 (UTC)
- If I look at the definition:
- I get for n=0
- which is zero. Shouldn't the proper definition be for n >= 1, with 0! not being defined by this particular definition? PAR 17:11, 11 November 2006 (UTC)
-
- No, is the empty product, which is 1. EdC 19:21, 11 November 2006 (UTC)
-
-
- The empty product is a product over a null set. Here the set is not null, its {0,1}. If the definition were changed to n>0 rather than n>=0 it would read:
-
-
-
- and then, for n=0, it would be a product over a null set. Does this sound right? PAR 19:43, 11 November 2006 (UTC)
-
-
-
-
- The lower and upper bounds are ordered. means that the sum is taken over the values of k satisfying a ≤ k ≤ b. Therefore b < a gives a null set. Fredrik Johansson 21:38, 11 November 2006 (UTC)
-
-
Could you give me a Wikipedia page that states this clearly, because I would like to clarify that point in this page by a link. I couldn't find such a page. I thought product might be the page, but it doesn't help. If there isn't such a page, could you edit the proper page and put this fact in it, so that I could reference it? Thanks - PAR 21:55, 11 November 2006 (UTC)
- I've added a line to the product page. By the way, the article sum also says about big sigma notation (which is analogous to big pi notation) that "if m = n in the definition above, then there is only one term in the sum; if m = n + 1, then there is none.". Fredrik Johansson 17:14, 12 November 2006 (UTC)
-
- I don't see an addition to either the product page or the product (mathematics) page. Probably the "product (mathematics)" page is where it should go, not to the "product" page, which is just a disambiguation page. PAR 17:34, 12 November 2006 (UTC)
-
-
- Sorry, I meant multiplication. Fredrik Johansson 17:35, 12 November 2006 (UTC)
-
[edit] Gamma Function
I have a couple minor complaints about the "Non-integer factorials" section:
1. Γ(z) is represented inconsistently. It is defined at the top of the section as Γ(z+1)=... for z > -1, but is later said to be "defined for all complex numbers z except for the nonpositive integers (z = 0, −1, −2, −3, ...)", which would be true of Γ(z), not Γ(z+1). The graph also represents Γ(z). I would suggest redoing the formula and definition to reflect Γ(z) as well, or adjust the rest of the section to increase clarity. I had to read it twice.
2. "The Gamma function is in fact defined for all complex numbers z except for the nonpositive integers (z = 0, −1, −2, −3, ...) where it goes to infinity." It doesn't really "go to infinity." In fact, it approaches positive or negative infinity near these values, depending upon the direction you come from. Barring a discussion of transfinite mathematics, it would be more accurate to write, "...) where it is undefined," or to simply omit it entirely, because the definition would be accurate without it (it states an exception to the domain).
3. "That is, it is the only function that could possibly be a generalization of the factorial function." This statement is a simplification of the previous statement that isn't accurate. You could, for example, construct a piecewise linear function that intersects the points of the factorial function and have a generalization. Maybe: "... it is the only holomorphic function that could ..."
I'm new here, so I'm not trying to step on anyone's toes, just trying to help with clarity.
Fishcorn 06:10, 26 November 2006 (UTC)
- I agree (mostly). Problem 1 is not lack of rigor, but lack of clarity, right? Problem 2 is lack of rigor. Problem 3 - I think "generalization" was meant in terms of the recursion relationships, not that it happens to agree with the factorial function at certain integer values. I could fix it, but why don't you do it instead? PAR 16:53, 26 November 2006 (UTC)
-
- Done. Fishcorn 20:55, 26 November 2006 (UTC)
4. the last equation (the infinite product) cannot be correct, as the k'th element goes to infinity, and so does the whole product. —Preceding unsigned comment added by 213.131.238.25 (talk) 13:53, 20 November 2007 (UTC)
[edit] Application of the Gamma function
This section only mentions the use of the gamma function in calculating the volume of an n-dimensional hypersphere. However, if the number of dimensions is an integer, it seems that using the gamma function has no advantage over using the simple factorial. If there is some coherence to the notion of a space with a non-integer number of dimensions, it would be good to spell that out, and perhaps note who uses such a notion and why. (Yekwah 09:56, 20 August 2007 (UTC))
[edit] additive analogue
What is the operation called when you add a natural number to all of the natural numbers that are less than it? For example, 7? = 7+6+5+4+3+2+1 = 28, n? = n+(n-1)+(n-2)+...+1 This is like factorials, but with addition instead of multiplication. If there is a word for this, it seems important enough to reference in this article. Hermitage 18:16, 23 December 2006 (UTC) ɢ
- Triangular number. And yes, a link is worthwhile. –EdC 02:27, 24 December 2006 (UTC)
[edit] Why is (-1/2)! = Square Root of π?
TI-83 series calculators use this definition, but why is that? What's the origin of this definition and how is this useful? 74.112.121.40 04:53, 22 March 2007 (UTC)
- Read the section "Non-integer factorials" in the article. Fredrik Johansson 08:09, 22 March 2007 (UTC)
I was wondering if there's a specific answer to just my question, not a general case for all non-integer factorials. This is because I assume the text book of my level of education would not ask us to learn what a Gamma Function is by ourselves. Any help would be appreciated, thanks in advance. 74.112.121.40 02:25, 23 March 2007 (UTC)
- There's no difference between the general case and the specific case. Since x! = x(x − 1)! for all x, the value of (n + 1/2)! for some integer n is simply a rational multiple of the value for any other n. Why in the first place? One explanation is that the gamma function integral turns into the Gaussian integral when x = 1/2. It is also a consequence of the reflection formula for the gamma function:
- Inserting z = 1/2 gives the answer. Fredrik Johansson 13:47, 24 March 2007 (UTC)
- You're right - your calculator is using more advanced mathematics than your textbook. Dcoetzee 00:32, 26 February 2008 (UTC)
[edit] 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
[edit] 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
[edit] Double Factorial
just a heads up. those identities for the double factorial using the gamma function, are wrong. i suggest someone fixes them (i dont know how to). here is one identity: n!! == (2/Pi)^((1/4) (1 - Cos[Pi n])) 2^(n/2) Gamma[n/2 + 1] (source wolfram) —Preceding unsigned comment added by 85.166.237.71 (talk • contribs) 17:02, 10 July 2007
[edit] Bang and anti-bangs
The term "bang" is sometimes used by journalists in reference to the ! symbol. It is also the sign for factorials. It then occurred to me that just as you can do something like 4!=1x2x3x4 to equal 24 (shorter is n!+1x...n), one can undo a factorial product by doing 24/4/3/2/1= 4. I could express is as 24?=4 or n?=n/.../1= n. I also found that you could produce n¿= 1/.../n and could also be expressed as n¿=1/n!. I came up with the idea of using ? and ¿ to express undoing factorials. True, it's not official but it's an idea worth sharing. It should also be noted that n! x n?= 1 and n! ÷ n?= n!^2 and n? ÷ n!=1/n!^2. Any comments or questions? R3hall 00:56, 14 October 2007 (UTC)R3hall
[edit] Isn't it an error: "Γ(n+1)=nΓ(n)" ?
Cos I think, it should be: Γ(n+1)=(n+1)Γ(n) if gamma function is to meet factorial's condition. And for consistency reasons there shouldn't be n and n-1 with factorial when there is n+1 and n with gamma. —Preceding unsigned comment added by BartekBl (talk • contribs) 18:40, 24 February 2008 (UTC)
- Γ(n+1) = n! = n·(n−1)! = n·Γ(n). --Lambiam 22:37, 24 February 2008 (UTC)
[edit] Difference between n to the power of n upto nth position defined
The 4 steps for "Anupam's Formula" are as follows
Following are the steps for the "Anupam's Formula"
Step 1
Let a = xn - (x-1)n
b = (x-2)n - (x-1)n
c = (x-3)n - (x-2)n ...
p = (x-n)n - (x-n-1)n
Step 2
a1 = a - b - c - .. - z
a2 = b -c - ...- z
a3 = c- .. - z
...
p1 = a1 - a2 - a3 - ..
Step 3
Follow Step 2 repeatedly until there is only one amount left
Step 4
This amount is equal to n!
Example :
Take
n=2
122 - 112 = 144 - 121 = 23
112 - 102 = 121 - 100 = 21
So, 23 -21 = 2 = 2!
Again for n=3
Step 1
163 - 153 = 4096 - 3375 = 721
153 - 143 = 3375 - 2744 = 631
143 - 133 = 2744 - 2197 = 547
133 - 123 = 2197 - 1728 = 469
Step 2
721 - 631 = 90
631 - 547 = 84
Step 3
90 - 84 = 6
Step 4
6 = 3!
This is have tested upto 10 and have found to be correct.
122.161.30.232 (talk) 10:59, 13 March 2008 (UTC)Anupam Dutta <anupamdutta@rediffmail.com>