Riemann Console dot org

An open research record on the Riemann Hypothesis.

NAV READY · TYPE SHORTCUT · ENTER EXECUTES

How are the prime numbers distributed?

Series
Explain
Summary
A beginner-first visual journey through prime distribution: local irregularity, prime gaps, the counting function pi(x), the Prime Number Theorem, logarithmic density, the logarithmic integral, residual error, zeta zeros and the Riemann Hypothesis.
Math Level
GENERAL
Index Excerpt
Prime numbers become rarer as the integers grow. Individually their positions remain irregular, but collectively their density follows a logarithmic law and their cumulative count satisfies pi(x) ~ x/log x.

The prime numbers begin innocently enough.

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31,…2,\ 3,\ 5,\ 7,\ 11,\ 13,\ 17,\ 19,\ 23,\ 29,\ 31,\ldots

They are the whole numbers greater than 1 that cannot be divided exactly by any smaller positive whole number except 1\.

At first, there seem to be plenty of them.

Between 1 and 10 there are four primes:

2, 3, 5, 7.2,\ 3,\ 5,\ 7.

Between 1 and 100 there are 25\.

Between 1 and 1,000 there are 168\.

Between 1 and one million there are 78,498.

So the primes certainly do not disappear.

But something else is happening.

As the integers get larger, primes become steadily less common.

And that raises a deceptively simple question:

How are the prime numbers distributed?

It is one of the questions that eventually led from elementary arithmetic to logarithms, complex analysis, the Riemann zeta function and the Riemann Hypothesis.

But we can begin much more simply.

We can begin by looking.

ASCII ILLUSTRATION // The prime landscape

Six equal windows, each containing 240 consecutive integers, sampled from the beginning of the positive integers out to a little beyond one trillion. Every integer position is represented. Each window is split into four clearly labelled 60-integer rows so the range labels remain readable on narrow screens. Prime positions are shown as @ and all other positions as dots. The six windows contain 52, 35, 25, 19, 12 and 11 primes respectively. The individual positions remain irregular while the broad density visibly thins.

Equal-sized windows at larger numerical scales show the central visual fact of prime distribution: the primes continue to appear, but they occupy a smaller share of the integer landscape on average.

A number with nowhere to split

A prime number is a whole number greater than 1 with exactly two positive divisors: 1 and itself.

The number 7 is prime because its only positive factorizations are 1 x 7 and 7 x 1\.

The number 12 is not prime because it can be broken apart in several ways:

12=2×6=3×4.12=2\times6=3\times4.

Numbers like 12 are called composite.

This distinction matters because the primes are, in a precise sense, the building blocks of the positive integers. Every integer greater than 1 can be decomposed into primes, and apart from their order that prime factorisation is unique.

For example,

60=22×3×5.60=2^2\times3\times5.

(The superscript in 222^2 means 2×22\times2. So 22×3×5=2×2×3×5=602^2\times3\times5=2\times2\times3\times5=60.)

This is one reason primes matter so much. They are not merely an unusual collection of numbers scattered among the integers. Multiplicatively, they are the basic components from which all the other positive integers are assembled.

And there are infinitely many of them.

Euclid proved that more than two thousand years ago.

So however far along the number line we travel, the primes never finally run out.

But infinity does not tell us how frequently they occur.

There can be infinitely many members of a sequence while the gaps between them grow larger and larger.

That is exactly where the distribution problem begins.

What do the primes actually look like?

The beginning of the number line is unusually friendly.

Up to 30, the primes are

2, 3, 5, 7, 11, 13, 17, 19, 23, 29.2,\ 3,\ 5,\ 7,\ 11,\ 13,\ 17,\ 19,\ 23,\ 29.

Ten primes among the first thirty integers feels like a substantial population.

But move further out and the texture changes.

There are still primes everywhere. What changes is their density.

ASCII ILLUSTRATION // Four equal windows

Four equal 10 by 10 grids, each containing exactly 100 consecutive integers, sampled from 1–100, 1,001–1,100, 10,001–10,100 and 1,000,001–1,000,100. Every integer occupies the same relative grid position in every panel. Prime numbers appear as @ lights above | position markers; non-prime integers appear as dots. The four panels contain 25, 16, 11 and 6 primes respectively, making the long-run thinning of prime density directly visible while preserving the actual irregular locations.

The physical area representing 100 integers stays exactly the same while the number of illuminated prime positions falls across these four increasingly large ranges.

This is an important distinction.

The number of primes keeps increasing as we extend our search.

The proportion of numbers that are prime decreases.

Up to 10 there are 4 primes, so 40 per cent of the integers from 1 to 10 are prime.

Up to 100 there are 25, so the proportion is 25 per cent.

Up to 1,000 there are 168, or 16.8 per cent.

Up to 10,000 there are 1,229, or 12.29 per cent.

Up to 100,000 there are 9,592, or about 9.6 per cent.

Up to one million there are 78,498, or about 7.85 per cent.

There are vastly more primes in the larger range.

But primes occupy a smaller fraction of it.

ASCII ILLUSTRATION // More primes, yet rarer

A compact two-panel ASCII comparison of cumulative prime count and prime density from 10 through 1,000,000. The first panel lists the exact cumulative number of primes up to each limit, showing that the total rises rapidly. The second panel lists the exact percentage of integers that are prime over the same ranges, with a short approximate bar where each @ represents about two percentage points. The two panels make the central contrast explicit: there are more primes in total, but primes form a smaller share of the integers.

As the search range grows, the total number of primes rises dramatically while the proportion of integers that are prime steadily falls.

This gradual thinning is the first great feature of the distribution of the primes.

The next is almost its opposite.

When we look at broad ranges, the thinning follows a remarkably regular large-scale trend. But the individual prime positions do not.

The primes refuse to march in step

If the primes simply appeared every tenth number, or every hundredth number, their distribution would be easy to describe.

They do nothing of the kind.

Consider a short run:

89, 97, 101, 103, 107, 109, 113, 127, 131.89,\ 97,\ 101,\ 103,\ 107,\ 109,\ 113,\ 127,\ 131.

The gaps between consecutive primes are

8, 4, 2, 4, 2, 4, 14, 4.8,\ 4,\ 2,\ 4,\ 2,\ 4,\ 14,\ 4.

They jump around.

Sometimes two primes are as close as they can be after 2 and 3: 11 and 13, or 101 and 103\. Such pairs are called twin primes.

Elsewhere the number line can travel for a comparatively long distance without encountering a prime at all.

And arbitrarily long prime-free stretches must exist.

For any positive integer n, consider the consecutive numbers

(n+1)!+2,(n+1)!+3,…,(n+1)!+(n+1).(n+1)!+2,\quad(n+1)!+3,\quad\ldots,\quad(n+1)!+(n+1).

Each is composite, because the added number divides (n+1)!(n+1)!.

(n!n!, pronounced “n factorial”, means n×(n−1)×⋯×2×1n\times(n-1)\times\cdots\times2\times1. Because (n+1)!(n+1)! is divisible by every whole number from 2 through n+1n+1, adding one of those numbers produces a number divisible by that same number.)

So prime gaps are not merely irregular.

They can become as large as we like.

ASCII ILLUSTRATION // The uneven rhythm of prime gaps

A compact two-panel ASCII illustration. The first panel lists consecutive primes from 83 through 139 together with the exact gap after each one, making the irregular sequence 6, 8, 4, 2, 4, 2, 4, 14, 4, 6 and 2 easy to read directly. The second panel shows the factorial construction that produces arbitrarily long runs of composite integers.

Prime gaps do not settle into a regular beat. Some consecutive primes sit close together, others are much farther apart — and arbitrarily long prime-free runs must exist.

This creates the central tension of the subject.

Look at the primes close up and they seem erratic.

Zoom out far enough and a smooth law begins to appear.

How do you count something so irregular?

Rather than trying to predict the next prime individually, mathematicians can ask a softer question:

How many primes have appeared by the time we reach x?

The function used to answer that question is written

π(x).\pi(x).

(Here π\pi is the Greek letter pi, but π(x)\pi(x) does not mean the familiar circle constant 3.14159…3.14159\ldots. In this notation, π(x)\pi(x) means “the number of prime numbers less than or equal to xx”.)

For example,

π(10)=4,\pi(10)=4,

because there are four primes no greater than 10\.

Similarly,

π(100)=25\pi(100)=25

and

π(1000)=168.\pi(1000)=168.

Most of the time, as x moves from one integer to the next, nothing happens. But whenever x passes a prime number, pi(x) rises by one. So its graph is a staircase.

ASCII ILLUSTRATION // The prime-counting staircase

An exact ASCII plot of the prime-counting function pi(x) from x=0 to x=50. The graph remains horizontal between primes and rises by exactly one at each prime number. Prime x-positions are marked beneath the axis, and the full step sequence is generated from actual primality data.

Each time x passes a prime, pi(x) rises by one. The scattered prime numbers become a single cumulative staircase — the object mathematicians use to study their overall distribution.

This is a profound change of viewpoint.

Instead of asking “Where is the next prime?” we ask “What is the overall shape made by all the primes we have encountered?”

The individual positions remain jagged.

The accumulated count becomes much smoother.

And once there is a shape, we can try to approximate it.

Counting primes by hand

Long before electronic computers, producing reliable tables of primes was serious mathematical work.

One of the oldest systematic methods is the Sieve of Eratosthenes.

Begin with a list of integers.

Keep 2, then remove every larger multiple of 2\.

The first surviving number is 3\. Keep it, then remove every larger multiple of 3\.

The next survivor is 5\. Remove its larger multiples.

Continue.

What remains, apart from 1, is prime.

ASCII ILLUSTRATION // The sieve of Eratosthenes

Six matched 10-by-10 grids show the integers from 1 to 100 being filtered in stages. The first panel contains every integer, with 1 separately marked as neither prime nor composite. Successive panels remove larger multiples of 2, then 3, then 5, then 7. The final panel retains exactly the 25 prime positions as @ lights.

The sieve finds primes by elimination. Once multiples of 2, 3, 5 and 7 have been removed from 1–100, every composite number has vanished and the primes remain.

The sieve gives us the primes.

But by the eighteenth and nineteenth centuries another question had become increasingly interesting.

Not simply which numbers are prime, but:

Is there a law governing how frequently primes occur?

Gauss notices something

Carl Friedrich Gauss became interested in the frequency of primes while still young.

Both Gauss and Adrien-Marie Legendre studied extensive numerical tables and recognised that although the primes looked irregular one by one, their average density seemed to follow a remarkably simple trend. [1]

Near a large number x, the fraction of nearby integers that are prime is roughly

1log⁡x.\frac{1}{\log x}.

Here log x means the natural logarithm.

(The natural logarithm, written log⁡x\log x or sometimes ln⁡x\ln x, grows very slowly. For example, log⁡10≈2.30\log 10\approx2.30, log⁡100≈4.61\log100\approx4.61, and log⁡1,000,000≈13.82\log1{,}000{,}000\approx13.82.)

Near x=100, the rough prime density predicted by the rule is about 1/4.6.

Near one million it is about 1/13.8.

Near one trillion, log(10^12) is about 27.6, so the local density is roughly one prime per 28 integers.

This does not mean that primes occur regularly every 28 numbers.

They do not.

It is best read as a large-scale density heuristic: over broad ranges near that scale, the proportion of primes is expected to be about that size. It does not promise a prime every log x integers, or prescribe what must happen inside any particular short interval.

That distinction is crucial.

ASCII ILLUSTRATION // The thinning law

Four equal 100-integer windows sampled around 100, 1,000, 1,000,000 and 1,000,000,000,000. Each sample is now split into four labelled 25-integer rows so the real prime positions remain visible without forcing a 100-character strip onto one line. The actual prime count is compared with the simple density heuristic 100/log x.

The rule 1/log x predicts average density, not individual positions. Across four equally sized windows the expected count falls from about 21.7 primes per hundred integers near 100 to about 3.6 near one trillion, while the actual locations remain irregular.

The law is striking because logarithms arise from smooth continuous mathematics.

Primes are discrete integers.

Yet the slow growth of a logarithm describes their thinning with extraordinary accuracy.

Why should those worlds meet?

That is the question that begins to pull the subject towards analysis.

From density to the Prime Number Theorem

If the local density of primes near x is roughly 1/log x, then a natural first approximation to the number of primes up to x is

xlog⁡x.\frac{x}{\log x}.

And this leads to one of the great theorems of mathematics:

π(x)∼xlog⁡x.\pi(x)\sim\frac{x}{\log x}.

This is the Prime Number Theorem. [1]

The symbol \~ matters.

It does not mean that the two expressions are equal.

It means that their ratio approaches 1:

π(x)x/log⁡x⟶1\frac{\pi(x)}{x/\log x}\longrightarrow1

as x grows without bound.

(In this setting, f(x)∼g(x)f(x)\sim g(x) means that f(x)/g(x)f(x)/g(x) approaches 1\. The two quantities can still differ by a large absolute amount. What becomes small is their difference relative to their overall size.)

At x=1,000, the true count is 168 while x/log x is about 145\.

At x=1,000,000, the true count is 78,498 while x/log x is about 72,382.

The approximation is not exact.

But the Prime Number Theorem says something much stronger than “these numbers happen to be fairly close”.

It says that, proportionally, the approximation becomes arbitrarily accurate as x becomes sufficiently large.

ASCII ILLUSTRATION // Jagged staircase, smooth law

A two-scale ASCII figure comparing the actual prime-counting function pi(x) with the smooth approximation x/log x. The upper panel zooms in on x=10 through x=100, where the stepped pi(x) curve and the smooth approximation visibly differ. The lower panel plots the ratio pi(x)/(x/log x) at powers of ten from 10 through 10^12 against a horizontal target line at 1, making the meaning of asymptotic equivalence explicit.

The Prime Number Theorem does not say that pi(x) equals x/log x. Close up they visibly differ. It says their ratio tends to 1 — so, relative to their growing size, the smooth law becomes increasingly accurate.

No matter how disorderly the individual prime gaps appear, the entire population obeys an asymptotic law.

From very far away, the prime numbers have a shape.

A better smooth approximation

The expression x/log x captures the leading behaviour beautifully.

Gauss himself was led to a more refined approximation. [1]

If the local density near t is roughly 1/log t, then instead of pretending that the density has one fixed value all the way from 2 to x, we can accumulate the changing density continuously. In this article we use the offset logarithmic integral, starting at 2:

Li⁡(x)=∫2xdtlog⁡t.\operatorname{Li}(x)=\int_2^x\frac{dt}{\log t}.

(∫\int is an integral sign. Here it means, roughly, “accumulate all these tiny contributions from 22 up to xx”. The variable tt simply marks our temporary position along the way.)

This is the offset logarithmic integral used throughout this article. Other sources sometimes use the notation li(x) for a closely related convention that differs by a constant.

It usually gives a striking approximation to pi(x).

There is an important conceptual difference between the two expressions.

x/log x uses the density at roughly the endpoint x.

The logarithmic integral allows the predicted density to change continuously as we travel along the number line.

ASCII ILLUSTRATION // Three views of the same population

A compact normalized comparison of the true prime count pi(x), the leading approximation x/log x and the logarithmic integral Li(x). Each scale gets its own short rail. The true count is fixed at 1.000; x marks the x/log x ratio, # marks pi(x), L marks Li(x), and * marks cases where Li(x) and pi(x) are too close to separate at this display width.

The same prime population can be described by the actual count pi(x), the leading approximation x/log x, and the more refined logarithmic integral Li(x). The smooth approximations are visibly separated at small scales and move progressively closer to the true count in relative terms.

The primes themselves have not become smooth.

Our description of their collective behaviour has.

So are primes random?

This is where language becomes dangerous.

The primes can look random.

Their gaps fluctuate.

Simple visual searches reveal no repeating pattern that tells us exactly where every future prime will fall.

Statistical and probabilistic ideas are extraordinarily useful in understanding them.

But the primes are not generated by chance.

Whether a particular integer is prime is completely determined.

There is no hidden coin being tossed.

What resembles randomness is the complexity of the deterministic pattern.

So when we say that a number near x has “roughly a 1/log x chance of being prime”, we are using probabilistic language as a model of density.

We are not saying that the universe randomly decides its primality.

ASCII ILLUSTRATION // Random-looking, not randomly generated

Two matched 200-position fields are stacked vertically. The first marks the actual prime numbers from 10,000 through 10,199. The second marks 23 uniformly random positions chosen from the same 200 slots using the existing fixed reproducible seed. Both contain exactly 23 marks, so their densities match, while their mathematical origins remain different.

Prime positions can look irregular enough to invite probabilistic models, but primality itself is not random. The upper pattern is fixed by arithmetic; the lower pattern is a random sample with exactly the same number of marked positions.

This distinction becomes increasingly important the deeper we travel into number theory.

There is structure here.

The difficulty is discovering what form that structure takes.

Patterns that appear when we rearrange the integers

Instead of laying the positive integers along a straight line, arrange them in a square spiral and mark only the primes.

Stanisław Ulam proposed this arrangement in 1963\. It is now called the Ulam spiral. [2]

Unexpected diagonal concentrations appear.

The spiral does not provide a formula for generating all primes, and its diagonals do not overthrow the Prime Number Theorem.

But it gives a memorable visual reminder that arithmetic structure can become visible when the same numbers are reorganised geometrically.

ASCII ILLUSTRATION // The Ulam spiral

A genuine 45-by-45 Ulam spiral containing the consecutive integers 1 through 2,025. Every prime position is marked with @ and every composite position is blank. The horizontal spacing is doubled so that the underlying square lattice appears approximately square in the Riemann Console site's narrow monospace font. Diagonal concentrations emerge from the arithmetic data itself.

When the integers are wound into a square spiral and only the primes are illuminated, striking diagonal structures appear. Nothing has been drawn into the pattern: every mark comes from actual primality.

The primes can therefore look irregular in one representation and unexpectedly structured in another.

The way we choose to represent a mathematical object can determine which part of its structure becomes visible.

The Ulam spiral is a twentieth-century visual detour into a much older question. To follow the historical route that led to Riemann, we now need to go back.

Back to the nineteenth-century problem

By the early nineteenth century, the broad numerical evidence was compelling.

Gauss and Legendre had recognised the logarithmic thinning of the primes.

But observing a law is not proving it.

For much of the nineteenth century, the distribution of primes remained an open problem.

Pafnuty Chebyshev made major progress. He showed, among other things, that the right order of magnitude really was x/log x. But the full statement pi(x) \~ x/log x remained unproved.

Then Bernhard Riemann entered the story.

In 1859 he published a short paper with a title that tells us exactly what he was trying to understand:

On the Number of Primes Less Than a Given Quantity. [3]

Riemann's subject was the distribution of primes.

His great move was to approach that discrete arithmetic problem through a function of a complex variable.

That function was the Riemann zeta function.

ASCII ILLUSTRATION // From counting tables to complex analysis

A vertical conceptual path from exact prime counts to the complex-analytic study of zeta(s). The figure begins with a small table of pi(x), turns the counts into a staircase and smooth approximations, then shows Euler's bridge between all positive integers and the primes, before moving into the complex plane and the study of zeta zeros.

The problem never stops being about primes. What changes is the mathematical language: count them, study the shape of the count, approximate it smoothly, connect integers to primes through Euler's identity, and then analyse zeta(s) in the complex plane.

Riemann was building on a connection discovered by Leonhard Euler more than a century earlier.

For Re⁡(s)>1\operatorname{Re}(s)>1, Euler had found that the infinite sum

ζ(s)=1+12s+13s+14s+⋯\zeta(s)=1+\frac1{2^s}+\frac1{3^s}+\frac1{4^s}+\cdots

could also be written as a product over all prime numbers:

ζ(s)=∏p prime11−p−s.\zeta(s)=\prod_{p\ \mathrm{prime}}\frac{1}{1-p^{-s}}.

One side runs through every positive integer.

The other runs through the primes alone.

The zeta function therefore carries information about the prime numbers inside an analytic object.

Riemann realised that by extending this object into the complex plane, one could say much more about how the primes are distributed.

The Prime Number Theorem is finally proved

Riemann did not prove the Prime Number Theorem in his 1859 paper.

He did, however, identify machinery that transformed the problem.

The decisive proof arrived in 1896, independently from Jacques Hadamard and Charles Jean de la Vallée Poussin. [1]

Both proofs used complex analysis and properties of the zeta function.

So a question that begins with a child's list

2, 3, 5, 7, 11,…2,\ 3,\ 5,\ 7,\ 11,\ldots

ends up requiring the behaviour of a complex-valued function.

The integers are discrete.

The successful machinery for understanding their large-scale distribution is continuous.

But the smooth law is not the whole story

The function x/log x gives the broad trend.

The logarithmic integral gives a more refined approximation.

But the true prime-counting staircase does not sit exactly on either smooth curve.

A residual remains. Its size and sign have their own complicated behaviour; it is not a simple repeating wave.

Those deviations are not an annoying detail to be brushed away.

They are where the deeper problem lives.

ASCII ILLUSTRATION // The error becomes the subject

A two-level ASCII figure using the same smooth approximation in both panels. The upper panel compares the actual prime-counting function pi(x) with the article's offset logarithmic integral Li(x) from x=2 to x=100. The lower panel subtracts Li(x) from pi(x) and magnifies the residual on a zero-centred scale. What was a small discrepancy in the upper graph becomes the entire object of attention below.

A smooth approximation can describe the main trend without reproducing every detail. Subtracting that trend reveals the residual — the finer structure whose behaviour leads deeper into analytic number theory.

This is a powerful recurring idea in mathematics.

First find the main trend.

Then subtract it.

What remains can contain the most interesting information.

For the primes, Riemann found that the remaining fluctuations are intimately connected to the zeros of the zeta function.

That is the bridge to the Riemann Hypothesis.

Where the zeros enter

The Riemann Hypothesis does not tell us whether primes exist infinitely far along the number line. Euclid settled that long before Riemann.

Nor do we need RH to know the broad density of primes. The Prime Number Theorem has already been proved.

What the zeros of zeta control much more delicately is the error in our description of the primes.

Very roughly, explicit prime-counting formulas separate a smooth main contribution from correction terms tied to the zeros of the zeta function.

Riemann's explicit-formula programme made the connection precise: zeros of the zeta function enter correction terms in formulas that encode prime distribution. [3]

The visible objects are primes on the real number line.

The hidden organising data live among zeros of a function in the complex plane.

For the fuller story, see What do the zeros of the zeta function have to do with prime numbers?.

The important point here is simpler:

The Prime Number Theorem describes the main shape of the distribution. The zeros of zeta describe much of its fine fluctuation around that shape.

ASCII ILLUSTRATION // From primes to the Riemann Hypothesis

A continuous left-to-right conceptual map beginning with individual prime positions, passing through the cumulative count pi(x), smooth main terms, residual error and zeta(s), then entering the critical strip in the complex plane. Known zeros are shown schematically on the critical line Re(s)=1/2, while question marks on either side represent the unresolved possibility addressed by the Riemann Hypothesis. A status rail distinguishes proved facts, established analytic connections and the open conjecture.

The road to the Riemann Hypothesis is not a jump from primes to an abstract conjecture. It passes through counting, approximation, error and the zeros of zeta — with proved mathematics at every stage until the final open question.

Two truths about the primes

Close up, primes are irregular.

Their gaps fluctuate. They form clusters and deserts. No simple repeating rhythm tells us exactly where each one will occur.

Far away, they are remarkably orderly.

Their density near x is about

1log⁡x,\frac1{\log x},

and their cumulative number satisfies

π(x)∼xlog⁡x.\pi(x)\sim\frac{x}{\log x}.

Both statements are true at once.

There is disorder in the detail and order in the whole.

Zooming out

Imagine that every prime number is a light on an infinitely long road.

Near the beginning, the lights are frequent.

As the road continues, they slowly become sparser.

There is no final light. However far you travel, more lie ahead.

The spacing from one light to the next is unpredictable enough to feel irregular. Sometimes two stand almost together. Sometimes there is a long dark stretch.

But rise high enough above the road and something unexpected happens.

The individual lights merge into a density.

The density follows a logarithmic law.

A smooth mathematical law appears.

And if you then descend again and ask why the real lights deviate from that smooth law by precisely the amounts they do, you find yourself being led towards the zeros of the zeta function.

That journey — from individual primes, to their density, to their counting function, to its error, to complex zeros — is much of the historical road towards the Riemann Hypothesis.

ASCII ILLUSTRATION // The zoom-out finale

Six real 240-integer windows from the article's opening prime landscape are shown again as progressively coarser displayed bins. Each compact row is derived from the same underlying prime positions: . means no prime in a displayed bin, @ means one prime, and # means multiple primes have merged into that bin. As the display recedes, exact locations give way to average density.

Close up, individual prime positions and irregular gaps are visible. As we zoom out, several integers merge into each displayed bin and the falling statistical density becomes the dominant feature, leading onward toward logarithms, residual error and zeta.

The sequence to remember

Start with the integers:

1,2,3,4,5,6,…1,2,3,4,5,6,\ldots

Pick out the primes:

2,3,5,7,11,13,17,…2,3,5,7,11,13,17,\ldots

They continue forever, but they become less common.

Count them with pi(x).

Their local density is roughly 1/log x.

Their cumulative count obeys the Prime Number Theorem:

π(x)∼xlog⁡x.\pi(x)\sim\frac{x}{\log x}.

A smoother approximation comes from the logarithmic integral:

Li⁡(x)=∫2xdtlog⁡t.\operatorname{Li}(x)=\int_2^x\frac{dt}{\log t}.

The actual prime count fluctuates around its smooth approximations.

And Riemann discovered that those fluctuations are tied to the zeros of the zeta function.

That is how a question as elementary as “Where are all the primes?” opens a door into some of the deepest mathematics we know.

The one sentence to remember

The prime numbers become rarer as the integers grow, with an average density of about 1/log x: individually they remain irregular, but collectively their distribution follows an extraordinarily precise logarithmic law.

Or, perhaps more memorably:

The primes look disorderly close up, and orderly from far away.

Much of the mathematics surrounding the Riemann Hypothesis lives in the distance between those two views.

References

  1. NIST Digital Library of Mathematical Functions. “§27.12 Asymptotic Formulas: Primes.” NIST Digital Library of Mathematical Functions, Release 1.2.8 (2026). Source
  2. M. L. Stein; S. M. Ulam; M. B. Wells. “A Visual Display of Some Properties of the Distribution of Primes.” The American Mathematical Monthly 71(5) (1964). 516–520. doi:10.2307/2312588
  3. Bernhard Riemann. “Ueber die Anzahl der Primzahlen unter einer gegebenen Grösse (On the Number of Primes Less Than a Given Quantity).” Monatsberichte der Berliner Akademie / Clay Mathematics Institute manuscript collection (1859). Source