I've often seen it stated (in vague terms) that there's a Fourier duality between the set of prime numbers and the set of nontrivial Riemann zeta zeros.

Because there are various explicit formulae whereby prime counting functions can be expressed as infinite sums of sinusoidal functions over the set of zeta zeros, I had always assumed that the same thing would work in the opposite direction. That is, I imagined there was a well-known formula whereby the nontrivial-zeta-zeros-counting function could be expressed as an infinite sum of sinusoidal functions over the set of primes.

However, I've been unable to find such a formula. The only explicit formula I've found for this counting function looks like this:

$$f(E) = \frac{1}{\pi} \Im(\ln(\Gamma(1/4 + iE/2)) - \frac{E}{2\pi}\ln(\pi) + \frac{1}{\pi} \Im(\ln(\zeta(1/2 + iE)) + 1$$

where there's no explicit involvement of the primes.

Is anyone aware of a formula of the type I'm seeking? I'm quite sure such a thing must exist, since a programmer friend recently looked at this and got curious enough to "illegally" substitute the (truncated) Euler product expression for zeta in the above (it doesn't converge in the critical strip, hence such a substitution is not mathematically valid), just to see what the resulting function would look like. His plots of

$$N_m(E) = \frac{1}{\pi} \Im(\ln(\Gamma(1/4 + iE/2)) - \frac{E}{2\pi}\ln(\pi) - \frac{1}{\pi} \sum_{p < m} \Im(\ln(1-p^{-1/2-iE})) + 1$$

in three colours (corresponding to $m = 100$, $1000$ and $10000$, and where $E$ varies from $4$ to $60$) can be seen here:

The positions of the zeta zeros are clearly visible, so even though this isn't a valid formula, I imagine that there must be something like this which *is* valid.