Let $p_n$ be the $n$-th prime. Let $l_n = p_n - \lfloor \sqrt{p_n} \rfloor^{2}$ be the gap between a prime and the nearest square before the prime and $u_n= (\lfloor \sqrt{p_n} \rfloor + 1)^{2} - p_n$ be the gap between a prime and the nearest square after the prime. Is it true that $$ \lim_{m \to \infty} \frac{\sum_{n=1}^{m}\max(l_n, u_n)}{\sum_{n=1}^{m}\min(l_n, u_n)} \stackrel{?}{=} 3 $$
My experimental data shows that:
$m=1000000$, ratio $=2.999936$
$m= 100000000$, ratio $= 3.000107$
$m= 1000000000$, ratio $= 3.000083$