Mertens function has, by residues, an explicit formula of

$M(n)=\displaystyle\sum_{\rho}\frac{x^\rho}{\rho\zeta'(\rho)}-2+\sum_{n=1}^\infty\frac{(-1)^{2 n}(2\pi)^{2n}}{(2n)! n \zeta(2n+1)x^{2n}}$

where $\rho$ are the zeros of $\zeta(s)$, as usual.

Meanwhile, if we use the following generalized identity for the number of divisors function, $d_z(n)=\displaystyle\prod_{p^\alpha | n}\frac{(z)(z+1)..(z+\alpha-1)}{\alpha!}$ (Aleksander Ivic provides this), it's not much work to see that the Moebius function $\mu(n)$ is equal to $d_{-1}(n)$, and, with $D_z(n) = \sum_{j=1}^n d_z(j)$, that $M(n) = D_{-1}(n)$. Which is to say, we can express $D_{-1}(n)$ in terms of the zeros of the zeta function.

Here's my question: is there an explicit formula, for the more general case of $D_z(n)$ for arbitrary z, that the explicit formula for $M(n)$ is a specialization of? Is there some way to express a general explicit formula for $D_z(n)$ in terms of zeta zeroes? Or could there be? Or if not, why not?

Here's motivation for this question:

I want to make a visual, intuitive argument here. Here's a tidy way to express $D_z(n)$ for complex z.

$\displaystyle P_k(n)=\sum_{j=2}^{n}\frac{\Lambda(j)}{\log j} P_{k-1}(\lfloor \frac{n}{j} \rfloor)$ with $P_0(n)=1$
where $\Lambda(j)$ is the Von Mangoldt function. Note by inspection that $P_k(n) = 0$ if $n < 2^k$.
Then our identity for a generalized $D_z(n)$ is
$\displaystyle D_z(n) = \sum_{k=0}^{\lfloor \log_2 n \rfloor}\frac{z^k}{k!}P_k(n)$

(p.28 of P. Bateman and H. Diamond's 2004 edition of “Analytic Number Theory – An Introductory Course” covers this general topic, though not this specific identity).

Now, use this identity to animate, in Mathematica, $\displaystyle\frac{(D_z(n)-1)}{z}$ over the range $z = -1$ to $z = 1$.

P[n_, k_] := P[n, k] = Sum[ MangoldtLambda[j]/Log[j] P[Floor[n/j], k - 1], {j, 2, n}];P[n_, 0] := 1
DD[n_, z_] := Sum[ z^k/k! P[n, k], {k, 0, Log[2, n]}]
Animate[DiscretePlot[ (DD[n, z] - 1)/z, {n, 1, 100}], {z, -1, 1, .01}]

What you'll see, if you watch this animation, is a graph of a function that starts at the function (1-Mertens Function) at z=-1, slowly transforms into the Riemann Prime Counting function right when z=0, and then finally transforms into a straight line, as f(x)=(x-1) at z=1 - all in all, a nice, gradual, fairly smooth transformation between those three important functions.

Now, we have an explicit formula in terms of zeta zeros when z=-1 (due to residues, as given above), and an explicit formula in terms of zeta zeros when z=0 (due to Riemann's original explicit formula for the Riemann Prime Counting function). Given the relatively smooth transition in the animation, it seems very tempting to me to think that there could be an explicit formula using the zeta zeros when $-1<z<0$, connecting these two formulas, or perhaps even more...but I realize it's only an appeal to visuals, of course.

A Few More Notes

As visualized above, $\displaystyle \lim_{z \to 0}\frac{D_z(n)-1}{z} = \Pi(n)$, the Riemann Prime Counting Function.

You can show this more easily by taking $d_z(n)=\displaystyle\prod_{p^\alpha | n}\frac{(z)(z+1)..(z+\alpha-1)}{\alpha!}$ and noting that $\displaystyle \lim_{z \to 0}\frac{d_z(n)}{z} = \frac{\Lambda(n)}{\log n}$ except at 1, where the limit is infinity.

There are a bunch of interesting ways to express a generalized $D_z(n)$. I've collected several such ways, with Mathematica demonstrations, on pages 7-11 of this non-rigorous document.

  • $\begingroup$ This question was also asked on Math StackExchange where there are additional answers that perhaps provide more insight: math.stackexchange.com/q/470914 $\endgroup$ Apr 26, 2018 at 21:57

1 Answer 1


The short answer is that, in all likelihood, a formula of the type you seek only exists if $z$ is a negative integer.

The way to approach a question like this is to first note that $\sum_{n=1}^{\infty} \frac{d_{z}(n)}{n^{s}} = \zeta(s)^{z}$, and by Perron's inversion formula, $$ \sum_{n \leq x} d_{z}(n) = \frac{1}{2 \pi i} \int_{2-i \infty}^{2 + i \infty} \frac{\zeta(s)^{z} x^{s}}{s} \, ds. $$ at least as long as $x$ is not an integer. The approach is then to attempt to move the contour to the left, use Cauchy's theorem and compute residues. There are a number of wrinkles, however. In fact, the formula for $z = -1$ which you quote is proven by Titchmarsh, and the reference you give states that additional assumptions are needed (the Riemann hypothesis, the simplicity of zeroes of $\zeta(s)$, and also that the limit of the partial sum of the terms involving the zeta zeroes is taken in a very specific and careful way).

I suspect it should be possible to play the same game if $z$ is another negative integer, under the same assumptions that Titchmarch used.

On the other hand if $z$ is a positive integer then $|\zeta(s)|$ will become large when ${\rm Re}(s)$ is negative, and this makes moving the contour a bad idea since the size of one of the contour integral pieces is large. This is (one the reasons) that the Dirichlet divisor problem is hard.

Now, if $z$ is not an integer, then $\zeta(s)^{z}$ isn't a meromorphic function anymore (for the same reason that $f(z) = \sqrt{z}$ isn't). This is discussed at some length in the passage you quote from Ivic, and indeed Theorem 14.9 from Ivic shows that no formula that is directly analogous to Titchmarsh's can exist for $\sum_{n \leq x} d_{z}(n)$ except in the unlikely event that all of the analytic functions $c_{1}(z), c_{2}(z), \ldots$ vanish.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.