3Blue1Brown
The galactic patterns seen in polar prime plots stem entirely from rational approximations of pi, which produce integer arms that prime numbers thin out equally across allowable residue classes.
AI-assisted summary of Why do prime numbers make these spirals? | Dirichlet’s theorem and pi approximations — original source. Check the original for full context.
Source published:
Key ideas
- Plotting prime numbers in polar coordinates as (p, p) produces sweeping galactic spirals and radiating rays driven by rational approximations to 2π rather than intrinsic symmetries of the primes themselves. (0:03)
- The 20 visible galactic spirals and 280 outer rays correspond directly to Euler's totient values φ(44) = 20 and φ(710) = 280, reflecting allowable residue classes coprime to the moduli 44 and 710. (7:20)
- The straightness of the 280 outer rays provides a visual demonstration of how tightly 355/113 approximates π, corresponding to 710 radians equaling roughly 113.000095 full revolutions. (11:19)
- Primes distribute asymptotically equally across coprime residue classes modulo n with limiting proportion 1/φ(n), connecting visual arm density directly to Dirichlet's theorem on arithmetic progressions. (16:45)
Detailed notes
## Background Published on YouTube by Grant Sanderson on the 3Blue1Brown channel on October 8, 2019, this video investigates a curious visual pattern of spiral arms and radiating rays that emerges when prime numbers are plotted in polar coordinates. The presentation explores the underlying mechanics behind the phenomenon, tying it to rational approximations of pi, residue classes, Euler's totient function, and Dirichlet's theorem on arithmetic progressions.
## TL;DR When numbers are plotted in polar coordinates as $(n, n)$ in radians, integer steps align into curving spirals and straight rays due to exceptionally close rational approximations of $2\pi$, specifically $44/7$ and $710/113$. Restricting the plot to prime numbers acts as a filter, wiping out residue classes that share prime factors with the modulus and leaving behind exactly $\phi(n)$ arms or rays as determined by Euler's totient function. Dirichlet's theorem accounts for why the surviving arms appear equally dense, establishing that primes distribute evenly across all allowable coprime residue classes. Through this visual puzzle, the video demonstrates how recreational mathematical play and data visualization can organically lead to deep principles in analytic number theory.
## Atmosphere & style The presentation carries 3Blue1Brown's signature calm, elegant, and intellectually generous tone, pairing hypnotic Manim animations with thoughtful, measured narration. It begins in an engaging playground of graphical curiosity, gently dismantles the illusion of prime mysticism with straightforward modular arithmetic, and gradually deepens into rigorous historical mathematics. Watching it feels like embarking on a collaborative detective story that moves from casual aesthetic wonder to a profound appreciation for mathematical rediscovery.
## Bulletin - [00:03](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=3s) Plotting prime numbers in polar coordinates as (p, p) produces sweeping galactic spirals and radiating rays driven by rational approximations to 2π rather than intrinsic symmetries of the primes themselves. - [07:20](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=440s) The 20 visible galactic spirals and 280 outer rays correspond directly to Euler's totient values φ(44) = 20 and φ(710) = 280, reflecting allowable residue classes coprime to the moduli 44 and 710. - [11:19](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=679s) The straightness of the 280 outer rays provides a visual demonstration of how tightly 355/113 approximates π, corresponding to 710 radians equaling roughly 113.000095 full revolutions. - [16:45](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=1005s) Primes distribute asymptotically equally across coprime residue classes modulo n with limiting proportion 1/φ(n), connecting visual arm density directly to Dirichlet's theorem on arithmetic progressions.
## Key takeaways - [00:03](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=3s) Plotting points (n, n) in polar coordinates uses distance r = n and angle θ = n radians, tracing out a basic Archimedean spiral step by step. - [02:30](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=150s) When restricted to primes, small scales appear chaotic, but large scales reveal 20 sweeping spiral arms and an even larger fan of 280 straight rays. - [03:35](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=215s) The underlying spiral structures are not unique to primes; plotting all integers produces 44 cleaner spiral arms based on multiples of rational approximations. - [04:15](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=255s) At the center, 6 arms emerge because 6 radians is slightly less than one full turn (2π ≈ 6.28318 radians), grouping numbers by residue classes modulo 6. - [05:30](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=330s) Primes greater than 3 leave remainders of only 1 or 5 modulo 6, eliminating 4 of the 6 central arms and leaving only 2 active spirals. - [07:20](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=440s) The 44-arm spiral pattern reflects the rational approximation 44/7 ≈ 2π (or 22/7 ≈ π), where advancing 44 radians equals roughly 7.0028 full revolutions. - [08:30](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=510s) Filtering modulo 44 for primes removes all 22 even residue classes and 2 odd multiples of 11, leaving exactly φ(44) = 20 visible galactic arms. - [11:19](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=679s) At broader scales, 710 radians corresponds to approximately 113.000095 full revolutions, corresponding to the exceptionally tight approximation 355/113 ≈ π. - [12:20](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=740s) Because 710 steps advance by nearly an exact integer number of turns, sequences of residue classes modulo 710 appear as nearly straight radial lines. - [12:59](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=779s) Factoring 710 into 2 × 5 × 71 explains why prime rays group into clusters of four (from removing multiples of 5) with periodic missing teeth (from multiples of 71). - [14:05](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=845s) The number of remaining prime rays equals φ(710) = 280, the count of positive integers up to 710 coprime to 710. - [14:38](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=878s) In base 10, primes greater than 5 must end in 1, 3, 7, or 9, with primes dividing asymptotically equally among these four allowable terminal digits at 25% each. - [16:45](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=1005s) In general, the proportion of primes up to x in any allowable residue class modulo n approaches 1/φ(n) as x approaches infinity. - [18:20](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=1100s) Dirichlet proved in 1837 that arithmetic progressions coprime to their step size contain infinitely many primes, introducing complex analysis to number theory. - [20:17](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=1217s) Reinventing mathematical concepts through playful visual experimentation provides intuitive grounding that makes formal definitions feel natural rather than arbitrary.
## Detailed walkthrough ### [00:03](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=3s) The Polar Coordinate Setup and the Spiral Mystery
The visual puzzle originated on Math Stack Exchange from a user named Dwymark, who posed a question about a peculiar pattern that emerged when visualizing primes, answered by Greg Martin. It ties together the distribution of prime numbers with rational approximations for $\pi$. The underlying experiment involves plotting points in two-dimensional polar coordinates $(r, \theta)$. Unlike familiar Cartesian $(x, y)$ coordinates, polar coordinates define a point by its radial distance $r$ from the origin and an angle $\theta$ measured counterclockwise from the positive horizontal axis. Angles are expressed in radians, meaning an angle of $\pi$ represents a half turn and $2\pi$ represents a full circle. Because angles wrap around every $2\pi$, polar coordinates are not unique; shifting an angle by any multiple of $2\pi$ points to the exact same position in space.
```mermaid flowchart TD accTitle: Polar coordinate point generation accDescr: Progression of points mapped with polar coordinates (n, n) in radians and distance. subgraph Progression["Iterative plotting of (n, n)"] P1["Point (1, 1)<br/>r = 1, θ = 1 rad"] --> P2["Point (2, 2)<br/>r = 2, θ = 2 rad"] P2 --> P3["Point (3, 3)<br/>r = 3, θ = 3 rad<br/>(θ just under π)"] P3 --> PN["General Point (n, n)<br/>r = n, θ = n rad"] end PN --> Spiral["Archimedean Spiral<br/>r = θ"] ```
The construction consists of plotting points where both coordinates are set to the exact same value: $(p, p)$ for every prime number $p$. As Grant Sanderson explains: “There is no practical reason to do this, it's purely fun, we're just frolicking around in the playground of data visualization.” To see how the geometry behaves, consider plotting all whole numbers $(n, n)$ rather than only the primes: - The point $(1, 1)$ sits at a radius of $1$ at an angle of $1$ radian, which means the subtended circular arc along the unit circle equals the radial line's length. - The point $(2, 2)$ doubles both the radial distance and the angle ($2$ radians). - The point $(3, 3)$ steps out to a distance of $3$ at $3$ radians—just shy of a straight half-turn, since $3$ is slightly less than $\pi \approx 3.14159$.
Step by step, the process resembles the tip of an expanding clock hand that advances by one radian per tick (a bit under a sixth of a complete turn) while growing outward by one unit with each step. This trace generates a classic Archimedean spiral. When you drop all composite numbers and plot only the primes, the small-scale picture looks chaotic and unpredictable. Zooming out, however, reveals an organized structure: sweeping, galactic-looking spiral arms with noticeable gaps where certain arms seem to have vanished entirely. Zooming out even further, the swirling arms straighten out into a massive fan of distinct, outwardly radiating rays. These rays often appear in clusters of four, interrupted by missing slots like a comb with broken teeth. Patiently counting the features at each scale reveals exactly 20 visible galactic spiral arms and, further out, a total of 280 straight rays.
[03:35](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=215s) Demystifying the Spirals via Whole Numbers and Modulo 6
While such structure tempts one to assume a mystical, hidden symmetry within the primes, the premise is somewhat misleading. If you repeat the experiment with *all* positive integers rather than just prime numbers, the exact same galactic spirals appear. Without the prime filter, the pattern is far cleaner and contains 44 spiral arms instead of 20. Thus, the physical origin of the spirals is completely divorced from prime numbers; it is purely an artifact of rational approximations to $2\pi$. The role of the primes is strictly that of a filter, carving out gaps and thinning the arms. Yet answering why certain arms survive and others vanish connects directly to Dirichlet’s theorem on arithmetic progressions.
To see why the integer plot forms spirals at all, look at the very center of the diagram, where a family of 6 smaller spirals emerges: - One arm consists entirely of the multiples of 6: $\{0, 6, 12, 18, \dots\}$. - The adjacent arm contains the numbers that are 1 above a multiple of 6: $\{1, 7, 13, 19, \dots\}$. - Subsequent arms correspond to numbers that are 2 above, 3 above, 4 above, and 5 above a multiple of 6.
Because each integer steps forward by 1 radian, jumping forward by 6 integers corresponds to a rotation of 6 radians. A full circle is $2\pi \approx 6.28318$ radians, so 6 radians falls just short of a full turn. Every time you add 6, the pointer sweeps around almost a full turn, ending at an angle slightly smaller than where it started. Repeating this step places each successive multiple of 6 just behind the previous one at an ever-increasing radius, creating the smooth visual illusion of a gently curving spiral arm.
When restricted to prime numbers, 4 of these 6 arms vanish entirely, leaving only 2: - Numbers that are multiples of 6 cannot be prime. - Numbers that are 2 above or 4 above a multiple of 6 are even, making them composite (with the sole exception of the prime 2). - Numbers that are 3 above a multiple of 6 are multiples of 3, making them composite (with the sole exception of the prime 3). - Consequently, all primes larger than 3 must leave a remainder of either 1 or 5 when divided by 6, populating only two surviving spiral arms.
In the formal language of mathematics, each sequence generated by stepping by 6 is termed a residue class modulo 6. As Sanderson quips, “The word residue here is sort of an overdramatic way of saying remainder, and mod means something like where the thing you divide by is.” Saying that 20 has a residue of 2 mod 6 is merely a pretentious way to say that dividing 20 by 6 leaves a remainder of 2.
[07:20](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=440s) The 44-Arm Galactic Spirals and Euler’s Totient Function
The larger galactic spiral pattern operates on the exact same mechanism, substituting 44 for 6. While 6 radians is roughly a single rotation, stepping forward by 44 radians produces:
$$\frac{44}{2\pi} \approx 7.0028 \text{ full turns}$$
This value is exceptionally close to 7 full rotations, meaning 44 steps brings you slightly past 7 full circles. This reflects the familiar rational approximation:
$$\frac{44}{7} \approx 2\pi \quad \iff \quad \frac{22}{7} \approx \pi$$
Because 44 radians is just a tiny fraction greater than 7 full turns, adding 44 lands at nearly the same angular direction, nudged just slightly counterclockwise. As radius increases by 44 with each step, the sequence of points $\{0, 44, 88, 132, \dots\}$ traces out an extremely gentle, slowly curving spiral arm. Offsetting the start by 1 gives the residue class of numbers 1 above a multiple of 44, rotated by 1 radian counterclockwise. Doing this for every offset from 0 to 43 produces 44 clean spiral arms representing every residue class modulo 44.
When filtering for primes, many arms disappear: - Any residue class consisting of even numbers (offsets 0, 2, 4,..., 42) contains only composites (except for the prime 2), wiping out 22 arms. - Offsets sharing a factor of 11 with 44—specifically 11, 22, and 33—contain only multiples of 11 (with 11 itself being the only prime), wiping out the remaining odd multiples of 11.
```mermaid flowchart LR accTitle: Filtering residue classes mod 44 for primes accDescr: Breakdown of the 44 total residue classes mod 44 into composite-dominated classes and coprime surviving classes. Total["44 Residue Classes<br/>mod 44"] --> Evens["22 Even Classes<br/>(offsets 0, 2,..., 42)<br/>Contain no primes > 2"] Total --> Mult11["2 Odd Multiples of 11<br/>(offsets 11, 33)<br/>Contain no primes > 11"] Total --> Coprimes["20 Coprime Classes<br/>gcd(a, 44) = 1<br/>ϕ(44) = 20"] Coprimes --> Visible["20 Visible Prime<br/>Galactic Spirals"] ```
The only spiral arms that remain visible are those corresponding to residue classes whose offsets share no prime factors with 44 (that is, offsets not divisible by 2 or 11). Two numbers that share no common factors other than 1 are called relatively prime, or coprime.
Counting the integers between 1 and 44 that are coprime to 44 yields exactly 20 numbers: - 1, 3, 5, 7, 9, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 35, 37, 39, 41, 43.
In number theory, this count is written compactly as $\phi(44) = 20$, where $\phi$ denotes Euler’s totient function. As Sanderson highlights: “More obscurely, and I had never heard this before but I find it too delightful not to tell, these numbers are sometimes called the totitives of n.”
The image observed on Math Stack Exchange is therefore the intersection of two distinct mathematical phenomena: 1. The fraction $44/7$ serves as an extraordinarily tight rational approximation for $2\pi$, organizing the integers into 44 distinct geometric spirals. 2. Filtering by prime numbers eliminates the 24 residue classes that share common factors with 44, leaving behind exactly $\phi(44) = 20$ arms where primes are free to appear infinitely often.
[10:28](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=628s) Transition to the Larger Scale
Just as 6 radians approximates 1 full turn, and 44 radians approximates 7 full turns, stepping out to even broader scales reveals why straight rays emerge instead of curving spirals. At that vast scale, the points align because 710 radians happens to land almost precisely on a whole number of full revolutions. Visually, this alignment causes the plotted point at 710 to strike almost dead-on along the positive $x$-axis, setting the stage for an analytical breakdown of higher-order rational approximations to $\pi$.
[11:19](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=679s) The 710 Radians Approximation and Pi
710 radians evaluates to $710 / 2\pi$ complete revolutions, which equals approximately $113.000095$ full turns. This corresponds to the rational fraction $710/113$ being an exceptionally close approximation of $2\pi$, or in its more familiar reduced form, $355/113 \approx \pi$. That fraction provides an unusually precise rational estimate for $\pi$—far more accurate than comparable approximations achievable for other fundamental mathematical constants such as $\phi$, $e$, or $\sqrt{2}$.
Because $710$ radians is almost an exact whole number of full revolutions ($113$ full turns plus just under one ten-thousandth of a turn), moving outward in steps of $710$ produces points whose polar angles match almost perfectly with the previous point, shifting by only an imperceptible fraction of an angle. Outward sequences along these residue classes modulo $710$ appear as straight radial lines across large scales. Rendering all 710 individual residue classes simultaneously overwhelms standard screen resolutions, packing them into an indistinguishable cloud. Restricting the visualization strictly to prime numbers removes most of these classes and makes the individual rays visible. At sufficiently high magnification, a gentle curvature becomes discernible; as Grant Sanderson notes, “the fact that it takes so long to become prominent is a wonderful illustration, maybe the best illustration I've ever seen, for just how good an approximation this is for 2 pi.”
- $710 / 2\pi \approx 113.000095$ rotations. - Ratio $710/113 \approx 2\pi$ reduces to $355/113 \approx \pi$. - Recommended reference for rational approximations: Mathologer's video on continued fractions and approximations.
---
[12:59](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=779s) Residue Classes Modulo 710 and Prime Rays
The mechanism behind the ray patterns seen modulo $710$ matches the mechanics seen modulo $44$. The prime factorization of $710$ is $2 \times 5 \times 71$. Any residue class sharing one of these prime factors cannot contain primes (other than the single prime factor itself). Consequently:
1. All even residue classes are excluded, leaving every other ray empty. 2. Among the odd residues, all multiples of $5$ are excluded, removing every fifth ray from the remaining set. This accounts for the visual grouping of the surviving prime lines into clumps of four. 3. Residues divisible by $71$ are eliminated next, removing occasional specific rays and creating the “missing tooth in your comb” pattern visible across the rays.
```mermaid flowchart TD accTitle: Filtering Residue Classes Modulo 710 accDescr: Elimination of composite residue classes modulo 710 to determine the 280 coprime classes.
subgraph AllClasses["Full Residue System"] A["All 710 residue classes (mod 710)"] end
subgraph Sieving["Elimination of Shared Factors"] B["Eliminate multiples of 2<br>(355 even rays removed)"] C["Eliminate multiples of 5<br>(Leaves clumps of 4 rays)"] D["Eliminate multiples of 71<br>(Creates occasional 'missing teeth')"] end
subgraph Result["Coprime Classes"] E["280 Allowable Residue Classes<br>phi(710) = 280"] end
A --> B B --> C C --> D D --> E ```
The count of allowable rays that remain—$280$ in total—equals the number of integers from $1$ to $710$ that are strictly coprime to $710$. This count is the value of Euler’s totient function, $\phi(710)$. While eliminating shared factors does not guarantee an infinite collection of primes in every remaining class, the plot demonstrates empirically that the prime points spread themselves out evenly across these $280$ remaining lines.
---
[14:38](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=878s) Base 10 Residue Classes and Dirichlet’s Theorem
To illustrate how primes distribute across allowable residue classes without the visual clutter of large moduli, consider arithmetic modulo $10$, which groups integers by their terminal base-10 digit. A prime number strictly greater than $5$ cannot terminate in $0, 2, 4, 6,$ or $8$ because it would be divisible by $2$, nor can it terminate in $5$. Any prime larger than $5$ must end in either $1, 3, 7,$ or $9$.
Tracking the proportion of primes that end in each of these four digits using a cumulative histogram confirms that the initial columns for $2$ and $5$ quickly decay toward zero. Meanwhile, the proportions of primes ending in $1, 3, 7,$ and $9$ level off toward an equal balance of roughly $25\%$ ($1/4$) each. While one might intuitively assume that primes should have no bias, primes are completely deterministic rather than random, making such balance difficult to prove: “primes aren't random, they are a definite sequence, and they show patterns in other ways, and it's highly non-obvious how you would prove something like this.”
Formally, if one counts the primes $p \le x$ that satisfy $p \equiv 1 \pmod{10}$, the fraction of such primes relative to all primes up to $x$ approaches $1/4$ as $x \to \infty$. The identical asymptotic limit of $1/4$ applies to the remaining allowable classes ($3, 7,$ and $9$).
---
[16:45](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=1005s) General Formulation of the Distribution
The equal division seen in base 10 applies to any modulus $n$. Modulo $44$, for example, cumulative tracking over the $20$ allowable coprime residue classes shows each class receiving an identical $1/20$ ($5\%$) share of the primes in the long run. In the polar prime plot, this ensures every visible spiral arm accumulates the same density of prime points.
```mermaid flowchart LR accTitle: Prime Distribution in Residue Classes accDescr: Mapping primes up to x into coprime residue classes modulo n.
subgraph Inputs["Parameters"] X["Upper bound x"] N["Modulus n"] R["Coprime residue: gcd(r, n) = 1"] end
subgraph Counting["Prime Counts"] Numerator["pi(x; n, r): Primes p <= x with p = r (mod n)"] Denominator["pi(x): Total primes p <= x"] end
subgraph Limit["Asymptotic Ratio"] Target["Fraction approaches 1 / phi(n) as x -> infinity"] end
X & N & R --> Numerator X --> Denominator Numerator & Denominator --> Target ```
In general mathematical notation, for any integer modulus $n$ and any residue $r$ that is coprime to $n$ ($\gcd(r, n) = 1$):
$$\lim_{x \to \infty} \frac{\pi(x; n, r)}{\pi(x)} = \frac{1}{\phi(n)}$$
where $\pi(x)$ is the standard prime-counting function and $\phi(n)$ is Euler's totient function.
While elementary formulations of Dirichlet's theorem state that every arithmetic progression $a k + r$ with $\gcd(a, r) = 1$ contains infinitely many primes, Dirichlet's method established that primes possess an equal analytical density across all allowable classes. Showing that an allowable progression commands a constant non-zero fraction of all primes proves that it must contain an infinite number of primes.
Dirichlet’s proof in 1837 introduced complex analysis into number theory through $L$-functions and Dirichlet characters. Exploring how discrete integers divide into residue classes through the lens of continuous, complex-variable calculus became standard practice, underlying modern work on bounded prime gaps and progress toward the twin prime conjecture.
- Dirichlet proved the theorem in 1837, establishing modern analytic number theory. - The symbol $\pi(x)$ denotes the prime-counting function despite using the Greek letter pi. - The mathematical machinery requires complex analysis—calculus on functions with complex inputs and outputs.
---
[20:17](https://www.youtube.com/watch?v=EK32jo7i5LQ&t=1217s) Value of Mathematical Play and Rediscovery
The visual trick of plotting $(p, p)$ in polar coordinates is ultimately arbitrary: “The original bit of data visualization whimsy that led to these patterns, well, it doesn't matter, no one cares.” Integer radians generate artifacts that have no intrinsic physical or geometric significance. However, open-ended visual curiosity often leads directly into meaningful mathematics, because fundamental mathematical concepts are deeply interconnected.
Encountering concepts through self-directed investigation gives structural meaning to formal definitions before they are encountered in textbooks:
> “If you effectively reinvent Euler’s totient function before you’ve ever seen it defined, or if you start wondering about rational approximations before learning about continued fractions, or if you seriously explore how primes are divvied up between residue classes before you’ve even heard the name Dirichlet, then when you do learn those topics, you’ll see them as familiar friends, not as arbitrary definitions, and that will almost certainly mean that you learn it more effectively.”
## Mentioned 3Blue1Brown, Grant Sanderson, Peter Gustav Lejeune Dirichlet, Leonhard Euler, Bernhard Riemann, Charles Jean de la Vallée Poussin, Greg Martin, Dwymark, Vincent Rubinetti, Mathologer, Numberphile, Math Stack Exchange, Manim
## Video description A curious pattern, approximations for pi, and prime distributions. Help fund future projects: https://www.patreon.com/3blue1brown An equally valuable form of support is to simply share some of the videos. Special thanks to these supporters: http://3b1b.co/spiral-thanks
Based on this Math Stack Exchange post: https://math.stackexchange.com/questions/885879/meaning-of-rays-in-polar-plot-of-prime-numbers/885894
Want to learn more about rational approximations? See this Mathologer video. https://youtu.be/CaasbfdJdJg
Also, if you haven't heard of Ulam Spirals, you may enjoy this Numberphile video: https://youtu.be/iFuR97YcSLM
Dirichlet's paper: https://arxiv.org/pdf/0808.1408.pdf
Timestamps: 0:00 - The spiral mystery 3:35 - Non-prime spirals 6:10 - Residue classes 7:20 - Why the galactic spirals 9:30 - Euler’s totient function 10:28 - The larger scale 14:45 - Dirichlet’s theorem 20:26 - Why care?
Corrections: 18:30: In the video, I say that Dirichlet showed that the primes are equally distributed among allowable residue classes, but this is not historically accurate. (By "allowable", here, I mean a residue class whose elements are coprime to the modulus, as described in the video). What he actually showed is that the sum of the reciprocals of all primes in a given allowable residue class diverges, which proves that there are infinitely many primes in such a sequence.
Dirichlet observed this equal distribution numerically and noted this in his paper, but it wasn't until decades later that this fact was properly proved, as it required building on some of the work of Riemann in his famous 1859 paper. If I'm not mistaken, I think it wasn't until Vallée Poussin in (1899), with a version of the prime number theorem for residue classes like this, but I could be wrong there.
In many ways, this was a very silly error for me to have let through. It is true that this result was proven with heavy use of complex analysis, and in fact, it's in a complex analysis lecture that I remember first learning about it. But of course, this would have to have happened after Dirichlet because it would have to have happened after Riemann!
My apologies for the mistake. If you notice factual errors in videos that are not already mentioned in the video's description or pinned comment, don't hesitate to let me know.
Thanks to these viewers for their contributions to translations Hebrew: Omer Tuchfeld
------------------
These animations are largely made using manim, a scrappy open-source python library: https://github.com/3b1b/manim
If you want to check it out, I feel compelled to warn you that it's not the most well-documented tool, and it has many other quirks you might expect in a library someone wrote with only their own use in mind.
Music by Vincent Rubinetti. Download the music on Bandcamp: https://vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown
Stream the music on Spotify: https://open.spotify.com/album/1dVyjwS8FBqXhRunaG5W5u
If you want to contribute translated subtitles or to help review those that have already been made by others and need approval, you can click the gear icon in the video and go to subtitles/cc, then "add subtitles/cc". I really appreciate those who do this, as it helps make the lessons accessible to more people.
------------------
3blue1brown is a channel about animating math, in all senses of the word animate. And you know the drill with YouTube, if you want to stay posted on new videos, subscribe: http://3b1b.co/subscribe
Various social media stuffs: Website: https://www.3blue1brown.com Twitter: https://twitter.com/3blue1brown Reddit: https://www.reddit.com/r/3blue1brown Instagram: https://www.instagram.com/3blue1brown_animations/ Patreon: https://patreon.com/3blue1brown Facebook: https://www.facebook.com/3blue1brown
[Source](https://www.youtube.com/watch?v=EK32jo7i5LQ)