Well, we all know that if N is given it\'s easy to calculate N!. But what about the inverse?
N! is given and you are about to find N - Is that possible ? I\'m curio
If you do not know whether a number M
is N!
or not, a decent test is to test if it's divisible by all the small primes until the Sterling approximation of that prime is larger than M
. Alternatively, if you have a table of factorials but it doesn't go high enough, you can pick the largest factorial in your table and make sure M
is divisible by that.