We've spent a great deal of time looking at $\Pi(n)$ variations.
That's true. There seems to be quite a few of them. They are rather thick on the ground.
It might surprise you to learn, then, that the function is largely neglected by practicing mathematicians.
Really? It seems like the definitions we've been exploring are pretty natural in some sense, don't they? All these variations have fallen out without much work, anyway.
I think that's true. Still, working mathematicians have some technical reasons to prefer a different function when it comes to the distribution of primes.
Fine. What function is that?
Let me introduce it in the way I've introduced all our other variants, because it has a familiar form. So let's return to our basic prime counting function. As before, we have
Right, right.
Are we going to introduce yet another helper function?
Not this time. The change will be slightly deeper, but only slightly. In our recursive definition, instead of adding $\frac{1}{k}$, we add $\log j$. So there you go. That's it. That's the change (and that means $k$ is no longer used). So this definition looks like this.
Huh. That really does look very similar... So what exactly does this new function do?
Well, let's take a look.
So now, what behavior should I be looking for here?
I'm sure you could puzzle that out for yourself, but I don't want to dwell on any of this too long. So I'll cut to the chase. When we first started talking, you might remember that our weighted prime counting function could be written as $$\Pi(n) = \sum_{j=1} \frac{\Lambda(j)}{\log j}$$ where $\Lambda(j)$ is the Von Mangoldt function.
That sounds familiar.
Well, our new function here is very, very closely related. It is a different weighted prime power counting function, $$\psi(n) = \sum_{j=1} \Lambda(j)$$ And here, $\psi(n)$ is called the Chebyshev function.
If you want to get a sense of how this idea operates, here's another animation of the recursive function in action.
Okay, I think I follow, or I do enough. But why do mathematicians prefer it?
Well, here's one reason. You remember, I'm sure, the effort we put into comparing $\Pi(n)$ to the logarithmic integral $\mathrm{li}(n)$. And the logarithmic integral is, itself, not exactly a trivial function to reason about.
Sure, that's seems right.
In the graph above, did you notice what function seems to approximate $\psi(n)$?
Actually, just from animating the graph there, it seems like the simple function $y=x$ looks like a good approximation of $\psi(x)$.
Exactly. In fact, if we graph the difference between the two, it looks like this:
Okay. Is that the main reason it's preferred, then?
Well, let me say a bit more about it.
As I understand it, the main reason for the preference for $\psi(n)$ has to do with important issues arising in complex analysis.
Like what?
Well, I won't cover them in too much detail, as doing so would itself require more discussion about complex analysis. But basically, there is an important way that $\Pi(n)$ is connected to $\log \zeta(s)$, and there is likewise an important way that $\psi(n)$ is connected to $\frac{\zeta'(s)}{\zeta(s)}$. In fact, you get $\frac{\zeta'(s)}{\zeta(s)}$ if you take the derivative of $\log \zeta(s)$ with respect to $s$ - it's called the logarithmic derivative - and so it inherits all sorts of properties and ideas from $\log \zeta(s)$. Many of the ideas we've explored in this discussion have equivalent forms in a logarithmic derivative context. Anyway, as a practical matter, in complex analytic terms, $\frac{\zeta'(s)}{\zeta(s)}$ is much better behaved and easier to work with; the $\log$ function introduces all sorts of trouble.
Huh. I see.
Anyway, because of that, it is much easier to produce a formula expressing the difference between $\psi(x)$ and $x$ using standard complex analytic techniques. And the resulting formula is likewise much easier to work with, as it doesn't rely on any special functions like exponential integrals. As a practical matter, even something as simple as making animations of this function is consequentially much easier. And so that explicit formula, which is also expressed in terms of the Riemann zeta zeros $\rho$, is $$ \psi(x) - x = -\log 2 \pi - \frac{1}{2} \log(1-\frac{1}{x^2})- \rr{\sum_{\rho} \frac{x^\rho}{\rho}} $$ And once again, all terms aside from the red sum are essentially negligible. So that sum over zeta zeros is basically the difference between $\psi(x)$ and $x$.
So this is an alternate way to express the Riemann hypothesis again, right?
Right. The mechanics here are essentially the same as our previous exploration of this topic; if the Riemann hypothesis is true, the high frequency red line below will stay bounded by the following two curves for any $x$, meaning the count of primes is as well behaved as we could hope.
Is there anything else you'd like to note about this topic?
I mentioned that many of the weighted prime power counting variations we worked through had equivalents here. Generally, most of those relationships don't seem like they warrant to much special attention.
Okay.
With that said, I will draw attention to $\psi(n)$ equivalents for smoothing and the generalized alternating series. But I will cover this quickly.
Go ahead.
So, if we take our definition from above and generalize it by introducing a real parameter $d$ like so, then we will find that we have two important variations, our original $$ \lim_{d \to 1} g(n,1+d) = \psi(n) $$ and then our smoothed version $$ \lim_{d \to 0} g(n,1+d) = n - \log n - 1 $$
And so we immediately see the connection between $\psi(n)$ and $n$, and this mirrors the previously smoothing approach.
Exactly.
Also just as before, we can build a version around generalized alternating series. If we define the following helper function, $$\tau_{\rr{d}}(n)=(\lfloor n\rfloor -\lfloor n-{\rr{d}}\rfloor )-(1+{\rr{d}}) \left(\left\lfloor \frac{n}{1+{\rr{d}}}\right\rfloor -\left\lfloor \frac{n-d}{ 1+{\rr{d}}}\right\rfloor \right)$$ then, assuming $d=\frac{1}{k}$ where $k$ is a whole number, we can write the new variation as with initial conditions $g(n,1+d)$
So this mirrors the approach from before too, then?
It does. With that definition, we will find that $$ g(n,1+d) = \psi(n) - \log (1+d) \cdot \sum _{k=1}^{\log _{1+d}n} (1+d)^k $$ If we apply a limit to that last sum, we will also find that $$ \lim_{d \to 0} \log (1+d) \cdot \sum _{k=1}^{\log _{1+d}n} (1+d)^k = n -1$$ and so finally we arrive at an expression for the difference between $\psi(n)$ and $n$ as $$ \lim_{d \to 0} g(n,1+d) = \psi(n) - n+1 $$
And we don't have to correct this limit to make it converge, as we did in the other case?
We do not. In fact, that's a subtle example of why this style of prime counting is preferred.
Okay. So does this new identity connect to our other methods of weighted prime counting? You just said that it does connect to the Riemann zeta function, right?
It does. Let me show these connection briefly. Our original prime counting function looked like this: $$f_k(n,j) = \frac{1}{k}-f_{k+1}(\frac{n}{j},2) + f_k (n, j+1)$$ And to connect it to the Riemann zeta function previously, we generalized it with a complex parameter $s$ as $$f_k(n,j) = \rr{j^{-s} \cdot (}\frac{1}{k}-f_{k+1}(\frac{n}{j},2)\rr{)} + f_k (n, j+1)$$
Sure. We've done this several times now.
And then, with a bit of rearrangement and an aggressive unrolling of sums, we had $$\sum_{j=2}^n \frac{\Lambda(j)}{\log j} \cdot j^{-s}=\sum_{ {j_1}=2}^n { {j_1}^{-s}}- \frac{1}{2} \sum_{ {j_1}=2}^n \sum_{ {j_2}=2}^{\lfloor \frac{n}{ {j_1}} \rfloor} ({j_1} \cdot {j_2})^{-s}+ \frac{1}{3} \sum_{ {j_1}=2}^n \sum_{ {j_2}=2}^{\lfloor \frac{n}{ {j_1}} \rfloor} \sum_{ {j_3}=2}^{\lfloor \frac{n}{ {j_1} \cdot {j_2}} \rfloor} ( {j_1} \cdot {j_2} \cdot {j_3})^{-s}- ...$$
Right. None of that is new. Previously, our next step was to take the limit as $n \to \infty$, and that immediately got us our connection to $\log \zeta(s)$ as $\log \zeta(s) = \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k} (\zeta(s)-1)^k$.
Correct. Well now, instead of going down that road, we'll take our unrolled sums there, and we'll apply a derivative with respect to $s$. $$\begin{aligned} \sum_{j=2}^n \Lambda(j) \cdot j^{-s} = & \sum_{ {j_1}=2}^n \log j_1 \cdot { {j_1}^{-s}} \\ - & \frac{1}{2} \sum_{ {j_1}=2}^n \sum_{ {j_2}=2}^{\lfloor \frac{n}{ {j_1}} \rfloor} (\log j_1 + \log j_2)({j_1} \cdot {j_2})^{-s} \\ + & \frac{1}{3} \sum_{ {j_1}=2}^n \sum_{ {j_2}=2}^{\lfloor \frac{n}{ {j_1}} \rfloor} \sum_{ {j_3}=2}^{\lfloor \frac{n}{ {j_1} \cdot {j_2}} \rfloor} (\log j_1 + \log j_2+ \log j_3)( {j_1} \cdot {j_2} \cdot {j_3})^{-s} \\ - & ... \end{aligned} $$
Huh. Okay, I can see the Chebyshev function $\psi(n)$ emerge immediately to the left of the equals sign, if $s=0$. But what is going on with the right?
Well, because those $\log j_k$ terms are added together rather than being multiplied, we can separate them out. And then we have the freedom to reindex them to all use the same loop index, which we can in turn use to cancel out the leading coefficients. That gives us $$\begin{aligned}\sum_{j=2}^n \Lambda(j) \cdot j^{-s}= & \sum_{ {j_1}=2}^n \log j_1 \cdot { {j_1}^{-s}} \\ - & \sum_{ {j_1}=2}^n \sum_{ {j_2}=2}^{\lfloor \frac{n}{ {j_1}} \rfloor} \log j_2 \cdot ({j_1} \cdot {j_2})^{-s} \\ + & \sum_{ {j_1}=2}^n \sum_{ {j_2}=2}^{\lfloor \frac{n}{ {j_1}} \rfloor} \sum_{ {j_3}=2}^{\lfloor \frac{n}{ {j_1} \cdot {j_2}} \rfloor} \log j_3 \cdot ( {j_1} \cdot {j_2} \cdot {j_3})^{-s} \\ - &... \end{aligned}$$ And then if we set $s=0$, we are left with $$\sum_{j=2}^n \Lambda(j) =\sum_{ {j_1}=2}^n \log j_1- \sum_{ {j_1}=2}^n \sum_{ {j_2}=2}^{\lfloor \frac{n}{ {j_1}} \rfloor} \log j_2+ \sum_{ {j_1}=2}^n \sum_{ {j_2}=2}^{\lfloor \frac{n}{ {j_1}} \rfloor} \sum_{ {j_3}=2}^{\lfloor \frac{n}{ {j_1} \cdot {j_2}} \rfloor} \log j_3- ...$$ It's just a touch more work from there to package this as $$ g(n,j)= \displaystyle \begin{cases} \log j -g(\frac{n}{j},2) + g(n, j+1) & n > j \\ 0 & \textrm{otherwise} \end{cases} $$ $$\sum_{j=2}^n \Lambda(j) = g(n,2)$$ which we used above.
Oh, okay. So it is connected, after all.
Right. And the relationship of $\frac{\zeta'(s)}{\zeta(s)}$ as the derivative of $\log \zeta(s)$ is a standard idea in the theory of the Riemann zeta function, too. So again, this is not out of left field.
Whew. Okay, I think we've covered a lot of ground, but I want to cover one last idea before drawing to a close.