TITLE: Two Representations of the Prime Counting Function
QUESTION [34 upvotes]: The bounty  for the best work out of Greg's answer, especially the
"solving for $\pi^*(x;q,a)$ in terms of all $\Pi^*$ functions (tedious but possible)"
part is over. Since Raymond's contributions might be very helpful to recall the necessary math, upvoting his answers is highly appreciated...
I posted my attempt of a workout here. Comments welcome...


Original question:
I have two representations of $\pi(x)$:



The Prime Counting Function $\pi(x)$ is given
$$
\pi(x) = \operatorname{R}(x^1) - \sum_{\rho}\operatorname{R}(x^{\rho}) \tag{1}
$$
with $    \operatorname{R}(z) = \sum_{n=1}^{\infty} \frac{ \mu (n)}{n} \operatorname{li}(z^{1/n})$ and $\rho$ running over all the zeros of $\zeta$ function.




This formula, while
widely believed to be correct, has not yet been proved.
$$
\pi(x) \approx \int\limits_2^x{\frac{dt}{\ln t}} - \frac{\sqrt x}{\ln x}\left( 1 + 2\sum_{\gamma} \ \ \frac{\sin(\gamma\ln x)}{\gamma}\right) \tag{2}, 
$$
with $\gamma=\text{Im}({\rho})$ being imaginary part of the roots  of the $\zeta$ function.



Now I have two questions:

Does the truth of $(2)$ depend on Riemann's Hypothesis or is it "just" what Wikipedia says, that The amplitude of the "noisy" part is heuristically about $\sqrt x/\ln x$?
How to show the equivalence between $(1)$ and $(2)$? The integral logarithm is easily found in both representations, but how do the $\rho$-parts fit together? How do I get $\sin$s from $\text{li}(z^{1/n})$s? Does this invoke Gram's series:
$$
    \operatorname{R}(z) = \sum_{n=1}^{\infty} \frac{ \mu (n)}{n} \operatorname{li}(z^{1/n}) = 1 + \sum_{k=1}^\infty \frac{(\ln z)^k}{k! k \zeta(k+1)} ?
$$
We can rewrite $\displaystyle \frac{\sin(\gamma\ln x)}{\gamma}=\frac{x^{i\gamma}-x^{-i\gamma}}{i\gamma}$ and I remember that I've seen a similar expression at Wikipedia:
$$
    \psi_0(x) = x - \sum_\rho \frac{x^\rho}{\rho} - \ln 2\pi - \frac12 \ln(1-x^{-2}) ,
$$
But could this help, if at all? ($\psi_0(x)$ is the normalization of the Chebyshev function, see here)

REPLY [7 votes]: You probably know that
$$
\Pi^*(x;q,a) = \sum^*_{\substack{n\le x \\ n\equiv a\pmod q}} \frac{\Lambda(n)}{\log n} = \frac1{\phi(q)} \sum_{\chi\pmod q} \overline{\chi(a)}\Pi^*(x,\chi).
$$
I find that the easiest way to convert from counting prime powers (with weights) to counting only primes is to use the fact that
\begin{align*}
\Pi^*(x;q,a) &= \sum^*_{\substack{p\le x \\ p\equiv a\pmod q}} 1 + \sum^*_{\substack{p^2\le x \\ p^2\equiv a\pmod q}} \tfrac12 + \sum^*_{\substack{p^3\le x \\ p^3\equiv a\pmod q}} \tfrac13 + \cdots \\
&= \pi^*(x;q,a) + \tfrac12 \sum_{\substack{b\pmod q \\ b^2\equiv a\pmod q}} \pi^*(x^{1/2};q,b) + \tfrac13 \sum_{\substack{c\pmod q \\ c^3\equiv a\pmod q}} \pi^*(x^{1/3};q,c) + \cdots
\end{align*}
and solving for $\pi^*(x;q,a)$ in terms of all $\Pi^*$ functions (tedious but possible).