The entire point to this discussion is, “How do we estimate the distribution of the prime numbers?”

At one stage, I’d gotten into the idea of the prime counting functions, psi(x) and pi(x). pi(x) physically counts the primes less than x, and is approximated by pi(x) = x/ln(x). And psi(x) is a weighted summation of the powers of the primes. psi(x) = T2*ln(2) + T3*ln(3) + T5*ln(5) + T7*ln(7)… I.e. – psi(10) = 3*ln(2) + 2*ln(3) + ln(5) + ln(7) = 7.830 (there are three powers of 2 – 2, 4, 8; two powers of 3 – 3, 9; and one each of 5 and 7). As x gets larger, psi(x) approaches x, and pi(x) approaches x/ln(x). Therefore, psi(x) approaches pi(x)*ln(x).

der Veen and de Craats give a more accurate equation, called the “Explicit Formula for psi(x),” without going into the details for how Riemann derived it, or how von-Mangoldt simplified it. The details can be found in the wiki article.

Although psi(x) gets close to x as x goes to infinity, there is some error that can be accounted for through a correction factor. In this case, ln(2*pi) just shifts the diagonal line y = x down by 1.83787… If x is greater than 1,000, then this term can effectively be ignored.

The third term is a summation of all the zeros of the zeta function, both the trivial and non-trivial ones. If we separate them out, as follows,

as the summation of all the trivial zeros (x raised to the trivial zero divided by that zero; i.e. x^(-2)/(-2) + x^(-4)/(-4) + x^(-6)/(-6)…), and the summation of all the non-trivial zeros.

If we go back to the series expansion for ln(1 + y),

ln(1 + y) = y – (y^2)/2 + (y^3)/3 – (y^4)/4 + (y^5)/5…

plugging in y = -1/x^2 and multiplying both sides by 1/2 gives:

1/2 * ln(1 – 1/x^2) = 1/2 * ( -1/(x^2) – 1/(2*x^4) – 1/(3*x^6) – 1/(4x^8)…

= (x^-2)/(-2) + (x^-4)/(-4) + (x^-6)/(-6) + (x^8)/(-8)…

recognizing that this last form is the summation of the trivial zeros,

the trivial summation can be simplified as:

1/2 * ln(1 – 1/x^2).

If x = 50, then x^2 = 2,500, and 1 – 1/2500 = 0.9996.

-1/2*ln(0.9996) = 0.0002

Which is very small, and goes to 0 fast as x gets bigger. Therefore, the ln(2 * pi) and the 1/2 * ln(1 – 1/x^2) terms can be ignored as x goes to infinity (they total less than 2). They are needed to get the exact value of psi(x), but it’s pretty obvious that the main contribution to psi(x) is from the non-trivial zeros.

-1.837877… + 0.0002 = -1.837677…

If x = 50, and psi(x) approximates x, then the contribution from -ln(2*pi) – 1/2*ln(1 – 1/x^2) is only 3.67%

(The sum of the trivial zeros goes to zero pretty fast.)

Since what we’re really interested in is the distribution of prime numbers over 100 digits long, we can ignore the correction factors and just focus on the term with the non-trivial zeros.

—

The next step is referred to as pairing up the non-trivial zeros. Because the explicit formula is a sum of ALL the non-trivial zeros, we need to look at the ones in the negative half of the complex plane (b*i < 0) as well as those in the positive half (b*i > 0). We can do this by pairing them up and looking at the angle they form. (Note, I’m using mirror() here to represent the mirror value of a complex number.)

If u = v + iw is a zero, then so is mirror(u) = v – iw

The summation of the non-trivial zeros is in the form of -(x^p)/p, so adding our zero “u” and mirror(u) is going to look like:

eq. 1) -(x^u)/u – (x^mirror(u))/mirror(u) = -(2/|u|) * (x^v) * cos(w*ln(x) – a)

And we do this for all of the non-trivial zeros.

(|u| is the absolute value of u.)

Now, the thing that’s interesting about this pairing is it’s independent of the opposite mirror: 1 – v. That is, while we’re pairing v + bw up with v – bw, we need to make a separate pairing of 1 – v + wi with 1 – v – wi.

Why is this important? Because it gives us 4 zeros, not 2.

But, Riemann’s hypothesis says that all of the zeros are on the critical line, so we should only have 2 matching zeros, not 4, and v would = 1/2 in all cases. This simplifies the math, as well as minimizing the impact of the non-trivial zeros on the explicit formula for calculating psi(x). If the hypothesis fails, this double pair is going to have twice as much weight as the zeros that are on the critical line.

Ok, so what do these paired non-trivial zeros look like?

The easiest way to find out is to break eq. 1 down into individual components.

u = v + iw

|u| = sqrt(v^2 + w^2)

a = atan(2*w/(2*v)) = atan(2*w) (for v = 1/2)

Then, what are v and w?

They’re the zeros for the zeta function. I’ve already stated that all the zeros that have been found so far lie on the critical line, so v = 1/2. I’ve calculated the stats for the first 10 zeros in Excel. As the zeros get bigger, “a” gets closer to pi/2 = 1.570796

Then, what I did was to set up a spreadsheet where x runs from 1 to 100 in 0.2 increments in the F column. vk is in the A column, wk in the B column, |uk| is in the C column, and ak (atan(2*wk)) is in the D column.

G column is then the paired non-trivial zero equation:

=(2/$C$2)*POWER($F2,$A$2)*COS($B$2*LN($F2) – $D$2)

And, for the first non-trivial zero (0.5 + i*14.13457), the graph for x = 1 to 100 is:

The 10th zero is at 0.5 + 49.77383, and the graph is:

Summing the results of the first 10 zeros and subtracting from x, for x = 1 to 100, gives the following graph, which is plotted along with psi(x). Remember that psi(x) counts the powers of each prime (i.e. -> 2, 4, 8, 16, 32, 64) from 1 to x, and sums the weighted primes as:

psi(x) = T2*ln(2) + T3*ln(3) + T5*ln(5) + T7*ln(7)

where, if x=10, T2=3, T3=2, T5=1 and T7=1

This is just for the first 10 zeros. Adding all the other known zeros to infinity creates a step function that is a near-perfect match for psi(x).

Where does this leave us? Well, we know that the Riemann zeta function can be extended to the entire complex plane, with the exception of x = 1. We know that the zeros for the zeta function lie in the critical strip 0 < x < 1, that the zeros can be paired up in the explicit formula for psi(x), and that the known non-trivial zeros lie on the critical line x = 1/2, which is covered by the eta(x) function. If we plug the known zeros into the explicit formula and subtract this from x we get psi(x), which is a prime counting function that physically does count the prime powers and is then a weighted sum of those powers from 2 to x.

Actually, there are two things left I want to deal with. Creating an Excel file for confirming the first few known zeros, and addressing why having a zero that is not on the critical line messes everything up.