Home Creators Posts Import Register Favorites Logout

Content

UPDATE: The final version of the video is out! Thanks for your feedback. https://youtu.be/SMsTXQYgbiQ

Hello. This is the video I am working on. You'll see the frame my previous post towards the end. No one guessed it was gaps between primes!

Anyway, this rough cut is missing some graphics and other ones are either not arranged properly yet, or are still only temp versions. But you get the idea.

Very keen to hear your feedback. Is the scrolling number line too much? (I like it but don't want to ruin anyone's viewing experience.) Does the video all make sense? Are there any mistakes? Can you provide an answer to the mystery of the line I mention at the end?

I am currently planning to release it on Monday, but we'll see.

Thanks!

PS The youtube ID on this video contains the word "Olden", with correct capitalisation, which is a town in Norway. Also the 'Olden days'. I think that is the longest word I've seen randomly in one of my youtube IDs!

PPS I've just noticed it's not "Olden" but rather "OIden" where the "I" is a capital i not a lowercase l. What a shame!

Files

Prime Line - rough edit

This is an advanced preview version of a rough cut of my next video. There are a bunch of graphics etc missing or unfinished. But if you have any feedback at this stage: put it in the comments here or head over to the Patreon post. https://www.patreon.com/posts/49551957/

Comments

DrDelvan

Oh man! We got close in our guesses at least.

Arnim Sommer

Hmmm... Did someone ever define twin primes as a pair of primes of same oddness where the difference between them is prime?

Marco Ferrari

As you asked: Number line, I think it is a little distracting, I've found myself from time to time looking at it trying to spot something strange, that never came. The video itself, interesting, even if not the smoothest to follow along (it can also be that I'm tired :P ) Hope it helps

Thecommexokid

You make a lot of fuss about halving/doubling the gaps but don’t ever use the halved values for anything. Why not just double the values of the x axis in those plots and not have to bring it up at all?

Thecommexokid

You ask whether the graph will continue to “lean against” the y axis, which I didn’t entirely understand when you first said it what you meant by that or what possibility you were contrasting it against. Then at the end of that section, you said that maybe 30 becomes the highest-frequency gap because the band gets fatter. In which case the fat band, considered as a 2D object, *would* still be leaning on the y-axis; I’m picturing a rectangle where the x=2 point and the x=30 point form the short edge. So I guess I still don’t know what you meant by “leaning” if you are trying to describe some behavior the graph is doing at 10^8 that it won’t still be doing at 10^35.

Alex

As someone with ADD the numberline continuously stole my eye attention but it is a neat visual representation to tie to the video. It seems to cause some wicked image aliasing especially when clipping on to and off of the edges of your shirt. So a partially opaque background (possibly a gradient up from the bottom) might help minimize the image artifacts.

Thecommexokid

I liked the scrolling number line as a constant visual reminder of the subject under discussion. It went away for the full screen animation at the 7-minute mark and I don’t know that it was really necessary for it to come back again after that. (Also, incidentally, I think that animation could have been a bit faster.)

Steven Craighead

Matt, I assumed you used linear regression. A side topic would be interesting to use quantile regression and target an extreme quantile like .0001 or .9999 to see if you can guesstimate the next prime. At least you could use these estimates to give you a confidence interval around the median

Michael Dyck

counterexample (to the assertion at about 11:00): m=4. m! = 24, so m!+2 to m!+m is 26,27,28, which is indeed a run of m-1 composite numbers, but 25 and 29 are not primes-separated-by-m, because 25 isn't prime.

Matt Parker

Yes, this method gives a run of m ‘or more’ gap between primes. It basically shows there is a run of m-1 composite numbers but says nothing about the primality of those either side of the run.

Michael Dyck

So you can use that construction to find a gap of *at least* m between two successive primes. Does there always exist a gap of *exactly* m (for any even m) between two successive primes?

Matt Parker

I don’t think there is a proof for ‘exactly any even m’, but I could be wrong.

Stephen Robinson

Did you have to calculate the primes while you were noting the differences, or did you have a table of millions of primes ready to go?

Matt Parker

I used my own (terrible) code to generate the primes on the fly as I was recording the gaps. (Fun fact: I reused the same code to make the scrolling number line thing.)

Matt Parker

Yes, originally I was going to stop it then, but decided to see how it would look if it came back and I liked it. I could maybe speed it up a bit if people think that would be better.

Matt Parker

My main/only concern is it stealing too much of people’s attention. But I found it drew my eye a bit but didn’t break my concentration. Keen to hear other people’s experiences. Yes: we’ll have a play with the quality for the final version. But that might be a frame rate issue with how I captured it (it’s a scrolling excel worksheet!).

Ewen McNeill

Personally I like the scrolling number line. Yes it’s a wee bit distracting, but I think in a good way, as it highlights how common the gaps are. I did kind of want the scrolling line to “skip ahead” (or speed ahead might be visually better) to an interesting point periodically though. Overall I think it’s an interesting video, and the visual flair helps follow along with the topic :-) Ewen

Matt Parker

That is a bit of an artefact because I re-did the axes on all the other plots. But I left it in because I use gap/2 for the that one plot where I get the equation of the line and integrate it. Maybe I should make that clearer.

Matt Parker

I thought about hiding jokes in the number line but decided that wound make it even more distracting! Yes, the video is a bit of a collection of things I found when I was nerd-sniped one day. Was wondering how cohesive it would feel for other people. Anything you think I should remove or add?

Matt Parker

I’m not sure but that is a great take!

Matt Parker

Thanks. I wouldn’t say the video was boring without it, but it definitely needed some visual flair! Plus I thought it helped give a kind of subtle intuition to the concept which helped the video. You can tell I thought of it after filming because I never mention it in the video!

Marco Ferrari

I've rewatched the video, I think the "big G" part is my candidate for shrinking/removal. Interesting on it's own but fills like a build up to something that never came. And the log log log log shower funny but not that big as a punch line in my humble opinion. Add in a section with you in the corner but without text on the left and a couple of tangents regarding the strange discovery and it results difficult to follow. But I hope this is only me :) Great work and thank a lot for sharing!

T Y

I think the scrolling number line was pretty neat and not too distracting. The animation of the gap distribution at ~7:00 felt like it could have been sped up 10% or so, but it could be I'm just impatient :). About the highest count, it looks like the slope of the log line gets less steep as you go on, in which case small random variations make it possible for larger numbers to get the top spot. I wonder how they calculated that certain numbers take over though, surely not by finding every prime up to 10e425?

Keith Moser

Darn it! I saw the previous still and thought it felt like it had something to do with prime numbers but I didn’t say anything. Just goes to show you—even baseless random gut feeling guesses turn out to be right sometimes!! 😆

David Garrison

at just after 9:00, you go into a section about picking any number, and finding a gap that big. But you had already mentioned that the gaps all have to be even, so you've contradicted yourself slightly.

Jan Strohbeck

For some reason, I didn't get what the plot at 0:44 represents when first watching the video. I also didn't understand the label of 'Tally' on the y-axis (but also English is not my first language). The animated plot at 7:00 says 'frequency of the gaps' on the y-axis, at which point things cleared up for me. I think if you had said that it's a histogram or if it was a bar chart instead of a scatter plot, I would have better associated it with occurrence frequencies. After watching the video again, I actually think that you explain it well, so maybe I just did not listen carefully enough. About the scrolling number line: I think I only looked twice at it, so I don't think it's distracting.

_ericBG

I liked the number line a lot! The one thing, my housemate watched it with me and she was very confused about the graph - I had to pause and explain what it was. May be worth explaining a bit more closely what it is; and similarly with the 6/30/210 stuff, but that may have been more due to her not paying that much attention by then!

MBP

I might have missed something, but in the part with eight factorial, I thought you meant you were proving that there was a gap of exactly eight, rather than a gap of at least eight.

MBP

Also, I think that the property of the graph of the gaps, being approximately linear in log space is a consequence of the density of the primes being approximately equal to 1/log(n). I get qualitatively similar results just choosing numbers randomly with 1/log(n) probability, and making a histogram of the gap size.

Topottsel

A different prime line and my favourite fact about primes (base 10 anyway.) I may have seen this on a Numberphile video. Is that all primes are all 1, plus or minus, a multiple of 6! (has a factor of 6) Quick example: 6x55=330 +1 = 331 (Prime) 6x56=337 +1 = 337 (Prime) 6x58=348 -1 = 347 (Prime) 6x58=348 +1 = 349 (Prime) So you can grab a really big prime number you want and you will be only ever be 1 plus or minus a multiple of 6: 87,178,291,199 (Prime) + 1 = 87,178,291,200 87,178,291,200 = 6 x 14,529,715,200 So you could just go infinitely up the 6 times table (or have it as a line), try taking away and adding 1 to all the multiples and testing if they are Prime. Though the gaps between Primes get so big this becomes pretty ineffficent at a point.

James P Kislanko

I wonder if the exponent in 10^-0.069 is really -LN(2)/10 = -0.06931471805599453094... and if it is does it relate to the theorem that there is at least one prime between N and 2N for all positive N?

Bruce Garner

Darn - missed it was the prime number gaps - I even realised the even aspect and the logarithmic scale. I like the scrolling number line.

Tom S

Great video as always Matt! I think there are an above average number of places you can get lost in this video compared to usual. I like the number line though, and it gives you something concrete you can always follow. A very slightly clearer explanation of the tally graph would be a good idea as it's not something you see every day and is crucial for 70% of the video. I'm not sure what the mathematical point of integrating the equation of the line is other than being something cool you can do because we're looking at a straight line on a log plot. I like it, but it's complicated and doesn't say much about the primes. Big G - like the tally graph I felt a tiny bit more time labouring what Big G is would add a lot. The different log log log's and o() notation don't add much for people not familiar with them, although that's ok - I don't know if graphics will help or not. I was watching the scrolling number line in this section. Primes always make a great video, thanks for making this one!

Simon Donkers

One suggestion, at ~9:00 you state that I can pick any number and you proof there is a prime gap for it. Where is the prime gap sized 5? Insert the word even there, or to be really pedentic, any whole positive even number.

Micha

Great video, there seems to be some cutting out of words or delay at around 14:57 - 15:20 and 17:50 - 18:00, though it might also just be my imagination.

Vidar Skogvoll

Love it! I did not find the prime line distracting. As for the leaning part. It seems obvious to me that by chance some other number might take 2s place given enough time. Who knows, maybe 2 might even be able to retake the throne? The interesting part is how large is the highest gap value relative to the largest non-zero value on the x-axis. Using log10(x) as stand-in for big G(x), for the numbers you presented in the video, I get that the ratio between a jumping champion and its loss of throne number is 6/log(1000)~2 30/log(1.74E35)~0.85 210/log(E425)~0.49 I hereby conjecture that the ratio of a jumping champion and its mutiny number is a monotonically decreasing function.

Matt Parker

Nice work. Yes, I could have used something like Miller–Rabin. My code actually generates all the required primes in a very inefficient way because I chucked the code together myself.

Damian Shaw

Thanks, I find that with Miller–Rabin you can usually do pretty well with Python alone without resorting to a statically typed language. The biggest pain here was splitting the search up in to chunks for multi-processing, I just spotted and fixed a bug and am now fairly confident it is correct. But on my computer it runs 10x faster to split up the work like this instead of running as a single thread/process. So maybe worth the effort?

Marcel de Jong

I'll be honest. Most of this video went over my head. As soon as it's about logarithms and prime numbers, maths becomes too silly for me to really understand. But the prime line wasn't distracting for me.

Douglas Gardner

I think the prime line's fine. It's distracting to start off with, but there's enough time before the meaty bit for my brain to figure out what the number line is, and to just have the lower third in my peripheral vision.

Daniel Welsh

I'm more distracted by worrying how Matt is going to escape the Boötes void.

Jeremy

I was going to make a similar comment... I think just the term "even" is sufficient as 0 is a trivial case, and negatives only require going in reverse order.

Jeremy

At ~2:00, are you saying that using a negative or complex base isn't "sensible"? That seems subjective. There are 110 kinds of people in the world: Those who understand base -2, and those who don't.

Inigo Quilez

You could make the prime line become also a time line, if you slow it down by just about 25%. Too late from a scripting+editing point of view, but also every time there's a prime you could do a cut, so each take is a prime-gap number of seconds long.

Geoff Lankow

Is it a coincidence that the entire bit about finding a gap of 8 falls in a section of the number line where there are no gaps of 8?