# How do you solve an inequality with the factorial of a variable?

How do you solve an inequality with the factorial of a variable?

Example: Determine the interval of $n \in \Bbb N$ for which the following inequality holds:

$$n! \leq 157788 \cdot 10^{10}$$

Can this be solved using algebraic techniques?

If not, what calculus techniques can I use to solve this inequality?

-
Stirlings formula is helpful for this, I don't remember the exact details, but I think it is something like $n!\approx \left({n\over e}\right)^n$. I'll look it up. – abiessu Sep 30 '13 at 23:54
Using the Gamma function, its easy to see $n \leq \lfloor\Gamma^{-1}(157788 \cdot 10^{10})\rfloor - 1$. But computing the inverse is still a problem. – Pratyush Sarkar Sep 30 '13 at 23:56
It is actually $n!\approx \left({n\over e}\right)^n\sqrt{\pi n}$. – abiessu Sep 30 '13 at 23:57
@abiessu Computing the inverse of that function is hard too. – Pratyush Sarkar Sep 30 '13 at 23:58
@pratyushsarkar: true, but a rough estimation can be garnered from taking $\log_n k$ and using the above formula to check how close the guess is. – abiessu Oct 1 '13 at 0:00

Thought of a different way, our answer is on the scale of $10^{16}$. This means that it is about 15 things the size of 10 multiplied together. namely 2*5, 3*4,6*7,8,9, 10, etc. to get 15 places this way, we'd likely have to go up to about 16ish. Being realistic, we could try some numbers in this area.
As a rule-of-thumb method, this seems pretty good, but I think $17! < 157788 \cdot 10^{10} < 18!$. Or at least so I gather from an online calculator. – user43208 Oct 1 '13 at 0:12
@user43208 This estimation method was sufficient for me because $n \in \Bbb N$ allowed me to apply the squeeze theorem to show the inequality holds for $0 \leq n \leq 17$. Thanks Th_ – recursion.ninja Oct 1 '13 at 0:30