Why is there no explicit formula for the factorial?
I am somewhat new to summations and products, but I know that the sum of the first positive n integers is given by:
$$\sum_{k=1}^n k = \frac{n(n+1)}{2} = \frac{n^2+n}{2}$$
However, I know that no such formula is known for the most simple product (in my opinion) - the factorial:
$$n!=\prod_{k=1}^n k = \prod_{k=2}^n k$$
I don't know if that is how products work, but I would really like to know!
So my question is why is there no explicit formula (in terms of n, other than n(n-1)...2*1) for the product of the first n integers? Is there a proof that says that one cannot exist or is it that one has not been discovered?
By explicit formula I mean a non-functional equation that does not require n amount of steps to calculate - just like the summation formula does not require n additions.
$\endgroup$ 75 Answers
$\begingroup$(The following is a joke.)
Put $a_n:={1\over 6}n(n+1)(n+2)$ and $b_n:={1\over2}n(n+1)$, and define the magic constant $$\xi:=\sum_{n=1}^\infty {n!\over 2^{a_n}}\ =\ 0.630882266676063396815526621896\ldots\quad .$$ Then $$n!=\bigl\lfloor\> 2^{a_n}\xi\>\bigr\rfloor\quad \bigl({\rm mod}\ \ 2^{b_n}\bigr)\qquad(n\geq1)\ .$$ Try it out!
$\endgroup$ 3 $\begingroup$Since nobody seems to be willing to answer, let me try to summarize the hints from the comments.
First, we can write factorial as $$n!=\int_0^{\infty}x^n e^{-x}dx.$$ One of the consequences of this formula is Stirling's approximation: as $n\rightarrow\infty$, $$n!\sim \left(\frac{n}{e}\right)^n\sqrt{2\pi n}.\tag{1}$$ At first sight, if there was an explicit algebraic formula for $n!$ in terms of $n$, in such expression there would be no place for $e$ or $\pi$; since they are both present in the asymptotics, one is tempted to conclude that no such algebraic formula can exist. Actually this is not quite true: as was pointed to me by Michalis, one can e.g. obtain $e$ as the asymptotics of $\left(1+\frac{1}{n}\right)^n$.
To show non-existence rigorously, you should first rigorously define what do you mean by "explicit formula" $n!=f(n)$, i.e. to define the class of "acceptable" functions $f$. For example, rational $f$ are immediately ruled out by the above asymptotics.
$\endgroup$ 3 $\begingroup$I thought about Fermat theory and how there must be an algebraic version of
$n!=\frac{{\mathrm d}^n}{{\mathrm d}^nx}\,x^n$
and indeed it let me to a formula of the form
$n!=\sum_{k=0}^nR_{nk}\,k^n$
namely with $R_{nk}=(-1)^{n+k}{n\choose k}$. Of course, you would use factorials to compute the binomials, so there is no computational speedup, but it still makes for some nice looking equations:
0! = + 0^0
1! = - 0^1 + 1*1^1,
2! = + 0^2 - 2*1^2 + 2^2,
3! = - 0^3 + 3*1^3 - 3*2^3 + 3^3,
4! = + 0^4 - 4*1^4 + 6*2^4 - 4*3^4 + 4^4,
5! = - 0^5 + 5*1^5 - 10*2^5 + 10*3^5 - 5*4^5 + 5^5,
6! = + 0^6 - 6*1^6 + 15*2^6 - 20*3^6 + 15*4^6 - 6*5^6 + 6^6,
7! = - 0^7 + 7*1^7 - 21*2^7 + 35*3^7 - 35*4^7 + 21*5^7 - 7*6^7 + 7^7,
8! = + 0^8 - 8*1^8 + 28*2^8 - 56*3^8 + 70*4^8 - 56*5^8 + 28*6^8 - 8*7^8 + 8^8
The theorem underlying here is that, for all $n$
$\sum_{k=0}^n\dfrac{(-1)^k (-k)^n}{k!\,(n - k)!}=1$
$\endgroup$ $\begingroup$These two formulas give n! This was discovered by Euler. Reference this link for further reading.
$\endgroup$ 1 $\begingroup$If I am not mistaken, Manjul Bhargava generalized the factorial function to include numbers such as (pi)! and (2+โ3)!
$\endgroup$ 4