5

I am trying to prove $(n+1)! = O(2^{(2^n)})$. I am trying to use L'Hospital rule but I am stuck with infinite derivatives.

Can anyone tell me how i can prove this?

A.Schulz
  • 12,167
  • 1
  • 40
  • 63
Sid
  • 355
  • 1
  • 3
  • 15

3 Answers3

12

Well, since this upper bound is not nearly tight, you can just use basic transformations to get

$$(n+1)!< (n+1)^{n}=2^{\log (n+1)^{n}}= 2^{n\log (n+1)}=O(2^{n\log n})\subset O(2^{(2^n)}). $$

A.Schulz
  • 12,167
  • 1
  • 40
  • 63
  • The third term is at least confusing if not wrong, depending on how you put parenthesis. The last equality is not true; $2^{(n+1)\log(n+1)} = 2^{n\log(n+1)} \cdot (n+1) \in \omega(2^{n \log n})$. – Raphael Mar 15 '13 at 07:26
  • 1
    You can fix this by starting with $(n+1)!<(n+1)^n$ instead. – Shitikanth Mar 15 '13 at 08:00
11

You can compare ratios of adjacent values: $(n+1)!/n! = n+1$ versus $2^{2^n}/2^{2^{n-1}} = 2^{2^{n-1}}$. Since $n+1\leq 2^{2^{n-1}}$ for $n \geq 1$, you can prove using mathematical induction that $(n+1)! \leq 2^{2^n}$.

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503
9

Using de l'Hôpital's rule on discrete functions is meaningless; you would have to use continuous extension. For factorials, that would be the Gamma function. For discrete functions, there is Stolz–Cesàro.

In either case, considering difference or differential quotients does not make sense for (super)exponential functions: since growth is at least of the same order as the function value itself, application of such rules does not simplify the situation.

In order to deal with factorials in asymtotics, Stirling's approximation is often helpful:

$\qquad \displaystyle n! \sim \sqrt{2 \pi n} \left(\frac{n}{e}\right)^n$

Therefore, $n! \in o(n^n)$. Furthermore, since

$\qquad\displaystyle \frac{n \log n}{2^n \log 2} \xrightarrow{n \to \infty} 0$

and $e^x$ is a non-decreasing and convex function¹, we have

$\qquad \displaystyle \lim_{n \to \infty} \frac{n^n}{2^{2^n}} = \lim_{n \to \infty} \frac{e^{n \log n}}{e^{2^n \log 2}} = \lim_{n \to \infty} \frac{n \log n}{2^n \log 2} = 0$.

Therefore, $n^n \in o(2^{2^n})$. Together (since $o$ is transitive) we get the desired result.

For more general advice for comparing functions, see here.


  1. There seems to be some folklore around this technique; statements like "apply a monotone function to numerator and denominator, the limit stays the same" are not valid in general.
Raphael
  • 72,336
  • 29
  • 179
  • 389