# Summing over General Functions of Primes and an Application to Prime $\zeta$ Function

Along the lines of thought given here, is it in general possible to substitute a summation over a function $f$ of primes like the following: $$\sum_{p\le x}f(p)=\int_2^x f(t) d(\pi(t))\tag{1}$$ and further $$\int_2^x f(t) d(\pi(t))=f(t)\pi(t)\biggr|_2^{x}-\int_2^{x}f'(t)\pi(t)dt\tag{2}.$$

If it's possible only for some cases, how can one specify them? answered in the comments

Let's continue from $(2)$ with an representation of the prime counting function: $$\pi(t) = \operatorname{R}(t^1) - \sum_{\rho}\operatorname{R}(t^{\rho}) \tag{3}$$ with $\operatorname{R}(u) = \sum_{n=1}^{\infty} \frac{ \mu (n)}{n} \operatorname{li}(u^{1/n})$ (the so-called Riemann's ${\rm R}$ Function, see e.g. $(11)$ here) and $\rho$ running over all the zeros (trivial and non-trivial) of $\zeta$ function. $\operatorname{li}(\cdot)$ is the logarithmic integral.

So we have $$\begin{eqnarray} &=&f(t)\pi(t)\biggr|_2^{x}-\int_2^{x}f'(t)\pi(t)dt\\ &=&f(t)\left(\operatorname{R}(t^1) - \sum_{\rho}\operatorname{R}(t^{\rho})\right)\biggr|_2^{x} -\int_2^{x}f'(t)\left(\operatorname{R}(t^1) - \sum_{\rho}\operatorname{R}(t^{\rho})\right)dt \phantom{somemorerspace}\\ &\phantom{AA}&\\ &=&\sum_{n=1}^{\infty}\frac{ \mu (n)}{n}\Big\{\left[f(t)\left( \sum_{z\in\{1,\rho\}} (-1)^{1-\delta_{1z}} \operatorname{li}(t^{z/n})\right)\right]_2^{x}\\ &&- \int_2^{x}f'(t)\left( \sum_{z\in\{1,\rho\}} (-1)^{1-\delta_{1z}} \operatorname{li}(t^{z/n})\right)dt\Big\}\\ &\phantom{AA}&\\ &=&\sum_{n=1}^{\infty}\frac{ \mu (n)}{n}\sum_{z\in\{1,\rho\}}(-1)^{1-\delta_{1z}}\left\{\left[f(t)\left( \operatorname{li}(t^{z/n})\right)\right]_2^{x} - \int_2^{x}f'(t)\left( \operatorname{li}(t^{z/n})\right)dt\right\}\hskip0.9in(4) \end{eqnarray}$$ where I tried to combine the sum a little without introducing to much confusion by using $$(-1)^{1-\delta_{1z}}= \cases{ +1& \text{if } z=1\\ -1& \text{if } z=\rho\\ }$$

Now, what if we just take an approximation $\tilde{\pi}(t)$, where the sums over $n$ and $\rho$ are truncated. Is this approach still valid? I'm worried because $\tilde{\pi}(t)$ might not be monotone, which is a prerequisite of the Lebesgue-Stieltjes integration. Let's work out the last integral, by parts: We use $$\int_2^{x}f'(t) \operatorname{li}(t^{w})dt =\left[ f(t)\operatorname{li}(t^{w}) \right]_2^x - \int_2^x \frac{f(t)wt^{w-1}}{\ln(t^w)}dt \tag{5}$$ which gives a nice result when $f(t)=t^{-s}$, see here: $$\int_2^{x}(-st^{-s-1}) \operatorname{li}(t^{w})dt =\left[ t^{-s}\operatorname{li}(t^{w}) \right]_2^x - \int_2^x \frac{t^{-s}t^{w-1}}{\ln(t)}dt =\left[ t^{-s}\operatorname{li}(t^{w}) \right]_2^x - \left[{\rm li}(t^{w-s})\right]^x_2.$$

So overall we get $$\sum_{n=1}^{\infty}\frac{ \mu (n)}{n}\sum_{z\in\{1,\rho\}}(-1)^{1-\delta_{1z}}\left\{\left[f(t) \operatorname{li}(t^{z/n})\right]_2^{x}- \left[ f(t)\operatorname{li}(t^{z/n}) \right]_2^x +\int_2^x \frac{zf(t)t^{z/n-1}}{n\ln(t^{z/n})}dt \right\}\\ =\sum_{n=1}^{\infty}\frac{ \mu (n)}{n}\sum_{z\in\{1,\rho\}}(-1)^{1-\delta_{1z}}\left\{\int_2^x \frac{f(t)t^{z/n-1}}{\ln(t)}dt \right\}\tag{6}\\$$ and in the special case $f(t)=t^{-s}$ this simplifies to $$P_\color{red}x(\color{blue}s)=\sum_{p<\color{red}x} \frac{1}{p^s} =\sum_{n=1}^{\infty}\frac{ \mu (n)}{n}\sum_{z\in\{1,\rho\}}(-1)^{1-\delta_{1z}} \left[ {\rm li}(t^{\frac zn-\color{blue}s}) \right]^{\color{red}x}_2 \tag{7}$$

(for the interested reader: the story continues here...)

If anybody could confirm this, it would be ever so cool.

Thanks for your help and your time for reading all this,

• Under some mild conditions on $f$ and assuming that $\pi(t)$ is right-continuous, i.e. $$\pi(t) = \#\{\text{primes }p:p\leq t\}$$ the integral here is well-defined in the Lebesgue-Stieltjes sense. See the integration by parts formula in the linked article. – Ilya Mar 1 '12 at 11:57
• @Ilya Thanks a lot. A $\displaystyle\lim_{x\to\infty}$ in front of the sum/integral would also not hurt, I think/hope? – draks ... Mar 1 '12 at 14:17
• I'm not sure I understand you. If you mean $$\lim\limits_{x\to\infty}\sum\limits_{p\leq x}f(p) = \lim\limits_{x\to\infty}\int\limits_0^tf(t)d\pi(t)$$ then it holds: you have just both functions the same at each $x\geq 1$. Provided that, say $f(t)$ is finite and measurable on any interval $[1,x]$ – Ilya Mar 1 '12 at 14:23
• Ok, there are different kinds of integrals but the wast majority of them agrees that $\int_0^t f(s)\mathrm dg(s)$ exists at least whenever $f$ is continuous, $g$ is $C^1$. Moreover, the also give the same value to this integral. – Ilya Jan 14 '13 at 10:25
• @draks...$$\sum_{p\leq n}f(p)=\sum_{k=1}^n\omega(k) \sum_{j=1}^{[\frac{n}{k}]}f(jk)\mu(j)$$ – Ethan Jan 19 '13 at 5:47

If your function $f$ is smooth and compactly supported then the formula you are looking for already exists, and is called the "explicit formula". See for example Lemma 1 in http://arxiv.org/abs/math/0511092.
If you want to apply this lemma in the direction "primes to zeros" then you should "swap the hats" over $h$. Basically, once you have specified $\hat{h}$ to be a smooth compact function of your choice, the resulting function $h$ will be entire and you will be able to apply the lemma 1 to $h$, getting the desired formula a sum over the primes weighted by $\hat{h}$.
• hmm, so you say that i. $f$ could be $t^{-s}$ and ii. $(-1)^{1-\delta_{1z}} \left\{ \left[ {\rm li}(t^{\frac zn-\color{blue}s}) \right]^{\color{red}x}_2 -\left[t^{-\color{blue}s}\operatorname{li}(t^{\frac zn}) \right]_2^\color{red}x \right\}$ corresponds to $h$ right? If not could you work it out a bit, please? and +1 for the ref. – draks ... Jan 18 '13 at 11:38
An effective form of the Riemann explicit formula is $$\psi(n+1/2) =\sum_{p^k \le n+1/2} \log p = n+1/2- \sum_{|\Im(\rho)| < T} \frac{(n+1/2)^\rho}{\rho}-\log 2\pi + \mathcal{O}(\frac{n \log n}{T})$$ (where $n+1/2$ is for avoiding the Gibbs phenomenom at integer values)
Thus $$\sum_{p^k \le N} f(p^k) \log p = \sum_{n = 1}^N f(n) (1- \sum_{|\Im(\rho)| < T} \frac{(n+1/2)^\rho-(n-1/2)^\rho}{\rho}) + \mathcal{O}(\sum_{n=1}^N |f(n)|\frac{n \log n}{T})$$ The same idea can be adapted to explicit formulas for $J(x) = \sum_{p^k \le x} \frac{1}{k}$ and $\pi(x) = \sum_{p \le x } 1 = \sum_{m=1}^x \frac{\mu(m)}{m} J(x^{1/m})$
Summing by parts you'll improve the error term to $\mathcal{O}( |f(N)|\frac{N \log N}{T})+\mathcal{O}(\sum_{n=1}^N |f(n)-f(n+1)|\frac{n \log n}{T})$