-1

I need to solve the equation $(n+1)! \geq 2~\cdot 10^{10}$ for $n$, without filling in $n$ every single time. How can I get rid of $n$ in the factorial (or just the factorial as a whole) so I can seclude $n$?

1 Answers1

0

There is no doubt that the solution proposed by robjohn is beautifule, elegant, efficient and so on !

If you want a shortcut method, what you could use (based on a quick and dirty nonlinear regression) is $$\log[(x+1)!]=a+b\, x^c+d\, x^{2c}$$

Using values for $0 \leq x \leq 200$ $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ a & +4.24333 & 0.135964 & \{+3.97518,+4.51148\} \\ b & -4.14423 & 0.058518 & \{-4.25964,-4.02882\} \\ c & +0.58454 & 0.000361 & \{+0.58383,+0.58525\} \\ d & +1.95215 & 0.009428 & \{+1.93356,+1.97075\} \\ \end{array}$$

which leaves you with a quadratic equation in $x^c$.

Applied to your case, this would give $$x^c=4.3936\implies x=12.5807$$ which is the order of magnitude (but easy to get). However, $13.5807!\approx 2.85804\times 10^{10}$ which is a bit too high.

But you can polish the solution using Stirling approximation $$\log[(x+1)!]=x (\log (x)-1)+\frac{1}{2} \left(\log (2 \pi )+3 \log \left({x}\right)\right)+\frac{13}{12 x}-\frac{1}{2 x^2}+O\left(\frac{1}{x^3}\right)$$ and use one or two iterations of Newton method to the equation

$$f(x)=x (\log (x)-1)+\frac{1}{2} \left(\log (2 \pi )+3 \log \left({x}\right)\right)+\frac{13}{12 x}-\frac{1}{2 x^2}-\log(a)$$ $$f'(x)=\log (x)+\frac{3}{2 x}-\frac{13}{12 x^2}+\frac{1}{x^3}$$ For your case, a single iteration would give $x=12.4458$ and we can check that $13.4458!\approx 2.00162 \times 10^{10}$.