# How to compute the "factorial root"?

Joerg Arndt arndt at jjj.de
Wed Jun 4 09:58:38 CEST 2008

```If you just want to get the numerical value, use a solver.
E.g. with pari/gp:

? solve(x=2,17,gamma(x)-24)
5.00000000000000
? default(realprecision,50)
50
? solve(x=2,17,gamma(x)-47)
5.4328919981520360625012938977881675339337393034814

* Alonso Del Arte <alonso.delarte at gmail.com> [Jun 04. 2008 17:06]:
> Perhaps this is off-topic, but:
>
> How do you compute the "factorial root" of an integer that is not a
> factorial? That is, given an integer n, how do you compute the value x
> of Euler's Gamma function such that Gamma(x) = n ?
>
> For example, the "factorial root" of 24 is 5, since 4! = 24, and the
> factorial root of 120 is 6, since 5! = 120. But, say, for 47, I've
> found, by a long series of trials and errors, that Gamma(5.4328989) =
> 47.000518252. Surely the line for the Gamma function crosses the exact
> integer 47 at some point.
>
> So is there a formula, or will I just have to settle for a program
> that merely automates my trial and error?
>
> Alonso del Arte

```