Spirals, Rays, and Dirichlet’s Theorem: What Prime Numbers Reveal in Polar Coordinates
Introduction
I first encountered the pattern while browsing a Math Stack Exchange question by user Dwymark answered by Greg Martin. The puzzle involved plotting points
(r, θ) = (p, p) where p is a prime, using polar coordinates (radius r and angle θ in radians). The visual looked chaotic at first, but zooming out revealed striking spirals and straight‑line rays.
Polar Coordinates and the Archimedean Spiral
- In polar form a point is given by (r, θ); here r = θ = integer.
- Plotting (1,1), (2,2), (3,3)… creates an Archimedean spiral because each step adds one unit of radius and rotates the “hand” by one radian (≈ 57.3°).
- The spiral is smooth because adding 6 radians is almost a full turn (2π ≈ 6.283). This near‑periodicity produces six faint arms when the whole integer set is displayed.
Filtering Primes – Emerging Spirals
- Removing all non‑prime points leaves a pattern that still shows spirals, but many arms disappear.
- Primes cannot be multiples of 6, nor can they be even or divisible by 3 (except 2 and 3). Consequently only the residue classes 1 mod 6 and 5 mod 6 survive, giving two visible arms at the small scale.
Residue Classes Mod 6 and Mod 44
- A residue class mod m groups numbers that leave the same remainder when divided by m.
- For m = 6 the six classes correspond to the six near‑full‑turn steps, producing six intertwined spirals.
- For m = 44 the approximation 44 ≈ 7·2π (or 22/7 for π) makes 44 steps almost a whole number of turns (just over 7). Hence 44 residue classes appear as gently rotating spirals.
- Primes survive only in classes that are coprime to 44 (i.e., not divisible by 2 or 11). Euler’s totient gives φ(44)=20 such classes, which explains the 20 visible arms when primes are plotted.
The Role of Rational Approximations to 2π
- The quality of the visual pattern depends on how closely k radians approximates an integer multiple of 2π.
- 6 ≈ 2π, 44 ≈ 7·2π, and 710 ≈ 113·2π are successive, increasingly accurate approximations.
- The famous 355/113 approximation for π underlies the 710‑step case: 710/2π ≈ 113.000095, so each 710‑step adds almost no angular change, turning spirals into almost straight rays.
Mod 710 and the 280 Rays
- 710 = 2·5·71. Numbers coprime to 710 are those not divisible by 2, 5, or 71. Counting them gives φ(710)=280, matching the 280 rays observed in the prime‑only plot.
- The rays appear in clumps of four because the four residue classes that survive after eliminating multiples of 2, 5, and 71 are spaced regularly.
Dirichlet’s Theorem and Uniform Distribution of Primes
- Dirichlet’s theorem (1837): For any modulus n and any residue r coprime to n, the arithmetic progression r, r+n, r+2n,… contains infinitely many primes.
- Moreover, the primes are asymptotically evenly distributed among the φ(n) admissible residue classes. Formally, the proportion of primes ≤ x that lie in a given class tends to 1/φ(n) as x → ∞.
- Histograms for mod 10, mod 44, and mod 710 illustrate this uniformity: each allowed last digit (or residue) receives roughly the same share of primes.
- The proof uses analytic number theory and complex analysis (Dirichlet L‑functions), a deep bridge between discrete primes and continuous calculus.
Visualizing the Theorem
- The spirals for mod 6, mod 44, and mod 710 are concrete pictures of Dirichlet’s theorem in action.
- When the modulus is a good rational approximation to 2π, the angular drift per step is tiny, turning spirals into almost straight lines—exactly what the prime‑only plots show.
Why the Whimsy Matters
- The original polar‑coordinate plot was a playful curiosity, yet it leads to profound concepts: residue classes, Euler’s totient, rational approximations of π, and Dirichlet’s theorem.
- Exploring such visual experiments can make abstract number‑theoretic ideas feel familiar before formal definitions appear, enhancing learning and retention.
Conclusion
The striking spirals and rays that emerge when primes are plotted as (p, p) in polar coordinates are not mysterious magic but the geometric shadow of two well‑understood number‑theoretic facts: (1) certain integers (6, 44, 710…) are exceptionally close to integer multiples of 2π, and (2) Dirichlet’s theorem guarantees that primes are evenly spread among the residue classes that are coprime to the chosen modulus. The visual patterns thus become a vivid illustration of deep results about the distribution of prime numbers.
Prime numbers, when visualized in polar coordinates, reveal spirals and rays that are explained by rational approximations of 2π and Dirichlet’s theorem on the uniform distribution of primes among coprime residue classes.
Frequently Asked Questions
Who is 3Blue1Brown on YouTube?
3Blue1Brown is a YouTube channel that publishes videos on a range of topics. Browse more summaries from this channel below.
Does this page include the full transcript of the video?
Yes, the full transcript for this video is available on this page. Click 'Show transcript' in the sidebar to read it.
Helpful resources related to this video
If you want to practice or explore the concepts discussed in the video, these commonly used tools may help.
Links may be affiliate links. We only include resources that are genuinely relevant to the topic.