# Opposite of Factorial? [duplicate]

Possible Duplicate:
Is there a way to solve for an unknown in a factorial?

I was just wondering, what would be the opposite of factorial?

For example, If I had $n! = 120$. How can I then show algebraically that $n = 5$?

-

## marked as duplicate by J. M., Ross Millikan, Rudy the Reindeer, Henry T. Horton, SashaOct 3 '12 at 2:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You could repeatedly divide your number by increasing integers; and if at any point you divide by $k$ and are left with $k+1$ then you know that the number you started with is $(k+1)!$. – Clive Newstead Oct 2 '12 at 13:03
Are you looking for a solution that works when the result is a non-integer? For example, suppose someone asks you for $n$ such that $n! = 200$. Do you want to say "There is no such $n$," or do you want to say "$n$ would have to be between 5 and 6", or do you want to say "$n\approx 5.297$"? – MJD Oct 2 '12 at 13:05
@MJD If possible, I would like to know both methods. – Jeel Shah Oct 2 '12 at 13:07
Relevant – MJD Oct 2 '12 at 13:08

## 1 Answer

[Added because of a question in a comment] The generalization of the factorial is the gamma-function: $n! = \Gamma(1+n)$ where we can also insert noninteger values for n: $y = \Gamma(z)$ such that we have a function over the complex numbers $z$ except the poles at the non-positive integers).[/added]

The gamma-function has two real fixpoints. If you write the power-series of the gamma around one of that fixpoints, then this power series has no constant term and can be reverted by series-reversion. From this you can then get the inverse of the gamma, and from this the inverse of the factorial. Unfortunately, the convergence-radii of that series are both small, so I cant say at the moment, how useful this process would actually be.

(I think I've seen a question concerning the inverse of the gamma here or on MO, and possibly even showed a couple of that coefficients: see here for a short discussion)

-
I don't know what the gamma function is.. Can you please offer an explanation to what this means? – Jeel Shah Oct 2 '12 at 13:12
@gekkostate: you could start at Wikipedia or Mathworld – Ross Millikan Oct 2 '12 at 13:35
@gekkostate: you can also numerically invert Stirling's approximation that $\ln n! \approx n \ln n -n +\frac 12\ln(2\pi n)$ to get intermediate values – Ross Millikan Oct 2 '12 at 13:39
You are probably referring to this thread: mathoverflow.net/questions/12828/inverse-gamma-function – Shahab Oct 2 '12 at 13:43