Search Knowledge

© 2026 LIBREUNI PROJECT

Mathematics / Number Systems & Theory

The Distribution of Primes

The Distribution of Primes

The distribution of prime numbers is one of the most profound mysteries in mathematics. While primes appear to occur randomly among the integers, they obey strict asymptotic laws when viewed on a large scale. The study of these laws, primarily through complex analysis, forms the branch of Analytic Number Theory.

The Prime Counting Function

The fundamental object of study is , the number of primes less than or equal to : Early computations by Gauss and Legendre suggested that . This led to the formulation of the Prime Number Theorem (PNT).

The Prime Number Theorem

The Prime Number Theorem states that: A more refined approximation is given by the Logarithmic Integral function : The PNT was finally proven independently in 1896 by Jacques Hadamard and Charles-Jean de la Vallée Poussin, using the properties of the Riemann Zeta Function.

The Riemann Zeta Function

Bernhard Riemann’s 1859 paper, On the Number of Primes Less Than a Given Magnitude, revolutionized the field by showing that the distribution of primes is determined by the zeros of a complex-valued function.

Euler Product Formula

For , the zeta function is defined as: This identity, discovered by Euler, provides the direct link between the sum over all integers and the product over all primes.

Analytic Continuation

Riemann showed that could be analytically continued to the entire complex plane (except for a simple pole at ). He derived the functional equation: This equation relates the values of to , creating a symmetry around the critical line .

Zeros of the Zeta Function

The zeros of are categorized into two types:

  1. Trivial Zeros: The negative even integers .
  2. Non-trivial Zeros: Zeros located within the critical strip .

The Riemann Hypothesis

The most famous unsolved problem in mathematics, the Riemann Hypothesis (RH), conjectures that: All non-trivial zeros of the Riemann Zeta Function have real part equal to .

If RH is true, the error term in the Prime Number Theorem is as small as possible:

Chebyshev Functions

Analytic proofs often utilize Chebyshev functions, which weight primes in a way that is more natural for analysis.

  • First Chebyshev Function: .
  • Second Chebyshev Function: .

The Prime Number Theorem is equivalent to saying as .

Dirichlet Series

The zeta function is a specific type of Dirichlet Series. A general Dirichlet series has the form: These series have a half-plane of convergence. They allow for the study of many number-theoretic functions (like the Mobius function or the divisor function) through their generating functions in the complex plane.

For example, the reciprocal of the zeta function gives: where is the Mobius function.

Gaps Between Primes

While PNT tells us about the average spacing between primes (roughly ), the study of individual gaps is a major area of research.

  • Twin Prime Conjecture: There are infinitely many primes such that is also prime.
  • Bounded Gaps: In 2013, Yitang Zhang proved that there exists a constant such that infinitely many pairs of primes are within distance . This constant has since been reduced to .

Python: Visualizing Prime Density

import matplotlib.pyplot as plt
import numpy as np

def pi_count(x_max):
    primes = []
    is_prime = [True] * (x_max + 1)
    for p in range(2, x_max + 1):
        if is_prime[p]:
            primes.append(p)
            for i in range(p * p, x_max + 1, p):
                is_prime[i] = False
    return primes

x_vals = np.arange(2, 1000)
pi_vals = [len([p for p in pi_count(x) if p <= x]) for x in x_vals]
approx = x_vals / np.log(x_vals)

plt.plot(x_vals, pi_vals, label='pi(x)')
plt.plot(x_vals, approx, label='x/ln(x)')
plt.legend()
plt.show()

Exercise

Conceptual Check

According to the Riemann Hypothesis, where are all non-trivial zeros of the zeta function located?