# Prime Number Distribution

Lists of prime numbers are often given 'up to' some number. (x primes up to 100,000, y primes up 1,000,000 etc.)

Yet their distribution is connected to processes that are frequency-based and thus logarithmic in the same way as musical notes. (Thus there are twice as many frequencies between C2 and C3 as between C1 and C2 etc)

Do you know of any analysis that has been done on the quantity of primes within successive 'octaves' of the number line? For instance, this might be an analysis of the increase in the size of the segment of the number-line containing 25 primes. For the first 25 primes it would be 100, then the next 25 would take us from 100 to 200+, and so on.

I suppose one could call this a dynamic analysis. I haven't seem such a thing but presume I just haven't looked in the right place.

Apologies if the question is not clear. I'm not a mathematician. I'll edit as advised.

• Are you familiar with The Prime Number Theorem? It pretty much answers your questions (and you pretty much can't answer your questions without it). Commented Dec 29, 2018 at 14:59
• Probably the closest thing to "music" that has been found with primes is the Riemann Hypothesis, which uses a type of Fourier analysis. In fact, there is a book called "The Music of the Primes", by Marcus du Sautoy, that primarily discusses Riemann's Hypothesis. However, this doesn't directly deal with how many primes are in various ranges. Instead, although # of primes in some specific ranges has been checked & analyzed, in general, there is The Prime Number Theorem, as Gerry Myerson stated above. If you are looking for something else, please update your question appropriately. Thanks. Commented Dec 29, 2018 at 17:19
• @GerryMyerson - Thanks. If I were a mathematician I might be able to construct a table using the PMT, but as it is I'd need to find a pre-made list. Commented Dec 30, 2018 at 12:25
• @JohnOmielan - Yep. I've read Du Sautoy. I have a view on where the music lies but that's another discussion. I've never seen an analysis of prime distribution of the kind I'm asking about but would be surprised if there are none available. I'm not sure what it would be called, however,. which makes it difficult to search. Something like an 'equal area' graph but that isn't right. . . Commented Dec 30, 2018 at 12:29

Well, the concept of octaves makes me think of modular arithmetic. For instance, the interval of a tenth is equivalent to the interval of a third, and we see that $$10 \equiv 3 \pmod 7$$ (there are seven diatonic notes in the octave).

Since $$\phi(100) = 40$$, this suggests that in each interval of $$100$$ there may be as many as $$40$$ primes. The first interval, from $$1$$ to $$100$$ is unique because it includes two primes that are factors of $$100$$, and so, for example, $$102$$ and $$105$$ are not prime.

• It is a notorious open question, whether there is any interval of length $n$ that contains more primes than the interval from $2$ to $n+2$. Sometimes called "the second Hardy-Littlewood conjecture". Commented Dec 30, 2018 at 2:38
• Thanks for the answer. I don't quite understand it, however, since there are 25 primes <100 and no other 100 number range can contain more. Commented Dec 30, 2018 at 12:14
• @GerryMyerson - Aha, So that's the H-L conjecture. I'm surprised it's not provably false. I'm not asking about any conjectures though, just for a list of primes showing the increase in range necessary to maintain an equal quantity of primes in successive ranges. Or something like this. Commented Dec 30, 2018 at 12:22
• As to the question of whether the second H-L conjecture is provably false: it is provably false under assumption of the (equally unproven but much wider believed) first H-L conjecture. Needless to say H and L did not know that their conjectures contradicted each other; people only realized in the 1970s after obtaining some more computer generated 'empirical' data on the distribution of primes. The article where the people who found the contradiction describe it is quite funny for modern readers as they seem to find their use of the then new computer much more interesting than the mathematics. Commented Feb 10, 2019 at 22:20

The other commenters are right that you can only answer these sorts of questions using the PNT but how to carry that out then is not immediately clear. Luckily Wikipedia has a very short section on this: https://en.wikipedia.org/wiki/Prime_number_theorem#Approximations_for_the_nth_prime_number

In particular they state that

$$p_n \sim n \log n$$

where $$p_n$$ is the $$n$$'th prime number and $$\log$$ is the natural logarithm, written '$$\log$$' by mathematician and '$$\ln$$' by people in a bunch of other professions.

This approximation is not perfect, for instance it tells you that to get the first 25 prime numbers you should look between $$0$$ and $$25 \log 25 \approx 80.5$$, to get the next 25 you should look between $$80.5$$ and $$50 \log(50) \approx 195.6$$, to get the next 25 we should look between $$195.6$$ and $$323.8$$, etc.

These are all underestimations but they do nicely confirm your intuition that the intervals get longer and longer. On the other hand, whereas the distance you have to travel on the frequency scale in music to 'catch' 12 tones doubles each time, the distance you have to travel on the number scale (in math) to catch 25 primes does not double at all. Yes it increases but much much more slowly than the exponential growth we see in music. (You can see that of course in tables of primes, but the imperfect but simple formula above has the advantage that you can quickly compute its behavior up to very large numbers using a calculator or computer and check the rate of growth there.)

So, in short, this is not what the phrase 'music of the primes' refers to.

On the most superficial level we can say that what people mean when they draw an analogy between music and the distribution of primes is

"both can be understood better by using Fourier analysis".

Now I am not sure if there really is a deeper level on which the analogy holds, or that the statement in yellow is really all there is to it. But the best way to judge that for yourself is to understand how Fourier analysis is used in music and how it used in number theory. You probably already know the answer to the first of these questions and your series of questions here on MSE is slowly closing in on the second.

• Thanks for this answer, The calculation you give is just what I was after. What I wondered was whether there might be a table of results for the calculation you describe, or a formula that expresses the ratio of the intervals for each successive interval of 25 primes (or x primes). I suppose I'll have to learn to do the calculation but it's something I thought might already be known. Thanks. . . . . Commented Feb 11, 2019 at 10:06
• The quickest way to generate such a table is to do it yourself in any programming language that knows what a logarithm is. E.g. in Microsoft Excel generating such a table would take 120 seconds, more than 119 of which are used by us typing the formulas and less than 1 by the computer coming up with the answer. Actually making a table with numeric values for e.g. the ratio of the lengths of successive intervals is more insightful than giving the formula because the formula will not be something simple like '$x$' or '$\sin(x)$' or '$3$' of which we already know what it looks like without a table Commented Feb 11, 2019 at 13:23
• Okay thanks. I'll see if I can do it. To be honest I' feel I still haven't asked quite the right question for my purposes but I'm getting there. Commented Feb 11, 2019 at 14:07