Given the following function,
$$f(n)=\prod_2^n \log i. $$
How can I find $f(n)=\Omega (?)$ and $f(n)=O(?)$ ?
I tried to do it, but I have no idea how to do it ..
Given the following function,
$$f(n)=\prod_2^n \log i. $$
How can I find $f(n)=\Omega (?)$ and $f(n)=O(?)$ ?
I tried to do it, but I have no idea how to do it ..
It will be easier to analyze $S(n) = \log f(n)$, which is given by the formula $$ S(n) = \sum_{i=2}^n \log\log i. $$ According to the Euler–Maclaurin formula, $$ S(n) = \int_2^n \log\log x \, dx + \frac{\log\log 2 + \log\log n}{2} + \sum_{k=1}^s \frac{B_{2k}}{(2k)!} [(\log \log)^{(2k-1)}(n) - (\log\log)^{(2k-1)}(2)] + R, $$ where the remainder satisfies $$ |R| = O_s \left(\int_2^n (\log\log)^{(2s+1)}(x) \, dx\right). $$ Here $(\log\log)^{(r)}$ is the $r$th derivative of $\log\log$ and $B_{2k}$ are Bernoulli numbers.
In order to get big O asymptotics, it suffices for the error to be of order 1. The first few derivatives of $\log\log x$ are $$ \log \log x, \frac{1}{x\log x}, -\frac{\log x + 1}{x^2\log^2 x}, \frac{2\log^2 x + 3\log x + 2}{x^3\log^3 x}. $$ The third derivative has constant sign (for $x$ larger than some constant), and so when $s=1$, the growth rate of the remainder term can be bounded by the second derivative evaluated at $n$, which is $o(1)$. So it suffices to choose $s=1$. We obtain $$ \begin{align*} S(n) &= \int_2^n \log\log x \, dx + \frac{\log\log 2 + \log\log n}{2} + \frac{\frac{1}{n\log n} - \frac{1}{2\log 2}}{12} + o(1) \\ &= x\log\log x - Ei(\log x) \bigr|_2^n + \frac{\log \log n}{2} + O(1) \\ &= n\log\log n - Ei(\log n) + \frac{\log \log n}{2} + O(1), \end{align*} $$ where $Ei(x)$ is the exponential integral. The exponential integral doesn't really reduce to any known function, but it is known that $E_i(x) = (e^x/x)(1 + O(1/x))$. Therefore $$ S(n) = n\log\log n - \frac{n}{\log n} + O\left(\frac{n}{\log^2 n}\right). $$ This gives the value of $f(n)$ up to a factor of $e^{O(n/\log^2 n)}$. In the same way, we can get an explicit expression with error $e^{O(n/\log^k n)}$ for any constant $k$, using the divergent series for $Ei(x)$. If we want an expression with $O(1)$ multiplicative error, then the best we can get is $$ f(n) = \Theta(e^{n\log\log n - Ei(\log n)}\sqrt{\log n}). $$ With a bit of effort we can also find the hidden constant.
I won't even try to compete with Yuval's answer, but what are you going to do with a problem like this if you have no idea, and you are not a genius, and you want to get some result?
We can first observe that unlike other problems, in this case asking for $O (f (n))$ or $\Theta (f (n))$ means you need a very precise solution: The ratio between f (n) and f (n+1) is log (n+1) which goes towards infinity as n gets large. So if you manage to give an exact expression for f (n+1), then f (n+1) is not in $O (f (n))$!
Assuming that log(n) is the base 2 logarithm, log i ≥ 2 whenever i ≥ 4, which makes the product greater than $2^{n-3}$. log i ≥ 3 whenever i ≥ 8, so the product is greater than $3^{n-7}$ and so on. log i ≥ log n - 3 if i ≥ n / 8, so the product is also greater than $(\log n - 3)^{7n / 8}$, but less than $(\log n)^n$. So at least we can get a rough idea of how fast the product is growing, good enough to say that $\log f(n) = \Theta (n \log \log n)$, but nowhere near good enough for f (n) itself.