Using Zeta Zeros to Compute the Chebyshev Psi Function

​
start x axis at (from 0 to 1000)
0
length of x axis (from 10 to 100)
30
pairs of ζ zeros (from 0 to 200)
0
always show estimate of ψ using no ζ zeros
display ψ values in a tooltip
Chebyshev's psi (
ψ
) function is important in number theory. It is defined as the logarithm of the least common multiple of the integers from 1 through
x
. The graph of
ψ(x)
is an irregular step function.
This Demonstration illustrates the remarkable fact that we can approximate the jumps of this step function by using a sum that involves zeros of the Riemann zeta function
ζ(s)
.

Details

Snapshot 1: the graphs of the step function
ψ(x)
and the formula using no zeta zeros
Snapshot 2: the graphs of
ψ(x)
and the formula using 30 pairs of zeta zeros
Snapshot 3: in order to hit the small jump in
ψ
at
x=128
, at least 70 zeta zeros are needed
ψ(x)
can be defined as
∑
p≤x

log
p
(x)log(p)
, where the sum is over the primes
p≤x
, and
⌊.⌋
denotes the floor function. For example,
ψ(10)=⌊
log
2
(10)⌋log(2)+⌊
log
3
(10)⌋log(3)+⌊
log
5
(10)⌋log(5)+⌊
log
7
(10)⌋log(7)
≃
⌊3.3⌋log(2)+⌊2.1⌋log(3)+⌊1.4⌋log(5)+⌊1.2⌋log(7)
=
3log(2)+2log(3)+log(5)+log(7)
=
log(
3
2
×
2
3
×5×7)=log(2520)
.
Note that 2520 is the least common multiple of the integers 1 through 10.
ψ(x)
behaves as follows: when
x
reaches a prime power
x=
k
p
, then
ψ(x)
increases by
log(p)
. After that,
ψ(x)
remains constant until
x
reaches the next prime power. This means the graph of
ψ(x)
is a step function that jumps up at powers of primes.
This Demonstration uses von Mangoldt's formula to calculate
ψ(x)
:
ψ(x)≃x-
′
ζ
(0)
ζ(0)
-2Re
N
∑
k=1
ρ
k
x
ρ
k
-
∞
∑
k=1
-2k
x
-2k
,
where
ρ
k
is the
th
k
complex zero of the Riemann zeta function. See[1] for general information about the
ψ
function. See p. 104 of[2] for a proof of this formula.
′
ζ
(0)/ζ(0)
is a constant that simplifies to
log(2π)
, which is about 1.837877;
x
is the dominant term in the formula. It can be proven that as
x
approaches
∞
, the ratio
ψ(x)/x
approaches 1. This fact is equivalent to the prime number theorem, which states that as
x
approaches
∞
, the ratio
π(x)
x
log(x)
approaches 1, where
π(x)
is the number of primes less than or equal to
x
.
The first three complex zeros of the zeta function are approximately
1/2+14.135i
,
1/2+21.022i
, and
1/2+25.011i
. The zeros occur in conjugate pairs, so if
a+bi
is a zero, then so is
a-bi
. The important Riemann hypothesis is the unproven conjecture that all these complex zeros have real part 1/2. So far, it has been verified that the first
13
10
complex zeros do, indeed, have real part 1/2 (see[3]).
If you use the slider to choose, say, one pair of zeta zeros, then the first sum in the above formula, in effect, combines two terms corresponding to the first conjugate pair of zeta zeros
1/2+14.135i
and
1/2-14.135i
. So, when these terms are added, their imaginary parts cancel while their real parts add. The
2Re(…)
applied to the first sum is simply an efficient way to combine the two terms for each pair of zeta zeros.
Notice that the second sum has the same form as the first, except that the second sum extends over the so-called "trivial" zeros of the zeta function, namely,
-2k=-2,-4,-6,…
. The second sum is small when
x
is large.
All known zeta zeros have multiplicity 1, which is assumed in the formula. At those values of
x
where
ψ(x)
jumps from
y=a
to
y=b
, the formula converges to the midpoint,
y=(a+b)/2
, as
N
approaches infinity. You can see this in the graphs.
As we include more zeta zeros in the first sum, we more closely replicate the jumps in the step function
ψ(x)
. Since
ψ
jumps up by
log(p)
at powers of the prime
p
, this means that the zeta zeros contain information about which numbers are primes or powers of primes.
In Mathematica notation,
ψ(x)
can be written as psi[x_] := Sum[Floor[Log[Prime[k], x]] Log[Prime[k]], {k, 1, PrimePi[x]}].
In number theory, the von Mangoldt lambda function
Λ(n)
is defined as follows: If
n
is a power of a prime, say
k
p
, where
k≥1
, then
Λ(n)
is defined as
log(p)
. For other values of
n
,
Λ(n)
is 0. Using the von Mangoldt
Λ
function, we can also write
ψ(x)
as
ψ(x)=
∑
p≤x
Λ(n)
.
The von Mangoldt
Λ
function was introduced in Version 7 of Mathematica. Using this function,
ψ(x)
can be written more simply as psi[x_]:= Sum[MangoldtLambda[n], {n, 1, x}].

References

[1] Wikipedia, "Chebyshev Function."
[2] H. Davenport, Multiplicative Number Theory, 3rd ed., New York: Springer, 2000.
[3] X. Gourdon, "The 10^13 First Zeros of the Riemann Zeta Function, and Zeros Computation at Very Large Height."

External Links

Chebyshev Functions (Wolfram MathWorld)
Riemann Zeta Function Zeros (Wolfram MathWorld)
How the Zeros of the Zeta Function Predict the Distribution of Primes
Using Zeta Zeros to Count the Squarefree Integers
Using Zeta Zeros to Compute a Summatory Liouville Function
Using Zeta Zeros to Compute the Mertens Function
Using Zeta Zeros to Tally the Euler Phi Function

Permanent Citation

Robert Baillie
​
​"Using Zeta Zeros to Compute the Chebyshev Psi Function"​
​http://demonstrations.wolfram.com/UsingZetaZerosToComputeTheChebyshevPsiFunction/​
​Wolfram Demonstrations Project​
​Published: March 7, 2011