A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Distribution of Primes

Graduate Depth 81 in the knowledge graph ☐ I know this ☆ Set as goal
108topics build on this
388prerequisites beneath it
See this on the map →
Distribution of Primes and the Prime Number TheoremFundamental Theorem of Arithmetic (Rigorous)+1 more→→Introduction to the Riemann Zeta FunctionPrime Counting Function and Chebyshev Bounds+1 more
primes distribution analytic-number-theory

Core Idea

The distribution of primes among integers is irregular locally yet systematic globally. Prime gaps grow, primes become sparser as numbers increase, yet never entirely disappear. Understanding this distribution is central to analytic number theory and has applications to cryptography and computational mathematics.

Explainer

The primes 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 look almost random at first glance — they don't follow an obvious arithmetic pattern like the even numbers or multiples of 3. Yet zoom out far enough, and a striking regularity emerges: primes thin out in a precise, predictable way as numbers grow larger. This tension between local randomness and global order is what makes the distribution of primes one of the deepest subjects in mathematics.

Your prerequisite — the Fundamental Theorem of Arithmetic — tells you that every integer greater than 1 factors uniquely into primes. This means primes are the "atoms" of multiplication: every composite number is built from them. From this perspective, asking how primes are distributed is really asking how the multiplicative structure of the integers thins out. A number near N is prime only if it is not divisible by any prime up to √N. As N grows, there are more small primes that could divide it, so the chance of escaping all of them shrinks — and indeed, primes do become sparser as numbers grow larger.

How much sparser? The prime-counting function π(N) counts the number of primes up to N. Empirically, π(100) = 25, π(1000) = 168, π(10000) = 1229. Notice that while the count keeps growing, it grows more slowly relative to N — primes become less dense. The key insight, formalized by the Prime Number Theorem (which this topic builds toward), is that π(N) ≈ N / ln(N). The natural logarithm appears here not by coincidence but because of deep connections between primes and the logarithm through the Riemann zeta function and related machinery.

Prime gaps — the spacings between consecutive primes — illustrate the local irregularity directly. After 2 and 3 (the only gap of 1), the gaps are 2, 2, 4, 2, 4, 2, 4, 6, 2... and grow without bound on average, yet "twin primes" (gaps of 2 like 11 and 13, or 17 and 19) keep reappearing, apparently forever. Whether they appear infinitely often is one of the great unsolved problems in mathematics. The upshot is this: globally, the density of primes near N is approximately 1/ln(N) — so among integers near a billion, roughly 1 in 20 is prime — but locally, the exact placement of individual primes remains unpredictable, governed by a randomness that is, in a deep sense, not really random at all.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Proof by Cases → Proving by Cases and Exhaustion → Vacuous Truth and Trivial Cases → Proof by Cases (Proof by Exhaustion) → Mathematical Induction → Divisibility and Greatest Common Divisor → The Fundamental Theorem of Arithmetic → Divisibility Theory (Formal Treatment) → Fundamental Theorem of Arithmetic (Rigorous Proof) → Arithmetic Functions and Multiplicativity → Dirichlet Series and L-Functions → Primes in Arithmetic Progressions (Dirichlet's Theorem) → Distribution of Primes

Longest path: 82 steps · 388 total prerequisite topics

Prerequisites (3)

Leads To (3)