General Question

PhiNotPi's avatar

Is there a formula to find the factorial of a number?

Asked by PhiNotPi (12681points) March 11th, 2012

The factorial of a natural number (integers > 0) is the product of all natural numbers less than or equal to that number. It is denoted with as N!.
5! = 5*4*3*2*1 = 120

I am trying to figure out if there a known closed-form formula for the factorial operation. The formula must have a fixed number of operations, no matter how large the number is. Operations can include addition, multiplication, exponentiation, and any inverses for those (subtraction, division, roots, and logarithms). If you must, you can include things such as 3^X or even hyperoperations.

Can such a formula exist? If it can exist, does anyone know what it is?

I was inspired to ask this question by the fact that a similar-looking function 1+2+3+4+5=15 has a known formula, (N^2+N)/2.

Observing members: 0 Composing members: 0

2 Answers

gasman's avatar

There’s an approximation function known as Sterling’s formula that works for large n:

n! ~= sqrt(2*pi*n)*(n/e)^n

where ~= means “approximately equals” and sqrt means “square root of”
The approximation improves as n grows without limit.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther