I was watching the Stand-up Maths video *Exploring the mysteries of the Prime (gaps!) Line. and had some questions.
First, just to make sure I have everything straight, as I understand it, a "prime gap" is simply the number of digits between successive primes. As for logarithms, I am quite a bit fuzzier, but thanks to this video, The History of the Natural Logarithm - How was it discovered?, I think I understand the basics, but I am not sure how much of logarithms I need to understand beyond the fact that as the numbers rise arithmetically on the scale, the actual numbers rise geometrically (by a multiple), if there is something else that is important or that I misunderstood, please let me know.
Now, at the 1:36 mark, he shows a graph with the first 1 million prime gaps graphed on a log scale. At the 2:36 mark of that video, he points out that it doesn't matter what log base you use, the steady line of prime gaps remains the same. At the 3:46 mark, he says "primes loves logs", explaining that the probability that any number (n) is prime is 1/log(n). I am not sure I understand, is "(n)" the base of the log? He further explains that the number of prime factors for a given number (n) is log log (n). Again, I am not sure what log is equal to here, if that matters please explain. And, this, he says, allows us to know that n/log(n) gives us the number of primes below the given number (n). Finally, this allows us to know that the average gap size is the log(n). Then towards the middle, at the 12:27 mark he says:
Thanks to the prime number theorem, we actually know the average prime gap is going to be about the natural log of the size of those primes
All of this leads me to believe that he is saying that the prime number theorem gives us an expected prime gap number for a given prime number.
Then, at the 6:09 mark, he starts a timelapse graph plotting all of the prime gap numbers on the x-axis (bottom) with the number of times it appears on the y-axis (lefthand side). What I found interesting was that all the way up through the first 23 million primes, the time progression was largely uniform. Now, there are a few spots were the gap number jumped a bit, such as the jump when it progressed from 1 million to 2 million primes. There is one gap number that looks to be about 205-210, while the next biggest gap number is about 185-190; however, that gap number is immediately overtaken by a larger gap number when the next progression to 3 million primes is done. But looking back at the jump from 23 million primes to 24 million primes, at the 6:30 mark, this one is different. At the 24M point, one of the gap numbers jumps up to about 275, with the next highest gap number about 245-250. The interesting bit, however, is that this continues to be the biggest prime gap until we look at 66 million primes, or 2.75 times the number of primes we started with. Then, from there, the progression continues rather smoothly.
So, this got me wondering about how "unexpected", or far off from a logarithmic scale some prime gaps could be. I was wondering about, and wanted to do a Stack question on what the most "unexpected" prime gap was that we had found, but had no idea what to ask, so I started reading about prime gaps. This led me to PrimeRecords.DK, which introduced me to the concept of merit. According to them:
The merit of the prime gap is size / ln p1, where ln is the natural logarithm. Some people use p2 or a number between p1 and p2, but the difference is microscopic for large primes.
If I understood from the previous video, the expected gap size is the natural log of the prime number being investigated, so dividing the size of the prime number by the natural log of that prime number, would give you a deviation from the expect norm, correct? Further down, they say:
The average prime gap near an integer N is approximately ln N. The merit indicates the relative size of a prime gap, compared to the approximate average for that size primes.
This is just another way of saying that merit is a measure of how much a prime gap deviates from its expected number, right?
To be clear, the question is is merit a measurement of how much a given prime gap deviates in size from the expected prime gap of a given prime, based on the prime number theorem? I just want to make sure I am understanding this correctly.