This repository is a collection of R scripts that visually represent some of the concepts exposed in Derbyshire, J. (2004) using a numerical analysis approach.
Derbyshire, J. (2004) main objective is to show the connection between the distribution of primes and the zeros of the zeta function: this is the main result of Riemann's 1859 paper "On the number of primes less than a given Quantity" that also contains the unsolved Riemann Hypothesis.
A series is the sum of the terms of a sequence of numbers. The series is convergent if approaches a given number, otherwise divergent.
An example of convergent series is
A function is a relation between an input and a single output according to some rule.
Example of functions:
- a function whose rule is to count the number of factors for a given argument (referred also as d(N))
- a function whose rule is to count the number of prime factors for a given argument
The Prime Counting Function π(N), the central study of the Riemann's 1859 paper, is defined to be the number of primes up to N
The Prime Number Theorem (PNT) states
The log function is close to N/π(N) and the error (the red line) gets smaller the larger is N.The log integral function Li(x) is defined as
The PNT (improved version) states
The log integral function is a much better estimate than N/logN.Von Koch's 1901 result
That is π(x)-Li(x) is big oh of sqrt(x)\*logx, meaning π(x)-Li(x) never exceeds some fixed multiple of sqrt(x)\*logx. The result is valid if the Riemann Hypothesis is true (stated in the Riemann's Zeta Function section below).Prime Counting step Function for real number π(x)
defined as the number of primes up to the real number x.Riemann defined another step function in terms of π(x)
Inverting the above relationship
The Basel series converges (each term is the square of the corresponding term in the harmonic series which diverges)
This is Euler's solution of the Basel problem which also gave a closed form for all even number. For odd numbers there is no closed form.The Riemann zeta function
When s = 1, the zeta function is the harmonic series and it has no value (inf). When s = 2, the zeta function is the Basel series and the value is π^2/6.The series describes only part of the zeta function (s > 1).
Zeta function extended domain using
Extending the domain to complex numbers,
the Riemann Hypothesis states that all non-trivial zeros of the zeta function have real part one-half.
In other words, the zeros are complex numbers of type 1/2+Ti, thus all lying on the critical line Re(s) = 1/2.
Value complex plane, showing points coming from the critical line
Number of zeros up to the height T (imaginary part of complex number)
Zeta function using Möbius function
As important as the Möbius function is its cumulative value called Mertens's function, for which
The above is equivalent to Denjoy's Probabilistic Interpretation of the Riemann Hypothesis: a square-free number has either an even or odd number of prime factors with a 50-50 probability, [Edwards, H. M. (2001)], pp 268-269.Euler product formula
On the left hand a sum including all positive whole numbers (the zeta function), on the right hand a product including all prime numbers.Riemann, in his 1859 paper, rewrote the above formula in calculus version
By inverting the expression above
This represent the main result of Riemann's 1859 paper.To summarize, π(x) can be expressed in terms of J(x)
J(x) in terms of zeta function therefore π(x) can be expressed in terms of zeta function.That is the distribution of primes π(x) depends on the non-trivial zero's of the zeta function.
Since the Riemann Hypothesis is a statement on these zeros, if it is true, some properties follow on the distribution of primes.
However if the Riemann Hypothesis is false, Riemann's main result is still valid, in fact it was proved by von Mangoldt in 1895.
- Derbyshire, J. (2004) Prime Obsession: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics, New York: Penguin
- Edwards, H. M. (2001) Riemann's Zeta Function, New York: Dover