DoujinStars
3blue1brown
3blue1brown

patreon


Prime spirals (early view)

Hi Everyone,

As usual, I'd like to give you an early view of the current project before it goes live this coming Sunday.  I really enjoyed getting your input last time on the Windmill puzzle, it made the ending message better than it otherwise might have been, so I wanted to do something similar here.

At the moment, the video is left without a real ending.  What's linked above is simply the core puzzle and a solution.  What I'd like to convey after that solution is some message on the value of mathematical play, in particular when you keep asking deeper questions even after finding an initial answer.

In this case, after the initial explanation, there are a few types of questions I could imagine someone asking:

All in all, the aim will be for the concluding message to talk about how often otherwise pointless and arbitrary mathematical play, say with some data visualization like this, can surprisingly lead you to deep core ideas from math.

Let me know which, if any, of the possible directions above appeal to you.

-------------

If you're curious, as mentioned in the previous post, there are two other projects in the pipeline.  One is a full story of e, which I originally started as part of the differential equation series (where it will likely still end up), though it will likely end up being multiple full videos itself.  That's the one I think of as most important, so I'll probably hop back on that train for the next few weeks.  The other is the hyperdarts puzzle, teased in that post, which is the fall-back during writer's block.

-Grant

Prime spirals (early view)

Comments

Love it! Patterns in prime numbers are one of the greatest enigmas of mathematics. Are they really there or are we just imagining it? Or is it wishful thinking? Kind of reminds me of this Numberphile video: https://www.youtube.com/watch?v=pAMgUB51XZA (forward to about 7:50) Only this video has a different angle (pun intended) and shows that it does not only matter _what_ you look at, but also _how_ you look at it. I vote for option 1.

Would love to see an explanation of option 1 and learn more about the seemingly random distribution of primes within the remaining spirals

Great-Grant video, thanks a lot! If I ever upgrade my graphics card it would be to rewatch this video in 4k x-) Can you expand this explanation with complex numbers?

Lazar Staykov

I feel like the video is kind of being directed toward option 1 and 2 more so than option 3. It is always nice to show connections between topics, especially those covered in other videos, but there is also something to be said about pursuing topics that might not have been covered in a video like this on a math channel. Seeing the connection to Ulam Spirals would be interesting, but it might not be as enriching as seeing Dirichlet's theorem or what it means to be a "good approximation". As for my preference it's hard to say. I have heard of Dirichlet's theorem but know almost nothing about it. However, the concept of a "good approximation" reminds me of estimators in statistics and how finding "good" ones and defining what "good" means is a very rich topic. That's the trouble with math. Too many fun topics to explore!

One thing I noticed was that the bitrate on this can sometimes really hurt the video quality.

_ericBG

Is there a relationship between the spirals and the Riemann hypothesis and/or the twin prime conjecture that could be explored?

Option 1 seems the most satisfactory direction. It brings the focus back to the intention behind the thread.

Poker Chen

As I was watching I kept wondering if this concept would be a good Prime Number Sieve https://en.wikipedia.org/wiki/Generation_of_primes#Prime_sieves or has it already been used for that purpose in one of the many algorithms listed? Would these patterns be a form of Wheel Factorization? https://en.wikipedia.org/wiki/Wheel_factorization

Ron Jensen

Wouldn't the spirals go away with any arbitrary fraction of pi? e.g. plot(z, z*pi / k) where k is an integer? or k is a rational real?

Ron Jensen

You could do a slider to change the angle and see if there’s anything interesting in that visualization— would be different at different scales

If we consider 103993 in 103993/33102 it is prime. It would look like "no spirals are removed". However, 104348 in 104348/33215 is not (2*2*19*1373). It probably has a nice pattern again.

I'm very partial to option 1. As you mention, I can think of other fun & popular videos from other math youtubers on Ulam spirals (Numberphile) and continued fractions (Matt Parker), but I find the first option very interesting and a complete mystery.

Kyle Wright

Yes! It's a very nice connection. I'll probably link to the Mathologer video on the matter somewhere in the description, if not in the main video.

3blue1brown

This deals entirely with arithmetic progressions, or in other words, linear polynomails in the integers. What Ulam Spirals expose are _quadratic_ polynomials that are rich in primes.

3blue1brown

Good suggestion. It's interesting how changing the angle can, in effect, give a way to see rational approximations of other irrational numbers. I think I might even add a little more commentary on modular arithmetic, and some of the ideas there, for those viewers who haven't seen it.

3blue1brown

If only! It's just a typo.

3blue1brown

I love that you misspelled "sory what's wrong" at 2:50 on porpoise...

Great video! Option #1 was what I was thinking as I watched. Also the choice of plotting x as x radians of rotation seems a potentially interesting thing to vary to see how the visuals change (i.e. use a different angle e.g. x/3). I also think this could be a very interesting video to share with students first learning about modular arithmetic and residue classes -- so pretty and easy to understand, and it reinforces definitions/basic concepts in an interesting context.

I thought about that, too. After being just as disappointed as everyone else by Grant's video (the conclusion within, of course :D ), I thought the Ulam spirals must be different because the position around the spiral is not directly proportional to the magnitude, as it is with the above examples. But then again, even if it's not a direct proportionality, there is certainly a mathematical relationship which would simply manipulate the spokes and make them manifest in slightly different ways. I'm convinced a keen comparison would yield explanation for some if not many of the seemingly magical patterns that arise in the Ulam spirals, too.

PeetieGonzalez

> Does this have anything to do with Ulam Spirals? ... (short answer, no) How obvious/non-obvious is it that these are not related? Aren't polar coordinates just another spiral arrangement?

Job van der Zwan

Great video as always! My train of thought at the end immediately went to Phi and flower patterns. I'm fascinated by the connections between spirals and rational approximations - I guess the numerator is the amount of spirals, and the denominator is how far you have to zoom out to see them? You've also made it clear that a good rational approximation means a less curved spiral, which is why Pi has a nearly straight line for 355/113, and Phi being the "most irrational" number means the spirals are as curved as possible. (which makes sense when you relate it back to flowers and seed distribution!) Sorry for the ramble, it's just awesome when stuff comes together. :)

wye

Excellent video. Thank you. I would be interested in the topic of approximations.

Chris Tietjen

Typo: "sory" [single "r"] at 02:49. Also, given how the "710" spirals look so close to straight lines, what's the next really good rational approximation to 2π and how does it appear as a new set of spirals? It would be really cool to see the next transition (6 → 44 → 710 → ???) Ulam spirals are a separate thing. I would do them as a second video.

Bob Dowling

I'm interested in option 1 and Dirichlet. I'm always looking for ways to connect your videos back to deeper areas of study.

Interesting. It makes me think of what relationship there is with Moiré Patterns--I believe Numberphile did a great video with Tadashi Tokieda on them years ago. Patterns appear even when the image is random and they sometimes look like prime spirals. I kind of like your idea of including other irrationals. I'd be curious to know if you substituted e radians instead of pi radians if it would create a different visual and whether that follows the same residue class patterns of pi.

I think pointing out relation (or lack thereof) with Ulam Spirals would be a good continuation, at the very least a mention, to make it completely clear... I'm guilty of thinking that's what I was watching until I read this :P.

Grant - great video. Have to point out small nit, but at 2:50 the small pi asks "Sory?" vice "Sorry?" I've been using these with a bootcamp for post-bachelor's degree researchers and they are incredibly motivating for curiosity and genuine appreciation for math. Thanks!!

I don't have smart comments. But watching the video makes me HAPPY! Take my appreciation, Grant. Thank you, sincerely.

I think I have seen something like this before and was able to figure out most of it before you explained it. One thing that might be a good steping-stone would be to show how these lines end up being actually straight if you don't pick the angles as multiples of the radius but as multiples of a fixed integer-fraction of tau (also: obligatory “use tau instead of 2pi”). Regarding the ending: To me 1 sounds the most interesting (never heard about it so far), but that might be the cryptographer in me who likes primes and discrete things more than those weird “real” numbers. ;-)

I noticed that as you were zooming out during the 710 section, there seemed to be some concentric rings forming. Would be neat to talk about that phenomenon.

Stacey Greenstein

If both r and theta are integers, you get an integer arc length. If they are equal, the arc length is a perfect square, and if they're both prime, you get a semiprime. That seems a lot more "natural" to me than to many of the other commenters, I think.

Kevin

Bothe? https://en.wikipedia.org/wiki/Walther_Bothe

Nate

Ah, good to know. I had yet to do any equalization on this track.

3blue1brown

Yes, I'd somehow like to better address the fact that it's a "strange" thing to do. As in, integer values for the angle are a bit weird and unnatural, and much of what we're seeing is just an artifact arising from that. At the same time, the hope is that there's a case to be made for how even "pointless" play like this can lead you to very substantive lines of questioning.

3blue1brown

Ah, great idea on just linking to the Mathologer video. No need to reinvent any wheels here.

3blue1brown

Great to know, it looks like many others agree.

3blue1brown

Well, other than the gap between 2 and 3, all these gaps are even numbers, so none will be prime. This is the sequence: http://oeis.org/A001223

3blue1brown

What a great phrasing, " anyone with enough curiosity or boredom(!), could doodle their way to fundamental patterns in numbers". I might just have to borrow that :)

3blue1brown

Even if it's too high level to prove Dirichlet's theorem, I certainly think it'd be within scope to describe what it's saying and how it applies here, if that's what people want to hear more about.

3blue1brown

Nope, total typo, thanks for the catch.

3blue1brown

Good catch, thanks!

3blue1brown

Hopefully, but I'm hesitant to make any promises. I know that I'd like to do the full description of exp before Laplace, since most of understanding the Laplace transform is being very comfortable with exponentials. I also have yet to decide exactly what angle I'd like to take on it. Should I present it from a signal analysis point of view? From a solving ODEs point of view? As an instance of "diagonalization" from linear algebra?

3blue1brown

Another thing: The sound was very low. I had trouble hearing. (It wasn´t my hardware because I am not having that problem with other videos.)

Daniel Armesto

I´d like to learn a litlle bit about Dirchlet´s theorem.

Daniel Armesto

We typically don't see integer thetas because they lead to exactly this sort of not-quite-aligning. If we plotted (p, p*tau/6) I'd expect two straight lines of primes. That's a lot less mysterious, which is both good and bad I guess?

Max Goldstein

These spirals seem like a strange thing to do, but since we're here now option #1 sounds most interesting to me.

Richard Kalhöfer

What if this video was secretly not about spirals at all but was actually a super secret and cool transition back to more Fourier?

This seems highly reminiscent of this video: https://www.youtube.com/watch?v=sj8Sg8qnjOg

Nate

Interesting video! The whole concept of spirals arises from the arbitrary choice of plotting an integer z at (z,z) on a polar graph. You could drive home that these spirals would go away if you plot (z, z*pi/3).

Option 1 is what I'm most curious about. Btw, with zooms like that I find it hard to keep a sense scale, even though they're very smooth and nice. I found myself wondering how big the numbers near the edge of the screen are, so maybe consider writing out one as an example?

Martin S

I think 1 is the most interesting, especially since there are numberphile and mathologer videos on the other two topics, which you could link to. I think getting into a bit of the meat of Direchelet would be a fun way to show that really deep patterns can be found in simple visuals, even if they aren't the ones you notice at first.

Gabe

Staying with the theme of fractional estimates of pi is good. I would be careful about introducing a new topic at the end of the video unless it is to lead into another video later.

It feels like the first and third options could sort of dovetail, since they both involve exploring for patterns in the primes. I'm a fan of Ulam spirals but they're also better covered, so if I had to pick one I guess I'd go for #3. It could also help to show the orginal 6 arm spiral pattern extended into the region where the 44 arm spiral becomes clearer.

L Tantivy

I appreciate that you don't want to spend a lot of time on Direchelet's theorum, but maybe give a little taste of it?

Burt Humburg

i think it would probably flow a bit better if you did the first one about the prime distribution, though I'm not confident in how interesting that would be (unless of course there's some other mind-blowing stuff about those distributions) because once it's been explained, the spirals don't really seem /that/ divine or special in nature, and chasing that dragon could just make the rest of the video a little like "well, it looks like maybe there might be a pattern, but who knows, whelp okay bye" maybe something that could make that hypothetical video more interesting would be switching the circle to less than 2π radians, like make the circle slightly more conic or anti-conic and wind/unwind the coil until other patterns start emerging and look for those same patterns in those too just to see whether 71 is actually special with regards to primes, or just coincidental, or something deeper, that the circle approximation number may or may not be intimately connected with the prime numbers' patterns' periods. personally, i would also enjoy to see the rest of the video about how the numerical approximations for pi were/are found because the ones we use for pi have always seemed so completely random, and that topic probably has a lot of interesting stuff to probe.

kendall

1) is more suited to the topic of the video. 2) is interesting and maybe should be its own video. 3) is close to the topic but there might not be as much to say here.

Kevin Iga

Great video! I would be more interested in option 1), I think that would be more interesting to explore. 2) and 3) maybe a bonus but 1) sparks the most curiosity (at least in me)

On a separate topic, are the gaps between primes ever primes themselves. If so, what is the sequence and what does it look like?

Does this mean the answer to life the universe and everything is really 44? I think the moral might be confirmation bias. We sometimes see things that are not really there, just because we want to. I was convinced it was a strange property of primes that you were about to reveal to us, only to be deflated. Still a lesson is there as the explanation is also revealing, but just not in the way we first expected. So never jump to conclusions, but always look for counter explanations. Oh, and great video again BTW.

Great video! Statistical bias (1) for different arms/spirals and Ulam's (3) could have their own mini video? And other types of prime spiral, and what they imply about the primes? Given the approximation to Pi have such a good visual explanation, it would be nice to develop that idea of "better" approximations a bit further - something that kept jumping to mind was "radius of curvature". It would also be really interesting to see how the patterns develop as you approach limits. Would you see 'straight' lines or a spiral if you zoomed out to infinity? I think this video is a really nice demonstration that meaningful math can be discovered from playing around, and that anyone with enough curiosity or boredom(!), could doodle their way to fundamental patterns in numbers. Keep up the good work :)))))

I'd be interested in further investigation of either of the first two options.

I forgot this wasn't a finished video and I ended it waiting for discussion about the first option, on whether primes were evenly spaced out (or if that's too high level, even talking about what it means for primes to be "randomly" distributed). The continued fraction approach isn't bad at all though, because as mentioned this is a very clean and lovely way of showing exactly how good these continued fractions are as approximations.

at 2:50 is the misspelling of "sorry" as "sory" intentional or a typo?

Bpendragon

Hey, 2:48 -> typo, "sory" As always, such a clear explanation ! Thanks a lot =)

I would like you continue with the first option to know more about the deep answer

I'm curious about your question #2, discussion of "how good" an approximation is. What are the "good" approximations for pi from 22/7 on up? How "far apart" are those good approximations?

hey, is the Laplace transform video coming out before January?

This is fantastic. A beautiful picture, which then seems to be constructed from crazy primes, with mystical patterns which turn out to all make perfect sense.


More Creators