Why do prime numbers make these spirals?

Share
Embed
  • Published on Oct 8, 2019
  • A story of mathematical play.
    Home page: www.3blue1brown.com
    Brought to you by you: 3b1b.co/spiral-thanks
    Based on this Math Stack Exchange post:
    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.
    ruclip.com/video/CaasbfdJdJg/video.html
    Also, if you haven't heard of Ulam Spirals, you may enjoy this Numberphile video:
    ruclip.com/video/iFuR97YcSLM/video.html
    Dirichlet's paper:
    arxiv.org/pdf/0808.1408.pdf
    Important error correction: 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.
    ------------------
    These animations are largely made using manim, a scrappy open-source python library: 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:
    vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown
    Stream the music on Spotify:
    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 RUclip, if you want to stay posted on new videos, subscribe: 3b1b.co/subscribe
    Various social media stuffs:
    Website: www.3blue1brown.com
    Twitter: 3blue1brown
    Reddit: www.reddit.com/r/3blue1brown
    Instagram: 3blue1brown_animations
    Patreon: patreon.com/3blue1brown
    Facebook: 3blue1brown

Comments • 3 525

  • 3Blue1Brown
    3Blue1Brown  Month ago +371

    Important error correction: 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.

    • zcneideck
      zcneideck 9 hours ago

      Hey Grant I love you videos and when I found a youtuber that has sectoral heterochromia i was shocked cause i have it too! The bottom 2/3 of my left eye is brown while the top 1/3 is blue (my right eye is blue as well) just thought it was awesome. Have a great day

    • Mohamed Clean dya
      Mohamed Clean dya 20 hours ago

      Hey guys I have a library (for sale) full of mathematics contains 3000 books in English and arranged levels added to it covers all fields of mathematics with this library contains more than 10000 research in various mathematical disciplines of the subject matter Valsalttalat with me on the following WhatsApp 212699501527

    • Davi Gabriel
      Davi Gabriel 2 days ago

      I'm a Math Enthusiast and Student. Your video showed me how even more fascinating is Mathematics, prime numbers are some Mystery still. We don't know even a half of all the properties prime numbers show. We have a lot yet to discover, hopefully we'll get there.

    • Davi Gabriel
      Davi Gabriel 2 days ago +1

      Yeah, i heard actually Dirichlet's theorem states that there are infinitely many positive integers 'k' such that ak+b is prime, where a, b are coprime positive integers.

    • Lee KX
      Lee KX 3 days ago

      Bernstein Polynomials and Bezier Curves

  • MrTonemaster
    MrTonemaster Minute ago

    Mandelbrot me here

  • artificium
    artificium 3 hours ago

    Very cool

  • 邱心培
    邱心培 4 hours ago

    So when will you update your differential equations series video?

  • Just dropped in
    Just dropped in 6 hours ago

    RUclip: simple sentence. zero dimensional space
    nice name - lousy work

  • Bloody Bandit
    Bloody Bandit 9 hours ago

    3:00 and if you zoom out, I think those gaps will turn into more spirals

  • Giorno Giovanna
    Giorno Giovanna 19 hours ago

    SPIRAL POWER; TENGEN TOPPA GURRAN LAGAAN. SPIN ON.

  • Mohamed Clean dya
    Mohamed Clean dya 20 hours ago +1

    Hey guys I have a library (for sale) full of mathematics contains 3000 books in English and arranged levels added to it covers all fields of mathematics with this library contains more than 10000 research paper
    in various mathematical disciplines of the subject matter Valsalttalat with me on the following WhatsApp 212699501527

  • hj yum
    hj yum Day ago

    김종대 대답해

  • RishiNandha
    RishiNandha Day ago

    Beautiful

  • Ivan
    Ivan Day ago

    I DONT UNDERSTAND, IM DUMB??

  • Aiden Chow
    Aiden Chow Day ago +1

    hey i saw you at bmmt showcasing this video

  • Will Z
    Will Z Day ago +1

    Saw you at BmMT this Sunday giving this lecture XD

  • TheCubic One
    TheCubic One Day ago

    6:35 I am sorry but wtf is that way of dividing?

  • Sagarmatha
    Sagarmatha Day ago

    please make a series on the z-transform and another discrete mathematics thanks

  • Melissa Mynkz
    Melissa Mynkz Day ago

    Is anyone else seeing the matrix in this!!!! (Or is it just the mushrooms I've eaten today?!?!)

  • Live Free
    Live Free 2 days ago

    I am a poor maths student but this is stunning why couldn’t we be taught like this at school

  • AlexMeow bleufeline
    AlexMeow bleufeline 2 days ago

    12:40 is magical

  • AI Totem
    AI Totem 2 days ago

    Yeah... I'm going to have to watch this one 10 times to get every part of it. Worth it though!

  • carlos der
    carlos der 2 days ago

    Why the fuck has RUclip been hidden your channel from me?

  • Shashank V M
    Shashank V M 2 days ago

    I have the answer: It is because you are using polar plots.

  • Davi Gabriel
    Davi Gabriel 2 days ago

    If pi(x) ~ log(x) then the amount of primes smaller than x and congruent to r mod n is log(x)/phi(n) for x and n, sufficiently big.

  • Aditya Kumar
    Aditya Kumar 2 days ago

    primes are amazing

  • ganondorfchampin
    ganondorfchampin 3 days ago

    Speaking of Dirichlet, could you do something on the Dirichlet distribution?

  • Neil Bedwell
    Neil Bedwell 3 days ago

    I wish I understoof logic/mathematical proofs

  • paul maydaynight
    paul maydaynight 3 days ago

    ruclip.com/video/oWiYsRi2Dss/video.html
    Professor Eric Laithwaite: Motors Big and Small - 1971

  • No Hackers
    No Hackers 3 days ago

    so I learned that 6k + 3 is always a factor

  • dittbub
    dittbub 3 days ago

    Demystifying something... but actually becomes even more mystifying!

  • obrecht72
    obrecht72 3 days ago +1

    Great video. I always love how these fun visuals can emerge from maths.

    • obrecht72
      obrecht72 3 days ago

      By the way, am I the only one that gets a "Travel with Rick Steves" tone in the narrator's voice?

  • Jigsaw
    Jigsaw 4 days ago

    would like someone to show how they calculate a non-trivial zero of the zeta function describing how they get form point A TO B.......C......? fx explainiung how the first non-trivial zero gets mapped to zero and through which mechanisms?

  • Alex FV
    Alex FV 4 days ago

    I have an undergrad in mathematics and this video really blows my mind!

  • suncica kovacic
    suncica kovacic 4 days ago

    Just when I think there couldnt possibly be any coordinates in the video, how the hell do you ruin even number theory with coordinate nonsense..

  • Sol Feinberg
    Sol Feinberg 4 days ago

    3:06 the question for you and me is, "I'm sorry, what?"

  • mark bogacki
    mark bogacki 4 days ago +1

    Thank you
    this is so nice .

  • Jackj106 [Karakara]
    Jackj106 [Karakara] 4 days ago

    Holy shit. This is gonna have to be used in a game I make at some point in the future.
    Like take a bitmap and have a working copy, where the working copy shifts it’s pixels at each prime to the previous prime, which would theoretically slowly pull the image inwards like a black hole effect. If I make a demo of this, I’ll post it as a reply to this comment :)

  • Rajasekhar Varri
    Rajasekhar Varri 4 days ago

    Sir are you doing videos on quantitative aptitude

  • pk rasel
    pk rasel 5 days ago

    please,,, upload Complex number & Trigonometry video series...

  • EKDesign
    EKDesign 5 days ago

    It would be cool to see this as 3D VR visualization

  • invisiblekincajou
    invisiblekincajou 5 days ago

    MY BRAIN HURTS

  • yessirge
    yessirge 5 days ago

    Beautiful video.

  • Al Garnier
    Al Garnier 5 days ago

    Because prime numbers represent the resonant frequencies of wavefunctions that create matter formation in a free electron medium.

    • Al Garnier
      Al Garnier 5 days ago

      @TZero - VFX & Compositing
      If you're interested, this video is a good example of the math that answers your question. It's based on wavefunctions and their resonant intercepts. The most prominent resonant positive nodes are particles of prime number exponants, while the resonant negative nodes are virtual particles.

    • TZero - VFX & Compositing
      TZero - VFX & Compositing 5 days ago

      @Al Garnier thanks, could you please point me at some paper about this concept? especially one that relates it to prime numbers, I'm interested

    • Al Garnier
      Al Garnier 5 days ago

      @TZero - VFX & Compositing
      Resonant frequecies of particle wavefunctions are created by the impact of a big bang and are composed of the peaks and troughs of oscillating waves where particles of matter congeal into atoms through the effects of gravity and entropy over its lifetime.
      Everything has a lifetime within a thermodynamic, gravitational field. But, not everything of matter has a conscious life function. Nothing of substance lasts forever in the "known" universe.

    • TZero - VFX & Compositing
      TZero - VFX & Compositing 5 days ago

      what does resonant frequencies of wavefunctions mean? mathematically

  • harsh vardhan dwivedi
    harsh vardhan dwivedi 5 days ago +4

    Can you make a video on explaining "Entropy" and its significance towards understanding physical and chemical processes

  • Number Number
    Number Number 6 days ago

    Nudge one to one general direction every so often at any interval and you get a spiral. People put their names on number patterns they thought up or noticed in things. Some people memorize them, for when it's time to talk about them.

  • Milad Kiaee Darunkola

    awesome explanation.

  • Sang Jin Kim
    Sang Jin Kim 6 days ago +1

    Great!

  • Gemini cash
    Gemini cash 6 days ago

    Dm me about the lottery

  • Francis Arthur
    Francis Arthur 6 days ago

    I haven't smoked weed in 30 years but I almost felt like it hehe

  • Nick 111
    Nick 111 6 days ago

    And all that most of your talk about your infinity stuff is stupid..for me at least. Sounds like I was reading your chatbot org forum again. ...sorry... but thats what it looks like to me. :)

  • Nick 111
    Nick 111 6 days ago

    And yeah ... U say irrational number is something which has infinte number of non repeating pattern after decimal place or wjhatever. I just say its a complex number... got some fixed(confirmed part) a plus some imaginary part 'ib'...your non repeating pattern. Infinte or not u can say actually cause u never tried upto the conclusion. So I use imaginary in general sense cause it could be anything u aint sure about cause u never explored it to end ...due to any reason...time constraint...space constraint... or even negligible effect criteria. whatever doesn't matter. So this is what it is but its still a assumption that it could be just this.
    So question is not if irrational number have infinite non repeating pattern but can there be such non repeating pattern when we deal with some whole number division... sure there can be... And again I suspect your this very 1 the culprit. :)
    Problem become complex when u try it on any number combo not just whole numbers... but u guys must have solved all that by now... I just havent ...that's all. Never had time for maths u know it. Ab aap phaticharo se lad lega ya math hi kar lega aadmi u c...smile
    Anyway wassey bhi apan koi badey mathematic mind nahin hain... but I still am liking all this... till it does go real fuzzy or too much for me to deal with. Then u know I am gonna bail out in secs. :)
    Anyway Thanks for the paper...and take care of my viku! ;)
    ok ok not my..but...smile

    cya

  • Nick 111
    Nick 111 6 days ago

    Btw globs I am liking your that turing book... though some of it contents remind me of your that stupid chatbot.org site rather than some truth or real problem explanation. Like they describe or approach the subjects there...Phaltu time khoti karne ke liye bana rakhi hai :)
    but anyway like this book of yours...nice book...or paper whatever.
    And good video here too... I kinda like this.

  • Nick 111
    Nick 111 6 days ago

    This small fractional part creating all the problems... thats why some old wise say... u should nip the problem in budding stage or it might grow exponentially so much where u wont even recognize it with its primitivity. Ki what it was in first place.

    But could happen with any number exclusion in general. So there could be trine, srine, drine any no of typical series.

  • Nick 111
    Nick 111 6 days ago

    because of exclusion of 1 as one of divisor...nothing could be more simpler explanation I suppose! :)

  • Arman Shah Mansori
    Arman Shah Mansori 7 days ago

    Which app or apps do you use to make these animated geometrical shapes?

  • Dom Cailliez
    Dom Cailliez 7 days ago

    dumbfounds me ...awe & admiration ...i love numbers

  • Hien Duong Van
    Hien Duong Van 7 days ago

    14:42 , Jean Pierre Polnareff?

  • Viktor Hahn
    Viktor Hahn 8 days ago

    Very nice video, but please learn to correctly pronounce the name Dirichlet. Why are only the English speakers so arrogant to not bother with pronunciation of foreign names.

  • Fraisel D
    Fraisel D 8 days ago

    So this is the spiral power... Not bad.... not bad at all....

  • That One Guy
    That One Guy 8 days ago

    12:41
    youtube compression

  • sexntuna
    sexntuna 8 days ago

    Such a cool video! Must have taken a lot of time. Kudos!