The Factorial sequence is 1,1,2,6,24,120,720,5040,…, where 0! = 1, 1!=1, 2! = 1*2 = 2, 3! = 1*2*3,.....

Can we find the next Factorial number if we are given any Factorial number?

For example, if n=120 then the answer should be 720 because 720 is the next Factorial number after 120.

  • 2
    $\begingroup$ This just amounts to finding n if you know n!. See e.g. quora for some efficient algorithms. Or search for "inverse factorial function". $\endgroup$ – Abhimanyu Pallavi Sudhir Mar 8 at 9:03

If you look at this question, you will find a very good approximation of the inverse of the factorial function.

$$n! =y\implies n \sim \frac{{\log \left( {\frac{y}{{\sqrt {2\pi } }}} \right)}}{{W\left( {\frac{1}{e}\log \left( {\frac{y}{{\sqrt {2\pi } }}} \right)} \right)}} -\frac{1}{2}$$ where appears Lambert function.

Use $\lceil n \rceil$.


Not the answer you're looking for? Browse other questions tagged or ask your own question.