Talk:Factorial

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by R3hall (talk | contribs) at 00:56, 14 October 2007 (→‎Bang and anti-bangs). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

WikiProject iconMathematics 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.
BThis article has been rated as B-class on Wikipedia's content assessment scale.
MidThis article has been rated as Mid-priority on the project's priority scale.

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)

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??)


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.


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)[reply]


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.


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.

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.

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.

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)

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?

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)[reply]

Looks right to me. 0.5! = Γ(1.5) = 0.5 Γ(0.5) = √π / 2 = 0.88623... —Steven G. Johnson 00:59, 6 June 2006 (UTC)[reply]

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)[reply]


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.

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)[reply]

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 (talkcontribs) 09:04, 16 January 2007 (UTC)[reply]

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 (talkcontribs) 14:36, 16 August 2007 (UTC)[reply]

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)[reply]

What "designs" are you referring to? Michael Hardy 20:04, 2 March 2006 (UTC)[reply]

I think he is confusing "factorials" and "fractals". Hugo Dufort

definitly — Preceding unsigned comment added by Msknathan (talkcontribs) 12:05, 19 January 2007 (UTC)[reply]

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)[reply]

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)[reply]
Oh. I had a feeling I had that wrong, since I wrote it in a hurry. But either way, I think you got my point. It would be good to add mathematically correct formulas for factorials of sums, differences, products, quotients, etc. -- He Who Is[ Talk ] 22:49, 21 June 2006 (UTC)[reply]
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.

--Hugo Dufort

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)[reply]



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)

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)[reply]

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)[reply]

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)[reply]
  • 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)[reply]

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)[reply]


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)[reply]

No, is the empty product, which is 1. EdC 19:21, 11 November 2006 (UTC)[reply]

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)[reply]

The lower and upper bounds are ordered. means that the sum is taken over the values of k satisfying akb. Therefore b < a gives a null set. Fredrik Johansson 21:38, 11 November 2006 (UTC)[reply]

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)[reply]

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)[reply]
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)[reply]
Sorry, I meant multiplication. Fredrik Johansson 17:35, 12 November 2006 (UTC)[reply]

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)[reply]

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)[reply]
Done. Fishcorn 20:55, 26 November 2006 (UTC)[reply]

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))[reply]

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) ɢ[reply]

Triangular number. And yes, a link is worthwhile. –EdC 02:27, 24 December 2006 (UTC)[reply]

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)[reply]

Read the section "Non-integer factorials" in the article. Fredrik Johansson 08:09, 22 March 2007 (UTC)[reply]

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)[reply]

There's no difference between the general case and the specific case. Since 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)[reply]

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 (talkcontribs) 19:38, 29 April 2007 (UTC)[reply]

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 (UTC)[reply]

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

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 (talkcontribs) 17:02, 10 July 2007 (UTC)[reply]

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[reply]