If $f,g:\mathbb{N}\rightarrow \mathbb{N}$ are defined as $f(n)=\{$ smallest prime $>n+1\}$ and $g(n)=\{$ greatest prime $\leq n+1\}.$ Then $\displaystyle \lim_{n\rightarrow \infty}\sum^{n}_{r=1}\frac{1}{f(r)g(r)}$
Try: $\displaystyle \lim_{n\rightarrow \infty}\sum^{n}_{r=1}\frac{1}{f(r)g(r)}=\lim_{n\rightarrow \infty}\bigg[\frac{1}{f(1)g(1)}+\frac{1}{f(2)g(2)}+\cdots +\frac{1}{f(n)g(n)}\bigg]$
Could some help me to solve it, thanks
Let $p_k$ be the $k^{th}$ prime.
The key is we can partition the integers $\ge 2$ into a disjoint union of intervals of the form $[p_k,p_{k+1}-1]$ and whenever $n + 1 \in [p_k,p_{k+1} - 1]$, we have $f(n) = p_{k+1}$ and $g(n) = p_{k}$.
This leads to
$$\sum_{n=1}^\infty \frac{1}{f(n)g(n)} = \sum_{k=1}^\infty \sum_{p_k \le n+1 < p_{k+1}} \frac{1}{p_{k+1} p_k} = \sum_{k=1}^\infty \frac{p_{k+1}-p_k}{p_{k+1}p_k}\\ = \sum_{k=1}^\infty\left(\frac{1}{p_k} - \frac{1}{p_{k+1}}\right) = \frac{1}{p_1} - \lim_{k\to\infty} \frac{1}{p_{k+1}} = \frac12$$