# Are primes randomly distributed?

There is a famous citation that says "It is evident that the primes are randomly distributed but, unfortunately, we don't know what 'random' means." R. C. Vaughan (February 1990)

I have this very clear but rather broad question that might be answered by different opinions and view points. However, my question is really not targeting an intuitive or philosophical answer, and I beg you for view points with a strength of mathematical foundation.

are primes randomly distributed? so then what is 'random' in this context?

A posterior I

A possible hint comes perhaps from the theory of complex dynamical systems.

It can be difficult to tell from data whether a physical or other observed process is random or chaotic, because in practice no time series consists of pure 'signal.' There will always be some form of corrupting noise, even if it is present as round-off or truncation error. Thus any real time series, even if mostly deterministic, will contain some randomness. All methods for distinguishing deterministic and stochastic processes rely on the fact that a deterministic system always evolves in the same way from a given starting point.(ref 1, 2, 3, and "Distinguishing random from chaotic data") - complying to latter, remind that every prime $p$ can be trivially identified by a sieving that applies prior primes $q<p$ so it is possible to determine that somehow the system evolves in the same way from a given starting point. Of course to take into account that time must be substituted by a walking index as well.

A posterior II

Thank you for all of many the comprehensive answers and discussions. This is a quite classic question on MSE and meanwhile we moved much forward. You are right that primes are not random as per above question. Indeed we could show that they are in their sequence some type of "deterministic chaos". We don't need the Riemann function for this purpose. The primes sequence is a so called "ordered iterative sequence". Meanwhile this has been further elaborated by this source: "The Secret Harmony of Primes" (ISBN 978-9176370001) http://a.co/iIHQqR8 Some of you correctly referred to sieving. It is crucial however that we regard sieving procedures as a subset of "interference" (incl. frequencies and amplitudes). We can iteratively apply interference rules in order to gain from the first prime 2, the next ordered sequence. This can be iterative continued in an "ordered" way and within exact boundaries of p-squares (for 100% certainty). Indeed, in order to construct an ordered sequence of primes you just need to begin with 2. The Riemann approach is charming but would raise difficulties since we don't have yet a proof of the hypothesis that connects the order of the non-trivial zeros with the primes. So if you apply Riemann, as some colleagues here suggest, we would need to say at any time in the begin of your argumentation something like "provided the Riemann hypothesis would be true...". Having in mind that the very unique rule that primes follow, is that in an interference scheme all odd prime frequencies dance on the base frequency of 2 (ordered iterative sequence), one may even give it a thought to something of a parallel in the Riemann transformed world, that all non-trivial zeros dance on 1/2. But latter remains not more than a tempting trivial speculation yet.

• I've seen you edited it, does it make sense to talk about noise in the prime numbers? I'm guessing it's weird but it's only a gut feeling. Still waiting for the more qualified person. – Billy Rubina Jun 16 '13 at 9:53
• In fact we talk about noise in primes. There is quite extensive literature on this, see for instance here: arxiv.org/abs/1102.3648 – al-Hwarizmi Jun 16 '13 at 9:55
• Oh! Thanks for the reference. – Billy Rubina Jun 17 '13 at 1:41
• Another connection is to Cramer's probabilistic model, a conjecture that although primes are not random in some specified ways they behave as if they were random math.stackexchange.com/questions/680122/…. – Conifold Sep 22 '14 at 20:57
• Given the uncertain definition, this question is only a discussion and cannot be answered... Perhaps if you define random in not a such loosely way..... – Brethlosze Jun 14 '17 at 13:58

The primes are not randomly distributed. They are completely deterministic in the sense that the $n$th prime can be found via sieving. We speak loosely of the probability that a given number $n$ is prime $({\bf P}(n\in {\mathbb P}) \approx 1/\log n)$ based on the prime number theorem but this does not change matters and is largely a convenience.

Some confusion is maybe due to the use of probabilistic methods to prove interesting things about primes and because once we put the sieve aside the primes are pretty inscrutable. They seem random in the sense that we cannot predict their appearance in some formulaic way.

On the other hand the primes have properties associated more or less directly with random numbers. It has been shown that the form of the "explicit formulas" (such as that of von Mangoldt) obeyed by zeros of the $\zeta$ function imply what is known as the GUE hypothesis: roughly speaking the zeros of the $\zeta$ function are spaced in a non-random way. The eigenvalues of certain types of random matrices share this property with the zeros. There is a proof of this.$^1$

So it can be said that the primes are a deterministic sequence that via the $\zeta$ function share a salient feature with putatively random sequences.

In response to the particular question, "random" here is the "random" of random matrix theory. The paper trail is pretty clear from the work below and it's not a subject that fits into an answer box.

$^1$ Rudnick and Sarnak, Zeros of Principal L-Functions and Random Matrix Theory, Duke Math. J., vol. 81 no. 2 (1996).

Terence Tao wrote about it, I've found this video and there's also one article called: Structure and randomness in the prime numbers, I've read it in the book: An Invitation to Mathematics: From Competitions to Research, by Dierk Schleicher and Malte Lackmann.

The article I mentioned can be found here.

• this is interesting general information but hardly focus on a clear and cristalized answer to the question: primes randomly distributed? so then what is 'random' in this context? – al-Hwarizmi Jun 15 '13 at 22:09
• Did you read the article? – Billy Rubina Jun 15 '13 at 22:12
• yes, I did. I also know the vids of Tery well. The book is new to me. – al-Hwarizmi Jun 15 '13 at 22:16
• Also, I believe that there isn't a random in this context - I guess random means the absence of pattern, even in this case. But I'm not sure, I hope someone more qualified answers that for you. Good luck. – Billy Rubina Jun 15 '13 at 22:18
• Section 4 of the article seems to very clearly cover your question (and could perhaps be added to this answer) : the primes behave very much like a random set with density approximately their density would, with the specific 'sieve constraints' (mod smaller primes) modifying constants on the random behavior (see e.g. the twin prime constant) but generally not changing asymptotics at all. – Steven Stadnicki Jun 17 '13 at 20:13

The simple answer is no they are not random. Though I can not give you the mathematical formula to prove this, I can share with you the title of a book someone just suggested I read by Mark Kac, called Statistical Independence in Probability. I can also point out that since Prime numbers are factual things that are always going to be in the same numerical location no matter what number system you use, that they can not be random (random in the simplest layman's understanding of that word that is) they must therefor have a pattern. We just do not yet "FULLY" comprehend it.

• Good points. Can you expand on "since Prime numbers are factual things that are always going to be in the same numerical location no matter what number system you use, that they can not be random" please, Is there any related theorem or conjuncture or result related to this statement? – Arjang Jul 31 '15 at 7:21

The answer to this question is now given by Eupraxis1981: I totally agree with the others who have commented, in that no arbitrary sequence of numbers is inherently random. For example, the sequence of primes (as you've pointed out) have been called random, yet we know that they can be represented by a (admittedly complex) system of Diophantine equations. So they form a rather well-ordered group, but just incredibly complicated... >>>here

Twin primes are not randomly distributed because there is a clear algebraic equivalence betwen integers of the form 6ab±a±b and integers of the form pn±k where p means any prime greater tan 3, k the value k corresponding to each prime for instance the value k of prime 5 is 1, the value k for prime 109 is 18 because (6*18) +1. Consequently we can sieve all integers of the form 6ab±a±b

• Your argument about the "clear algebraic equivalence" does not convince me. Can you give a link, paper, or direct proof of existence of the equivalence? – didgogns Jun 17 '17 at 6:48

The prime numbers is the set of numbers derived by removing the set of composite numbers from the set of natural numbers.

The pattern that the natural numbers follow is easily understood. The set of composite numbers also follow a discernable pattern:it is the union of the factors of 2, the factors of 3 etc.

Therefore the prime numbers as defined in the first paragraph must follow a pattern. No doubt the pattern is complex and we are yet to discover a way of defining it using a formula or formulas.

## protected by Community♦Sep 6 '17 at 18:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).