While playing around with prime gaps, I found out that the following formula seems to be a rather good approximation of the ratio $\dfrac{p_{b}-p_{a}}{b-a}$ where $a<b$ are positive integers:
$$H_{m}-\log_{2} m-2\gamma$$
where $m:=\frac{a+b}{2}$, $\gamma$ is Euler-Mascheroni's constant, $\log_{2}x=\log\log x$ and $H_{x}=\{x\}H_{\lceil x\rceil}+(1-\{x\})H_{\lfloor x\rfloor}$ is a rather natural generalization of harmonic numbers.
Writing $\dfrac{p_{b}-p_{a}}{b-a}=H_{m}-\log_{2} m-2\gamma+R_{m}$, is it true that $R_{m}=O_{\varepsilon}(\dfrac{1}{m^{1/2+\varepsilon}})$?
Thanks in advance.