Find an asymptotic upper bound for $\prod_{p|n}(1+\frac{2}{p})$.

Let's define a function: $$f:\mathbb{N}\rightarrow \mathbb{R}$$ $$f(n) = \prod_{p|n}(1+\frac{2}{p})$$ Where $$p\in \mathbb{P}$$

Find a differentiable function $$g:\mathbb{R}\rightarrow\mathbb{R}$$ such $$f(n) = O(g(n))$$ as $$n$$ goes to infinity. Where $$O$$ is a big O.

I have an intuition that $$g(x) = \log(\log (x))$$. I have calculated $$\frac{f(n)}{\log(\log (n))}$$ on my computer up to $$4000$$ numbers, and it seems that this quotient is bounded from above by $$18$$ and from below by $$0.4$$. However i would like to be sure, whether $$\log(\log(x))$$ is a good function.

Regards.

-Edit-

As far i understand, i can do the following: $$f(n)=\prod_{p|n,p\in \mathbb{P}}(1+\frac{2}{p})\le \prod_{1\le k\le \omega(n)}(1+\frac{2}{p_k})$$ Where $$p_k$$ is the $$k$$-th prime number and $$\omega(n)$$ is the number of prime divisors of $$n$$. Let's use a logarithm here. Notice that $$\log(1+x)\le x$$. $$\log f(n) \le \sum_{k=1}^{\omega(n)}\log(1+\frac{2}{p_k})\le 2\sum_{k=1}^{\omega(n)}\frac{1}{p_k}$$ $$2\sum_{k=1}^{\omega(n)}\frac{1}{p_k}=2\log\log\omega(n)+O(1)$$ Hence: $$f(n) = \exp(\log(f(n)))\le \exp(2\log\log\omega(n)+O(1))=e^{O(1)}(\log\omega(n))^2$$. Because $$\omega(n) = O(\log(n))$$, now we see that $$f(n)=O((\log\log(n))^2)$$.

Am i right? Please correct me if i am wrong.

• It will be more like this, I mean Mertens' third theorem. Commented Mar 14, 2021 at 13:27

Anything you don't like with $$3^n$$ ? The better result is $$f(n)\le f(\prod_{p\le k_n} p)$$ with $$\prod_{p\le k_n} p$$ the largest primorial $$\le n$$ so that (from the $$\theta(2m)-\theta(m)\le\log {2m\choose m}\le \psi(2m)$$ argument) $$k_n =O(\log n)$$ and $$\log n=O(k_n)$$ ie. $$\log k_n\sim \log \log n$$.
Mertens theorem gives $$\log f(\prod_{p\le k_n} p)=2 \log \log k_n+C+o(1)$$. Whence $$f(n)\sim e^C (\log\log n)^2$$.