Below is an approach I've been exploring for connecting the prime counting function with the logarithmic integral and expressing the error term between the two. I find it beguiling, but I've largely run out of ideas for further developing this approach.

Hence this question. What I'd really, really appreciate is either 1) references to papers or research covering the general space of ideas I'm exploring here, 2) an explanation for why this approach is going to be a dead end, or especially 3) ideas for manipulating or further exploring my equation (4) below that I might have overlooked. [Edit]I'm specifically interested in techniques I might be unfamiliar with from the study of the divisor summatory function $D_k$, which is at the heart of (4). [End Edit]

**Preliminary**

Start by summing Linnik's identity from 2 to n.

$\displaystyle\sum_{j=2}^n 1 - \frac{1}{2}\sum_{j=2}^n \sum_{k=2}^{\lfloor\frac{n}{j}\rfloor} 1 + \frac{1}{3}\sum_{j=2}^n \sum_{k=2}^{\lfloor\frac{n}{j}\rfloor}\sum_{l=2}^{\lfloor\frac{n}{j k}\rfloor} 1 - \frac{1}{4}...=$
$\pi(n) + {\frac{1}{2}}\pi(n^{\frac{1}{2}}) + {\frac{1}{3}}\pi(n^\frac{1}{3})+...$

(1)

where $\pi(n)$ is the prime counting function. The nested sums on the left only need to be computed up to a depth of $\log_2 n$ before they start equalling 0.

Next, approximate the left hand side by replacing sums with integrals, starting integration at 1 rather than 2, and removing floor functions from upper bounds. This immediately gives the logarithmic integral.

$\displaystyle\int_{1}^n dx - \frac{1}{2}\int_{1}^n \int_{1}^{\frac{n}{x}} dy dx + \frac{1}{3}\int_{1}^n \int_{1}^{\frac{n}{j}}\int_{1}^{\frac{n}{x y}} dz dy dx - \frac{1}{4}... = li(n) - \log\log n - \gamma$

(2)

where $li(n)$ is the logarithmic integral and $\gamma$ is the Euler-Mascheroni constant. (You can find a fairly straightforward sketch of the derivations of both (1) and (2) here)

Now, Riemann's explicit formula for the prime counting function, with a touch of term rearrangement and with $\rho$ the Zeta Zeroes, is of course

$li(n) - \pi(n) - {\frac{1}{2}}\pi(n^{\frac{1}{2}}) - {\frac{1}{3}}\pi(n^\frac{1}{3})-...=\displaystyle\sum_{\rho} li(n^\rho) + \log 2 - \int_x^{\infty}\frac{dt}{t(t^2-1)\log t}$

(3)

**Question**

Define the following $O( \log \log n)$ function

$E(n) = \log 2 - \int_n^{\infty}\frac{dt}{t(t^2-1)\log t} + \log \log n + \gamma$

Then, applying both (1) and (2) to (3) gives

$\displaystyle \sum_{\rho} li(n^\rho) + E(n) =$

$\displaystyle - \frac{1}{2}(\int_{1}^n \int_{1}^{\frac{n}{x}} dy dx - \sum_{j=2}^n \sum_{k=2}^{\lfloor\frac{n}{j}\rfloor} 1 )$

$\displaystyle+ \frac{1}{3}(\int_{1}^n \int_{1}^{\frac{n}{j}}\int_{1}^{\frac{n}{x y}} dz dy dx - \sum_{j=2}^n \sum_{k=2}^{\lfloor\frac{n}{j}\rfloor}\sum_{l=2}^{\lfloor\frac{n}{j k}\rfloor} 1)$

$\displaystyle- \frac{1}{4}(\int_{1}^n \int_{1}^{\frac{n}{j}}\int_{1}^{\frac{n}{x y}}\int_{1}^{\frac{n}{x y z }} dw dz dy dx - \sum_{j=2}^n \sum_{k=2}^{\lfloor\frac{n}{j}\rfloor}\sum_{l=2}^{\lfloor\frac{n}{j k}\rfloor}\sum_{m=2}^{\lfloor\frac{n}{j k l}\rfloor} 1)$

$\displaystyle +\frac{1}{5}...$

(4)

*So here is, really, my main question*: can anything interesting be done with the right hand side of (4)? I've largely hit a dead-end here.

[Edit] What I'm looking for especially is any smart ideas about different ways of working with, or breaking up, or transforming those various nested sums, particular in ways that might take advantage of symmetries or connections between them.

As Eric Naslund mentions in his equation (2) below, these nested sums are closely related to, and can be expressed in terms of, the divisor summatory function. As a consequence, this opens up the door to the possibility of applying Voronoi summation or the Dirichlet Hyperbola method in connection with these nested sums, for example. I'm curious if there are any other smart techniques from the study of the divisor summatory function that might be brought to bear on (4). [End Edit]

**Extra**

I have explored, a bit, one approach with (4), to inconclusive results.

The following are all equal

$\displaystyle\sum_{j=2}^n \sum_{k=2}^{\lfloor \frac{n}{j} \rfloor} 1 = \sum_{j=2}^n \lfloor \frac{n}{j} \rfloor - 1 = \sum_{j=2}^n \frac{n}{j} - 1 - \sum_{j=2}^n ${$\frac{n}{j}$}

where {n} is the fractional part function. This approach can be generalized to arbitrary depths of nested sums. $\sum_{j=2}^n \frac{n}{j} - 1$ and its generalization appear to be relatively smooth curves, capable of relatively tight approximation, or that's my hunch based on empirical results. Anyway, relying on this, (4) can be rewritten as

$\displaystyle \sum_{\rho} li(n^\rho) + E(n) =$

$\displaystyle - \frac{1}{2}(\int_{1}^n \int_{1}^{\frac{n}{x}} dy dx - (\sum_{j=2}^n \frac{n}{j} - 1) + \sum_{j=2}^n ${$\frac{n}{j}$})

$\displaystyle+ \frac{1}{3}(\int_{1}^n \int_{1}^{\frac{n}{j}}\int_{1}^{\frac{n}{x y}} dz dy dx - (\sum_{j=2}^n \sum_{k=2}^{\lfloor\frac{n}{j}\rfloor}\frac{n}{j k} - 1) + \sum_{j=2}^n \sum_{k=2}^{\lfloor\frac{n}{j}\rfloor}${$\frac{n}{j k}$})

$\displaystyle- \frac{1}{4}(\int_{1}^n \int_{1}^{\frac{n}{j}}\int_{1}^{\frac{n}{x y}}\int_{1}^{\frac{n}{x y z }} dw dz dy dx - (\sum_{j=2}^n \sum_{k=2}^{\lfloor\frac{n}{j}\rfloor}\sum_{l=2}^{\lfloor\frac{n}{j k}\rfloor}\frac{n}{jkl}-1) + \sum_{j=2}^n \sum_{k=2}^{\lfloor\frac{n}{j}\rfloor}\sum_{l=2}^{\lfloor\frac{n}{j k}\rfloor}${$ \frac{n}{jkl} $})

$ \displaystyle +\frac{1}{5}...$

(5).

If you sum up just the terms that look like $\sum_{j=2}^n \frac{n}{j} - 1$, you get a smooth curve that bears a strong resemblance to the Logarithmic Integral - you can see part of it here. I'm very curious how to approximate these terms, and what relationship they bear to the logarithmic integral. So that's another question of mine.

Finally, if you sum up just the fractional part sums in (5), you get this function. At least empirically, it appears that all the discontinuities of $\sum_\rho li(n^\rho)$ are confined to just these terms. All of which leads to my final question - are there any interesting tools or approaches that can be applied to these fractional part sums to make any interesting observations?

I hope this question isn't too vague or broad for MO.

somehow... or so I remain convinced, anyway. $\endgroup$