i have posted this question on MO, and they referred me to post here . one starts with the formal definition of zeta :
$$\displaystyle \zeta (s)=\prod_{p}\frac{1}{1-p^{-s}} $$
then : $ \ln(\zeta (s))= -\sum_{p}\ln(1-p^{-s})=\sum_{p}\sum_{n=1}^{\infty}\frac{p^{-sn}}{n}$
using the trick : $\displaystyle p^{-sn}=s\int_{p^{n}}^{\infty}x^{-s-1}dx $
then :
$$ \frac{\ln\zeta (s)}{s} = \sum_{p}\sum_{n=1}^{\infty}\int_{p^{n}}^{\infty}x^{-s-1}dx$$
up until now, things make perfect sense , but the following line is mysterious to me :
$$ \frac{\ln\zeta(s)}{s}=\int_{0}^{\infty}f(x)x^{-s-1}dx $$
where $f(x) $ is the weighted-prime counting function . how is this formula derived !?!?
Note, per my comment above, you left out a $\frac{1}{n}$ in the formula for $\frac{\log\zeta(s)}{s}$. It should have been:
$$\frac{\ln\zeta (s)}{s} = \sum_{p}\sum_{n=1}^{\infty}\frac{1}{n}\int_{p^{n}}^{\infty}x^{-s-1}dx$$
Re-arrange the sum as: $$\frac{\log{\zeta(s)}}{s}=\sum_{n=1}^\infty \frac{1}{n}\sum_p \int_{p^n}^\infty x^{-s-1}dx$$ Now, in general, for any function $g$: $$\sum_p \int_{p^n}^\infty g(x) dx = \int_0^\infty \pi(x^{1/n})g(x)dx$$
I'll leave that step to to you. So we get:
$$\frac{\log{\zeta(s)}}{s}=\sum_{n=1}^\infty \frac{1}{n}\int_0^{\infty} \pi(x^{1/n})x^{-s-1}dx = \int_0^\infty f(x) x^{-s-1}dx$$