TITLE: A Neat Identity Involving Zeta Zeroes
QUESTION [19 upvotes]: While playing around, I encountered the following very curious and cool identity. Consider the exponential integral $\text{Ei}(x)$ and the $n$th nontrivial zero of the Riemann Zeta function $p_n$.
Now, look at the first few imaginary parts of the following function:
$$f(x)=\sum_{n=1}^x \text{Ei}(p_n)$$
$$\Im \ \ f(1)=3.13732$$
$$\Im \ \ f(10)=31.3169$$
$$\Im \ \ f(100)=314.097$$ 
$$\Im \ \ f(1000)=3141.54$$
$$\Im \ \ f(10000)=31415.9$$
As you can see, it is each time adding a digit of pi.
Question: Is this a known result that can be proved easily? Does this pattern even continue?

REPLY [14 votes]: The result found by OP turns out to be quite generic; it holds for a wide range of sequences $\rho_n$ and not just the zeros of the $\zeta$-function. A precise formulation of what is observed is the following:
$$\lim_{N\to\infty} \frac{1}{N}\sum_{n=1}^N \text{Ei}(\rho_n) = \pi i \tag{1}$$
The sum above is the Cesaro mean of the sequence $a_n = \text{Ei}(\rho_n)$. If a sequence $a_n$ converges to $a$ then the Cesaro mean of $a_n$ also converges to $a$ (see e.g. this question) so $(1)$ would follow if we could show that $\lim_{n\to\infty}\text{Ei}(\rho_n) = \pi i$.
This is indeed true and the reason for this is as follows:

We can write $\text{Ei}(z)$ on the form $\text{Ei}(z) = -\Gamma(0,z) + \pi i$ where the incomplete $\Gamma$-function has the asymptotical expansion $\Gamma(0, z) = \frac{e^{-z}}{z} + \mathcal{O}(z^{-2})$. This implies that $\Gamma(0, z_n) \to 0$ for any sequence $z_n = x_n + i y_n$ where $y_n\to \infty$ and where $x_n$ is bounded.
The non-trivial zeros of the $\zeta$-function satisfy the conditions on the sequence above since they all lie in the strip $0<\Re[z]< 1$ in the complex plane and $\lim_{n\to\infty}\Im[\rho_n] = \infty$. This means that $\lim_{n\to\infty}\Gamma(0,\rho_n) = 0$ so $\lim_{n\to\infty} \text{Ei}(\rho_n) = \pi i$ and $(1)$ follows.

Note that the conditions in point 1. above are far from being very restrictive so there are infinitely many sequences for which $(1)$ holds (random examples are $\rho_n = 7 + n^2i$ and $\rho_n = \frac{2n}{1+n} + n\log(n)i$).