Let $p_k$ the kth prime number, and $\Lambda(n)$ the von Mangoldt function. Thus $\psi(n)=\sum_{k\leq n}\Lambda(k)$ the second Chebyshev function. Also one can defines $g_n$ to be the gap between consecutive primes, this $g_n=p_{n+1}-p_n$, $n\geq 1$.
I would like to know if it is possible answer the following question. I know that I can do some calculations, using summation and asymptotic for prime numbers and the second Chebyshev function. Is not required the best calculations, only the ideas of how obtain a good statement.
Question. How one calculates a good upper bound for $$\left|e^{\psi(N)}-\sum_{p_k\leq e^{\psi(N)}}(p_{k+1}-p_k)^2\right|$$ unconditionally (without assumption of conjectures) for integers $N$ arbitrarily large (that is $N\to\infty$)? Many thanks.
As was said is not required the best statement, if is tis feasible combine with other technics or theorems about the distribution of prime numbers.
As usually, I write a possible bound but probably there is a way to do better. Let us define $$g_{k}=p_{k+1}-p_{k}. $$ It is well known , for a large $k,\, p_{k}>X$ say (and I think it is the best bound at the moment), that $$g_{k}\leq p_{k}^{\theta} $$ where $\theta=0.525 $ (for a reference see Baker, R. C.; Harman, G.; Pintz, J. ($2001$). "The difference between consecutive primes, II". Proceedings of the London Mathematical Society. $83$ $(3)$: $532–562$). So we have that $$\sum_{X<p_{k}\leq x}g_{k}^{2}\leq\sum_{X<p_{k}\leq x}p_{k}^{2\theta}\leq\sum_{p_{k}\leq x}p_{k}^{2\theta} $$ so we have, by Abel's summation, that $$ \sum_{p_{k}\leq x}p_{k}^{2\theta}=\pi\left(x\right)x^{2\theta}-2\theta\int_{2}^{x}\pi\left(t\right)t^{2\theta-1}dt $$ and now since exist some effectively computable constants $c_{1},\, c_{2}>0 $ such that $$c_{1}\frac{n}{\log\left(n\right)}<\pi\left(n\right)<c_{2}\frac{n}{\log\left(n\right)},\, n>1 $$ we can conclude that $$\sum_{p\leq x}p^{2\theta}\leq C\frac{x^{2\theta+1}}{\log\left(x\right)} $$ for an effectively computable $C>0$. About $\sum_{p_{k}\leq X}g_{k}^{2} $ we can use the Bertrand's postulate (which holds for every $p_{k} $) and get $$\sum_{p_{k}\leq X}g_{k}^{2}\leq\sum_{p_{k}\leq X}p_{k}^{2}\leq c_{3}X^{3}\log(X) $$ where $c_{3}>0 $. Now since $x $ is arbitrary large we can assume that $$X\log^{1/3}(X)<\left(\frac{x^{2\theta+1}}{\log\left(x\right)}\right)^{1/3-\epsilon} $$ where $0<\epsilon<\frac{1}{3} $, so we have $$\sum_{p_{k}\leq X}g_{k}^{2}<\frac{x^{2\theta+1}}{\log\left(x\right)} $$ so finally
where $f\left(x\right)\ll g\left(x\right) $ means $f\left(x\right)=O\left(g\left(x\right)\right)$.