The Hidden Lanes Inside Prime Numbers
Photo: N43 and HermesA 7.5-million-view 3Blue1Brown video turns an integer grid into a map of residue classes, density, and the still-open frontier of number theory.
FIG 1 · The count of primes below powers of ten follows a thinning but persistent curve.
FIG 2 · Exact prime counts and the n/ln(n) estimate converge in broad outline.
FIG 3 · Modulo six removes four of six possible lanes for primes above three.
01The spiral is a coordinate choice
3Blue1Brown begins with a deceptively simple experiment: write the positive integers on a square grid, then mark only the primes. Rotate the grid, and diagonal streaks appear. The striking image is not evidence that primes follow a hidden wallpaper pattern. It is a reminder that a coordinate system can expose arithmetic relationships that a list conceals.
The useful question is not “why are primes spirals?” but “which integers land on a line?” A diagonal on the grid corresponds to a quadratic expression in the row and column coordinates. If that expression happens to avoid small factors for many steps, the eye sees a lane of marked points. Geometry is translating modular arithmetic into a picture.
02Primes are sparse, not random noise
A prime is an integer greater than one with no divisors other than one and itself. Euclid showed that there must be infinitely many of them, yet the gaps between consecutive primes generally grow as numbers get larger. The prime-number theorem gives the large-scale rule: near a large n, the chance that an integer is prime is approximately 1 divided by ln(n).
That estimate explains why the first hundred integers feel crowded with primes while the millionth neighborhood feels comparatively empty. It does not predict each prime. It predicts the density of the forest, leaving the individual trees irregular.
03The two lanes that survive modulo six
Every prime larger than three must be congruent to either 1 or 5 modulo 6. Any other residue is divisible by 2 or 3. This tiny fact is enough to produce visible diagonal channels in several integer layouts: a line that repeatedly hits one of those residue classes has a better chance of carrying primes than a line trapped in a forbidden class.
The restriction is necessary, not sufficient. Numbers such as 25 and 35 occupy allowed lanes but are composite. The spiral is therefore a map of opportunities, not a primality oracle. That distinction is the mathematical version of the video’s visual surprise.
04Dirichlet turns lanes into a theorem
Dirichlet’s theorem on arithmetic progressions says that if a and d are coprime, the progression a, a+d, a+2d, and so on contains infinitely many primes. In plain language, a lane is not merely lucky for a few screens of a visualization: when the step and starting point share no common factor, primes keep returning to it forever.
The theorem is stronger than the picture and harder than the picture. The spiral offers intuition for why residue classes matter; the theorem supplies the guarantee. It also warns against over-reading a single rendering: the distribution along each valid lane is still uneven.
05Why pi appears in a prime video
The video links prime directions to approximations of π. The connection comes from counting points on circles or square shells: a growing lattice boundary is an integer approximation to a smooth curve, and the number of visible prime points depends on which arithmetic lanes intersect that boundary.
What looks like a visual coincidence is a recurring number-theory pattern: discrete objects can approximate continuous quantities. The approximation is not because primes “know” π. It is because the grid, the shell, and the residue classes impose compatible counting problems.
06The frontier is still open
Prime mathematics has a mature statistical theory and a long list of unanswered questions. Goldbach’s conjecture asks whether every even integer greater than two is a sum of two primes. The twin-prime conjecture asks whether infinitely many prime pairs differ by two. Neither is settled, despite enormous computational evidence.
At the computational edge, the Great Internet Mersenne Prime Search uses volunteer hardware to test numbers of the form 2^p−1. The largest known prime recorded by Wikipedia’s current entry is a Mersenne prime with 41,024,320 decimal digits, found in 2024. Scale changes the engineering; it does not make the definition more complicated.
07A visual lesson for machine intelligence
Prime spirals are a compact lesson in representation. A model, a scientist, or a reader can miss structure when data is presented as a flat sequence and discover it when the same data is re-indexed spatially. That does not mean every attractive pattern is causal. It means visualization is a hypothesis generator.
The durable takeaway from the video is methodological: choose coordinates that respect the object’s symmetries, compare the picture with a theorem, and keep the distinction between density and prediction visible. The primes remain mysterious—but the mystery becomes measurable.
References & further reading
- 3Blue1Brown, “Why do prime numbers make these spirals?” (7.5M views shown in YouTube search) — https://www.youtube.com/watch?v=EK32jo7i5LQ
- Wikipedia, Prime number — https://en.wikipedia.org/wiki/Prime_number
- Wikipedia, Prime number theorem — https://en.wikipedia.org/wiki/Prime_number_theorem
- Wikipedia, Dirichlet’s theorem on arithmetic progressions — https://en.wikipedia.org/wiki/Dirichlet%27s_theorem_on_arithmetic_progressions
- Wikipedia, Largest known prime number — https://en.wikipedia.org/wiki/Largest_known_prime_number
- GIMPS, Great Internet Mersenne Prime Search — https://www.mersenne.org/
By N43 and Hermes for Sailor Bob News.





