All articles published by MDPI are made immediately available worldwide under an open access license. No special
permission is required to reuse all or part of the article published by MDPI, including figures and tables. For
articles published under an open access Creative Common CC BY license, any part of the article may be reused without
permission provided that the original article is clearly cited. For more information, please refer to
Feature Papers represent the most advanced research with significant potential for high impact in the field. Feature
Papers are submitted upon individual invitation or recommendation by the scientific editors and undergo peer review
prior to publication.
The Feature Paper can be either an original research article, a substantial novel research study that often involves
several techniques or approaches, or a comprehensive review paper with concise and precise updates on the latest
progress in the field that systematically reviews the most exciting advances in scientific literature. This type of
paper provides an outlook on future directions of research or possible applications.
Editor’s Choice articles are based on recommendations by the scientific editors of MDPI journals from around the world.
Editors select a small number of articles recently published in the journal that they believe will be particularly
interesting to readers, or important in the respective research area. The aim is to provide a snapshot of some of the
most exciting work published in the various research areas of the journal.
This work is divided into two parts. In the first one, the combinatorics of a new class of randomly generated objects, exhibiting the same properties as the distribution of prime numbers, is solved and the probability distribution of the combinatorial counterpart of the n-th prime number is derived together with an estimate of the prime-counting function . A proposition equivalent to the Prime Number Theorem (PNT) is proved to hold, while the equivalent of the Riemann Hypothesis (RH) is proved to be false with probability 1 (w.p. 1) for this model. Many identities involving Stirling numbers of the second kind and harmonic numbers are found, some of which appear to be new. The second part is dedicated to generalizing the model to investigate the conditions enabling both PNT and RH. A model representing a general class of random integer sequences is found, for which RH holds w.p. 1. The prediction of the number of consecutive prime pairs as a function of the gap d, is derived from this class of models and the results are in agreement with empirical data for large gaps. A heuristic version of the model, directly related to the sequence of primes, is discussed, and new integral lower and upper bounds of are found.
This work aims to investigate two main objectives: what random means in the case of the distribution of prime numbers and the general conditions ensuring that what we know as Prime Number Theorem and Riemann Hypothesis also hold in the case of a generic random sequence of natural numbers. To achieve these goals, we will make use of models based on combinatorics and probability theory. Of course, this is not the first time that models are used to derive new conjectures and theorems about the prime sequence. In the mid-1930s, Cramér [1,2] proposed the first stochastic model of the sequence of primes as a way to formulate conjectures about their distribution. This model can be briefly summarized as follows.
Denote by a sequence of independent random variables , taking values 0 and 1 according to
(the probability may be arbitrarily chosen for ). Then, the random sequence of natural numbers
is a stochastic model of the sequence of primes. This means that if is the set of all possible sequences realizations of S, then the prime sequence, say , is obviously an element of . We can therefore study the properties of the particular sequence , through the methods of probability theory applied to the sample space , and conjecture with Cramér that if a certain property holds in with probability 1 (w.p. 1 in that follows), that is for almost all the sequences, the same property holds for the prime sequence . Obviously, the results of these conjectures lay heavily on the assumption about the probability of the event , which connects the model with the distribution of prime numbers as stated by the Prime Number Theorem (PNT)
with being the prime-counting function. We see from (1) that can be interpreted as the expected density of primes around n, or the probability that a given integer n should be a prime.
As reported by Granville  in his review article dedicated to the work of Cramér in this area, he imagined building the set of random sequences S through a game of chance consisting of a series of repeated draws (independent trials) from an ordered sequence of urns () such that the n-th urn contains black balls and 1 white ball, starting from forward. In this game, the event is then realized by drawing the white ball from the urn number n.
The heuristic method based on Cramér’s model has been playing an essential role since the mid-1930s to the present day when formulating conjectures concerning primes. The first serious difference between the prediction of the model and the actual behavior of the distribution of primes, was found in 1985 . As pointed out in , this difference arises because of the assumptions made by heuristic procedures based on the probabilistic model: the hypothesis, when applying the ’Sieve of Eratosthenes’, that sieving by the different primes are independent events and Gauss’s conjecture about the density of primes around n.
The problem was known well before Cramér’s work. In their 1923 paper , Hardy and Littlewood, while discussing some asymptotic formulas of Sylvester and Brun containing erroneous constant factors and functions of the number ( is the Euler–Mascheroni constant), observe that “any formula in the theory of primes, deduced from considerations of probability, is likely to be erroneous just in this way”. They explain this error arises because of the different answers to the question about the chance that a large number n should be prime. Following and Gauss’s conjecture, this chance is approximately , while if we consider the chance n should not be divisible by any prime , assuming independent events for any prime (Hardy and Littlewood do not mention this condition, but it is implicit), this chance is asymptotically equivalent to
Hence, they conclude that any inference based on the previous formula is “incorrect to the extent of a factor ”. More recently, new contradictions have been found, between the predictions of the model and the actual distribution of primes, that no Cramér-type model, assuming the hypothesis of independent random variables, can overcome .
Cramer’s model founds its connection with the distribution of prime numbers on Gauss’s conjecture; hence, it assumes the Prime Number Theorem as a priori hypothesis. In this work, a new model is proposed based on a class of combinatorial objects I call First Occurrence Sequences (FOS), reproducing the stochastic structure of the prime sequence as a result of the straightforward random structure of the model, based on a sequence of independent equally probable trials. The Prime Number Theorem emerges, though without any a priori ad hoc assumption about the probability of events. Perhaps the best way to summarize the aim of this work is that it tries to answer the question Granville cites at the beginning of his paper : “It is evident that the primes are randomly distributed but, unfortunately, we do not know what ‘random’ means” (the quote is of Prof. R. C. Vaughan).
Following Cramér’s method, we can describe the pinpoints of our model as a game of chance. Suppose we have an urn with balls of different colors, say black (B), and white (W), and let us consider the following sampling with replacement game: choose a ball, say B and replace it; repeat drawing until the white ball W occurs for the first time. In general, the game ends when you draw the ball with a color other than the first ball drawn. The sequences of B and W balls we get from this game are FOS of different lengths k. Some examples:
Assuming each ball has the same probability of being drawn, it is easy to see the average numbers of steps we need to get both colors for the first time, or the average length of FOS, when , is equal to 3. If we repeat this simple game with different values of n (number of colors) and the rule that the game ends when all colors appear in the sequence for the first time and compare the average length of FOS of order n (say ) with the prime number of the same order, we would find the results reported in Table 1 for , and 6.
The correlation between FOS average lengths and the sequence of primes is a general property of the model. Indeed, assuming each colored ball has the same probability of being drawn, and every sampling step with replacement is independent of each other, we can easily find
The above equation shows the close connection existing between the combinatorial objects I have called FOS and the primes. In particular, the average length of the n order FOS, obtained through the sampling with replacement game from an urn with n colored balls, is asymptotic to the expression of the n-th prime obtained as a consequence of PNT. In this sense, the n-th order FOS can be defined as the combinatorial counterpart of the n-th prime number.
The following sections are devoted to developing the theory of FOS and their analogies with the distribution of primes. Despite their simplicity, FOS may serve as a general model of random integer sequences which can be applied in different contexts, from combinatorics to physical models (I give a brief hint about this in the last section), showing the common features to all these fields, such as what is known as PNT. The method I followed in this work is to give a complete account of these combinatorial objects independently from the definition of other similar objects, starting from proper probability spaces and the general (recursive) probability relations, then to develop the full theory with particular attention to showing the connections with other research fields. A generalization is proposed in the last part of the work, starting from a continuous version of the original model.
In Section 2, a formal definition of this kind of objects is given together with the probability spaces we need to define probability relations and probability recursive formulas. In Section 3, the combinatorics of FOS is completely solved, demonstrating its close connections with set partitions and Stirling numbers of the second kind. In Section 4, the probability equations derived from the combinatorial analysis lead to new identities for Stirling numbers of the second kind and for harmonic numbers. The combinatorial model of primes based on FOS is defined together with a discrete estimate of the prime-counting function , which is studied and numerically tested. We prove PNT holds for this model while the Riemann Hypothesis does not. In Section 5, the model is generalized to investigate the conditions enabling both PNT and the Riemann Hypothesis. We find a general model of random sequences for which the Riemann Hypothesis holds w.p. 1 and apply this model to the problem of counting consecutive prime pairs as a function of the gap between successive primes. The theoretical results obtained from the model agree with the empirical data for large gaps and show the importance of the correlation between primes in the case of small gaps. Finally, this model is directly related to the sequence of primes, leading to new integral lower and upper bounds of the prime-counting function . At last, Section 6 summarizes this work’s general significance and hints at its links with other research areas, particularly with research on physical models.
2. First Occurrence Sequences: A New Class of Combinatorial Objects
In this section, we will be concerned about defining probability spaces and First Occurring Sequences as events and deriving some fundamental relations among the probability of certain events, while the evaluation of these probabilities will be treated in Section 3.
2.1. Definitions and Probability Spaces
Each FOS can be seen as a particular result of a sampling with replacement random experiment, consisting of a repeated sequence of independent trials with more than one outcome. The proper probability space for such an experiment can be defined as follows (see (Lect. 1, 2, ) and (Chap. 10, 13, )). Let be a collection of n distinct symbols
and suppose our experiment of random draws from is repeated k times. Then, an outcome of the compound experiment is a k-length sequence of elements of
The probability space of the experiment is the triplet , where
is the sample space of all possible outcome sequences given by the k-fold Cartesian product of with itself
is the -algebra of subsets of generated by finite-dimensional cylinder sets of the form
with , a -algebra on of subsets of .
To define the probability measure , let us consider a collection of numbers such that
The collection of numbers defines the probability P of any outcome of the single trial experiment and of any subset through the equations
Assuming each trial is independent, the probability of an outcome of the compound experiment is given by
The above equation defines a probability distribution on the sample space , since it is (par. 2.3, )
and the probability measure on the -algebra can be generated by P through the formula
I recall here two properties of , which will be used throughout this paper.
[σ-additivity] Given,, andfor, then
Given any finite-dimensional cylinder set (3) the probability measurehas the property (Corollary 2.1, )
where P is the probability distribution defined by (4)–(6) (obviouslyanf iffor some i, it is).
A collectionis an ordered choice of i distinct symbols from,, iffor,,.
Among the events of the -algebra we are interested in the following ones.
We denote with, k-length sequences withdistinct symbols,, the following events
for some i-distinct ordered choice.
We denote with, k-length First Occurrence Sequences (FOS) withdistinct symbols,, the eventssuch that,.
Hence if we choose among the elementary outcomes in , those with only i distinct symbols and denote them with , the event is the subset . If we denote further with those outcomes in the above subset, where the i-th distinct symbol is unique (occurs once only) and occupies the last k-th position in the sequence, then the event is the subset . The following remarks follow obviously from the above definitions.
For every elementary eventand, there is one and only one ordered choicereplicating the order of the first occurrence of the i distinct symbols in the elementary sequence.
In general it is, the two events coincide whenand. In these cases:
whereis the group of permutations of the set.
Let us now derive the general probability relation between events , and elementary outcome sequences.
Given a single k-length outcome withdistinct symbols,, let us denote withthe subset of i symbols occurring in
and withthe complementary set of the remainingsymbols
An analogous definition applies to the symbol setand the complementary symbol setof an elementary outcome. Obviously both Y andare subsets of a σ-algebraonof subsets of.
The probability of the eventsandas a function of elementary outcomes of the compound experiment and their symbol sets and complementary symbol sets, are given by
For every sequence , the cylinder set
contains FOS , and we get the whole event as the union of the disjoint cylinder sets
From Equation (8), the probability of the cylinder set is given by
and, hence, Equation (9) follows from the -additivity property of the probability measure.
For every sequence , the cylinder set
(when the cylinder coincides with ), contains sequences and the whole event is the union of the disjoint cylinder sets
From Equation (8) the probability of the cylinder set is
Equation (10) follows from the -additivity of the probability measure . □
Given(the number of distinct symbols is equal to the total number of symbols in) andthen
When the symbol set of FOS , , becomes
and remembering , the thesis follows immediately through simple manipulations of (10), after noting that the measure of cylinder sets
is equal to measure of . □
Dealing with FOS in general and problems such as the average length of sequences will require considering an infinite number of independent trials or repetitions of the random sampling with replacement experiment. The probability space we have defined above for finite values of k, can be generalized to consider sampling sequences of infinite length from the set , so that the set of all possible outcomes is , the Cartesian product of countable many copies of . The product measure (Theorem 6.3, p. 141, ) allows us to define an extended probability space where sequences , for a fixed k, are subsets of defined as
and the probability measure and its properties remain unchanged (Par. 13.1, )
where is defined in (6). The same obviously applies to events.
If we consider only FOS as outcomes of our experiment, We may define an even more straightforward probability space (Example 2, p. 270, ), say , where the sample space is the countable set
and the probability of each elementary sample is defined as in (6), while for every event it is
Hence, the probability of the event is still given by .
Remembering the definition of partition of a sample space (p. 4, ), the following remarks follow immediately from the definitions above.
Given, the collection of eventsis a partition of. Hence
The collection of eventsis a partition of. Hence
2.2. Probability Relations
In order to simplify our expressions, let us adopt the following symbols for the probability of events and , ,
This notation will be used throughout the paper.
In the following we will derive some relations which are valid under the assumption of the general probability distribution (4)–(6).
Note that from Remarks 4 and 5 it follows
while from Remarks 6 and 7
Assuming , from (14) and Corollary 1, which can be written using the new notation
Since of course as , it is interesting to note that the above equation is a heuristic proof of
From (14) with , (12) and (15) with , we can write the following equality
From here on throughout this paper, we will assume that the the symbols in the set are equally probable; that is, with reference to the probability distribution (4)–(6), we will make the following assumption.
(Equally probable symbols)
Under the above assumption, the probability (6) of any sequence is given by
while for the probability of FOS and related events it holds
where the symbol “#” denotes the cardinality of the set . Hence Equation (12) can be completed in this case as
while, since #, when , it is
The trivial case is completely solved by Equations (11), (13) and (22), so in the following we shall assume .
The following lemma follows directly from the definitions.
Under Assumption 1, the probability of the symbol set and its complementary (see Definition 4) of any outcome sequenceis independent of the sequence and is given by
Under Assumption 1, from Theorem 1 it follows (,)
From Lemma 1, we get
By substituting these in (9) and (10) respectively, and remembering the definition (7) of the probability measure, Equations (23) and (24) follow.
Equation (25) is obtained simply by putting together the previous results. □
Note that the last Equation (25) provides us with a method to calculate the sequence , starting from (11) and (13), recursively. In particular, for we get
3. Combinatorics of FOS
In the previous section, we have obtained the probability of FOS through the general recursive Formula (25) and through closed-form solutions only in a few special cases. The aim of this section is the development of a combinatorial theory of FOS in order to investigate their connections with other topics of combinatorics, such as set partitions and Stirling numbers of the second kind (Ch. 9, ), then to derive the closed-form probability functions in the next section.
The following simple equation relates the cardinality of the sets and defined in Definition 2 and 3
The combinatorics of objects such as sequences is well known and treated within the more general problem of counting functions between two finite sets in enumerative combinatorics (1.9 p. 71, ), with applications to set partitions, words, and random allocation (II.3 p. 106, ). The problem of finding is the same as finding the number of words (or sequences) of length k, over an alphabet of cardinality n, containing i letters (or symbols). As reported in (Equation (5), ), the total number of possible sequences can be obtained through the following sum, involving the Stirling numbers of the second kind (see equation (1.96) p. 75 for details, ). (I keep here the same symbol with two different spellings, and S, both to denote the set of events (sequences) and the Stirling numbers of the second kind. The meaning is always clear from the context, in any case when denotes a set, it is always followed by a subscript. The adoption of the same symbol is justified by the close connection existing between the cardinality of the set of sequences and the Stirling numbers of the second kind.)
The above equation decomposes the total number of sequences as the sum over i of the number of such sequences that contain exactly i distinct symbols. The same identity, obtained through classical algebraic methods, is reported in (Equation (29), )). On the other hand, remembering Remark 6, we can also write
The same solution is found in II.6 p. 113  under the hypothesis of random allocation of symbols, which is the same as Assumption 1. From (30) and (27), we can finally also derive an explicit expression for the cardinality of FOS.
In the rest of this section, we prefer to present an alternative procedure that allows us to derive the number of FOS sequences directly in order both to find new identities involving the Stirling numbers of the second kind and to show a new combinatorial meaning of these numbers, strictly related to the sequence of primes, which is the main focus of this paper.
3.1. Ordered FOS
Remembering Definition 1 and Remark 3, let us introduce a new kind of combinatorial object.
Letbe an ordered subset of i distinct elements from, we denote with, k-length ordered First Occurrence Sequences (oFOS) withdistinct symbols on the ordered choice,,, the events
whereis an elementary FOS outcome havingas i-distinct ordered choice, replicating the order of the first occurrence of its distinct i symbols.
The following example can help to clarify the above definition.
Suppose,and, with,; then the eventis made up of the following elementary outcomes:
The cardinality of oFOS events depends on parameters i and k only, not on the particular choice of symbols in the ordered set.
The following theorem establishes the relation between FOS and oFOS.
The cardinality of the set of FOS is given by (,):
whereis the number of k-length oFOS on an ordered subset of i symbols
Given the ordered choice of symbols , any finite subset of i indices
subject to the constraints
defines a finite-dimensional cylinder set on
through the following assignments:
Therefore, the oFOS event is equal to
and the FOS event
As far as the cardinality of the sets from the above equation we get
with i-combinations of n elements, and number of permutations of i elements, Equation (31) follows. □
3.2. Counting Ordered FOS
The problem of finding the number of FOS is thus reduced to that of finding the numbers . When , we immediately get
when , it is
Indeed, for , there is only one oFOS, whatever the value of . Note that (33) is a particular case of the general property
The calculations are more complex when .
,, through elementary enumerative combinatorics we find
,, through elementary enumerative combinatorics we find
I will give, in the following, some results about the calculations of numbers, starting with the next lemma that states a recursive formula.
The number of k-lengthon an ordered subset, as function of the cardinality on an ordered subset, is
Equation (36) follows directly from Definition 5 and Remark 8, considering that from any j-length oFOS on an ordered set , one can obtain k-length oFOS on an ordered set having the i-th symbol in the last position k of the sequence.
Note that this lemma holds independently from Assumption 1 of equally probable symbols. □
The result reported below is simply the sum of the first k terms of a geometric series and will be referred to by the next theorem.
Given q real,, then
Letbe the number of k-length oFOS on an ordered set of i distinct elements. Then the following statements hold:
with coefficientsdefined recursively as
Let us proceed by induction. Equation (37) holds for , indeed from Lemma 2 remembering (34) we get
and, hence, from Lemma 3
Let us now prove that if (37) is true for i, , then it is true for . Substituting (37) in (36) for we get
The last theorem gives us a method to calculate each coefficient of the row from the coefficients of the previous row i. The following corollary state an alternative way to calculate the last term of each row, as function of the other coefficients of the same row.
Hence, remembering (38) and (39), after some manipulations, one gets (40). □
The first rows of coefficients are reported in Table 2.
Theorem 3 and the subsequent corollary state a method of calculating coefficients by rows. The next proposition establishes another way to find them, proceeding by columns.
Given the coefficient, head of column j, the successive coefficients in the same column can be calculated as
The column head coefficients can be calculated as a function of the previous ones only, through the following formula
Equation (41) is derived simply through a recursive application of Equation (38), from the row index to the required row index i.
By substituting (41) into (39), we obtain the second Equation (42). □
The next theorem states a general non-recursive formula to get the coefficients directly as a function of the indices .
The following equation holds for each coefficient
First of all, let us prove by induction, the formula holds in the case of column head coefficients. In this case, using the notation of Corollary 4, Equation (43) becomes
The above equation is true for , since we know it is . Assuming it is true for , from (42) we get the identity
where the term on the left-hand side of the equation is the value of calculated through (42), the one on the right-hand side is the value of the same coefficient given by (44). Then, the same identity holds for the next head of column coefficient ; indeed Equation (42) leads to the result
The proof of (43) in the case of non-head of column coefficients follows simply from (41) after assuming (44). □
The identity (45) deserves some more attention: it expresses the normalization property of the FOS probabilities (see forward Equation (76) and Remark 10). After some simple manipulations, it can be written as
that appears to be “complementary” of the well-known identity (see Equation (1.13), )
3.3. Ordered FOS and Stirling Numbers of the Second Kind
The solution we have found about the number of elementary sequences of the event , presented in Definition 5 as oFOS of length k with i distinct symbols on the ordered choice , allows us to show the equivalence of numbers and Stirling numbers of the second kind. Indeed, from Equation (37) of Theorem 3, it follows
Substituting in the above equation and as given by (43) and (44) of Theorem 4, we get
we finally arrive at
The right-hand side of the previous equation is the explicit formula for the Stirling number of the second kind (see Equation (9.21), ). The equivalence can be extended to values and , since from Equation (34) for it follows
Note that the last equation solves the “bit tricky” case of the Stirling number (p. 258, ), by calculating it instead of assuming it “by convention” (this assumption is common to all the treatments of the subject, see for example (p. 73, )). We have thus proved
Given, the cardinality of the oFOS setdefined in Definition 5, and the Stirling number of the second kind, the following equation holds true:
Due to the equivalence established by the previous theorem, Equation (36) of Lemma 2 can be rewritten as
that can be obtained through the repeated application of the recursive equation of the Stirling numbers of the second kind (see Equation (9.1), )
When we know it is (see Equation (35)) and, hence, from the general Formula (49) we get
which is the identity (47) mentioned above. This identity is thus closely related to the Stirling numbers and to the general property , (see Equation (4) and  and references therein). Note that by substituting (31) with given by (50), into Equation (27) we obtain for the same Equation (30).
We know Stirling numbers of the second kind have a combinatorial meaning directly related to the problem of partitioning a set into a fixed number of subsets, , counting the number of ways a set of n elements can be partitioned into m nonempty disjoint subsets (Ch. 9, p. 113, , Ch. 1.9, p. 73, , and see also  for a complete combinatorial treatment of the Stirling numbers). The analysis performed in this section highlights an alternative combinatorial interpretation of these numbers, together with the close connection of oFOS with set partitions, that will be shown to be strictly related to the sequence of primes in the next section.
4. First Occurrence Sequences, Set Partitions, and the Sequence of Primes
In this section, we will delve into FOS sequences as a model of the distribution of prime numbers. The simple oFOS sequences can already act as a first-level model of the prime number distribution, as we will see in the next subsection, while the complete model based on FOS will be developed at the end of this section. In order to develop the tools to build this model, we continue in the following to deepen the combinatorial implications of Theorem 5, exploring some interesting identities involving Stirling numbers of the second kind and harmonic numbers, derived through the probabilities of FOS.
4.1. Ordered FOS and the Prime Number Theorem
The equivalence (50) stated by Theorem 5 and the combinatorial meaning associated with S and g numbers suggest the following analogy with the distribution of primes. Given any integer set of the type
there exists a sequence of successive primes
such that the prime-counting function . The set can be viewed as an ordered choice of integers and the set as an oFOS over (remember Definition 5). Note that the integers i between two consecutive primes, , are multiples of the primes from to , hence they can be considered as repetitions of these symbols, thus confirming the oFOS schema. In the light of this analogy, some classical results of the theory of random partitions of finite sets can be reinterpreted as a general form of the Prime Number Theorem, which holds for all oFOS-like sequences.
The oFOS model of the distribution of prime numbers can be defined as follows. Let us consider the number of primes less than or equal to k, represented by the prime-counting function , as a random variable with probability mass function defined by
and, hence, from Theorem 5
Equation (53) defines a uniform probability distribution on the class of partitions of a set of k elements, obtained by assigning the same probability to each partition ,
where the total number of partitions is equal to the k-th Bell number defined as (9.4, p. 133, )
The combinatorics of is studied in [16,17] (see also Ch. IX, p. 692 , for a brief summary of these results) in connection with the asymptotic () distribution of the probability measure (Harper points out the methods used are based on the combinatorial implications of probability theory and ascribed to W. Feller (see Ch. X, p. 256 ), and V. Goncharov (see  and references therein), the first applications in this field). From this approach, it follows that the random variable with uniform probability (53), defined as a model of , has mathematical expectation and variance asymptotically equal to (see Ch. 4, pp. 114–115 )
where , the unique positive solution of , being the Lambert function  defined in the domain . Since for the function , we know it is as , the above equations say the average and variance of the random variable are asymptotic to
Equation (55), and the related variance (56), represents the form assumed by PNT when considering oFOS-like sequences with uniform probability distribution of set partitions. This is not the only admissible distribution. About this problem and the general conditions in order that a uniform distribution is obtained, through random allocation algorithms (or random urn models), see  and the references therein. The following result (see Theorem 1.1, p. 115, ) completes the application of the methods derived from the theory of random partitions of sets, to the oFOS model of the prime number distribution. The probability distribution of the normalized random variable
converges to that of the standard normal distribution as , that is:
4.2. FOS Probabilities and Some Combinatorial Identities Involving Stirling Numbers
Let us collect, in this subsection, some formulas about the probability function , which will be referred to in the rest of this paper. Under Assumption 1, from Equation (31) of Theorem 2 the probability of FOS is given by
By substituting with Equations (37) and (39) of Theorem 3, we get the following expressions for ,
Finally, from (43) of Theorem 4 the explicit expression for follows
If we set , the above equation can be written
When (, ), Equation (60) becomes (it is easy to check this equation, and (64) below, which also applies to the case )
Let us now derive the sequence probabilities expressed through the Stirling numbers of the second kind. Remembering the equivalence (50), Equation (57) can be written as
From this equation and (27), always under the hypothesis of equally probable symbols, hence (19), (20), it is easy to get
The above equations, combined with the general properties of the probability functions (11)–(18), give rise to a series of combinatorial identities involving the Stirling numbers of the second kind. The following corollary reports the less trivial ones.
Note that identity (68) is the same as (28) and identities (68), (71) imply (70).
I report in the following two more results about the sum of probabilities , that clarify the probabilistic meaning of identity (46) and the close connection between these probabilities and the Stirling numbers of the second kind.
and, hence, through identity (70), we simply get (74). □
Note that Equation (76) above is the same as (45), (46). Indeed, after some manipulations, it can be written as
This identity thus has a probabilistic meaning connected with the normalization property of FOS probabilities.
We know (Equation (26.8.42), ) the Stirling number of the second kind, for fixed value of n, asis asymptotic to
This asymptotic behavior follows very simply from Equation (74) due to the connection established between FOS probabilities and.
4.3. Bounds of Numbers and Stirling Numbers of the Second Kind
We speak of numbers since the results are directly related to their formulation through the coefficients , as stated by Theorem 3. The results are obviously applicable to the Stirling numbers of the second kind.
Let us define for,
where the sign ofis negative if j is an even number, positive if it is an odd number.
The following statements hold true:
Equation (77) follows simply from the values of the coefficients given by (44).
The closed-form (44) of coefficients allows us to rewrite (83) and (84) as
When speaking of Stirling numbers of the second kind, the previous bounds become
Note that (87) gives an alternative proof of the asymptotic behavior of for fixed i (see Remark 11).
Assuming the left-hand side of the above inequality is positive both forand, that is
we get the bounds of the ratio
4.4. FOS Average Length and Harmonic Numbers
As anticipated in the Introduction, calculating the average length of FOS sequences, that is, of elementary events , of the countable space , is a simple task leading to the result (2) in the case . This calculation is based on the following well-known results, in particular on Lemma 7, expressing the average number of trials one has to wait before obtaining the first success in a sequence of independent Bernoulli trials with p probability of success.
Given q real,, then
Given p real,, then
Therefore, if we denote, in general, the quantity we are looking for with , we can establish the following recursive relation
It is easy to see the above equation leads to
where is the n-th harmonic number
If we consider the set of discrete random variables with probability mass function
then the quantity can be also obtained as the mathematical expectation of the corresponding random variable , hence through
From (91) and (90), remembering (66), we get the following relation between harmonic numbers and Stirling numbers of the second kind.
Other combinatorial identities involving harmonic numbers and finite term series can be derived from the direct calculation of (91) as established by the following proposition. (These identities appear to be new, such as the method of deriving them. Of course, it is not simple to establish the novelty of an identity involving harmonic numbers because of the historical interest of this subject and the great development of theory and applications. For an extensive collection of these identities, see [23,24,25] and the references therein.)
Assuming n and i positive integers,and, the following identity holds true
whereare the coefficients defined by Theorem 3.
By substituting in (91) the term as given by (58), we get
from which it follows
We can write
and remembering Lemma 6 and the sum of geometric series
from which and Equations (39), (90), and (93) follow. □
The following corollary is a simple application of the formulas of Theorem 4 to that of the previous theorem.
For n and i positive integers,and, the following identity holds true
Whenwe get for the n-th harmonic number
4.5. FOS as a Model of the Distribution of Primes
This subsection aims to analyze analogies and limits of FOS with respect to the true sequence of prime numbers. There is a correspondence between prime numbers and FOS as stated by the following remark.
Given any prime,, there exists an event FOS
(see Remark 7), and the whole sequence of prime numbers corresponds to the element
of the product set
we can define as FOS universe.
The model based on FOS takes then into consideration the set as the combinatorial counterpart of the n-th prime , considered as a discrete random variable assuming integer values between n and ∞. The statistics of this random variable are then used to define a “counting variable”, which is the FOS model equivalent of the prime-counting function. In order to avoid any confusion when dealing with our model, we keep the symbol to denote the “true” value of the n-th prime, and adopt the symbol for the random variable modeling it. The basic assumption of the model is the following.
The discrete random variablehas probability mass function
The results of the model are referred to the sequence of random variables and confronted with the analytical or numerical results we know about the true prime sequence . These results, some of which are reported in two sample tables, justify a posteriori the model’s adoption and the not completely rigorous approach we follow in deriving it.
From (66) and (90) respectively we get the probability
and the mean value of
Hence, given , k integer, the probability distribution function of
is simply expressed through the number of ways a set of k elements can be partitioned into n disjoint nonempty subsets
The mean value of the discrete random variableis equal to
The previous theorem suggests to assume as an estimate derived from the combinatorial model of the prime-counting function , that is, remembering the equality (98)
An alternative expression for can be derived from Remark 15 and Equation (73)
To check the quality of the function as a numerical estimate of , Equation (104) looks more suitable since it can be written in a recursive form. Indeed, if we put
from the recursive equation of the Stirling numbers of the second kind (51), we get the following recurrence for the terms
Table 3 reports a series of values of the recursive estimate , compared with the prime-counting function and the logarithmic integral function . The last column of the table reports the values obtained through continuous approximation formulas I will expose hereafter.
In order to analyze the asymptotic behavior of , we look for a continuous approximation of the probability function . After promoting k and n to be continuous variables, which is a justifiable assumption for and considering the relation (98) between and S, Equation (97) is written as
Taking the derivative of the above equation, we get the differential equation for
that can be written as
where is a parameter function depending on n and k. Then the general solution of the differential equation is
and the value of the constant is C is determined by the asymptotic condition .
It is interesting to note the method, based on probabilistic arguments, that led to Equation (107), provides an alternative approach to the problem of exploring the asymptotics () of Stirling numbers of the second kind. Since this topic is outside the scope of this work, I cite only the following example. If we choose
then it is
and from (98), we get the well known asymptotic approximation of(see  and references therein)
which is valid in the region, coinciding asymptotically with the region of validity of (88),.
As a continuous approximation of the probability function we are looking for, let us choose a parameter function depending on n only through the following simple relation
where the constant a varies between 1 and e as suggested by the boundary conditions of the Stirling number ratio. Indeed for the ratio (106) is
with constant, definitively for x sufficiently large ( is the logarithmic integral function defined for as , where the integral is to be intended as Cauchy principal value). We can prove that this bound, which I will refer to as the RH rule throughout this work, occurs w.p. 0, or better, that the RH rule does not hold w.p. 1 for the random variable , defined above as the stochastic counterpart of in our model.
Letthen random variable with probability distribution (99), then it is
Theorems 9 and 10 say what we know as PNT when dealing with primes holds for the counting variable associated with the set of sequences generated through the random sampling with replacement game I proposed in the Introduction, while the Riemann Hypothesis requires compliance with much stricter requirements such that it has zero probability to occur for the same counting variable.
5. Model Generalization and the Connection with the Riemann Hypothesis
This section deals with the generalization of the FOS model so that we can discriminate between two classes of models, compliant and not compliant with the RH rule. This allows us to use the different stochastic properties, depending on different models, of the random variables and to deduce some properties of the whole sequence of primes. In particular, we apply the model to infer the counting of successive prime pairs and then compare the result with actual sequences of prime pairs.
5.1. Model Generalization
In this section, we will consider the random variables of Definition 7 as a continuous random variable, assuming values in according to the following probability distribution function
with given by the solution of the differential equation
obtained by considering a more general expression for the ratio (106), where n is substituted by , a positive function of n.
The probability density function of, that is the functionof the FOS model, will be denoted as follows:
Therefore, the probability functions of become
The constant C is determined by the normalization condition
The complete expressions of the probability density and distribution function are
Note that has a single maximum point at
The mathematical expectation of (this calculation is reported in  for the case ) is
where is the Euler–Mascheroni constant and is the exponential integral function with positive real argument , sometimes referred to as upper (or complementary) incomplete gamma function , defined by (see functions 5.1.1, 6.5.3, )
We require the mathematical model to satisfy a similar condition to (95) about the mean of , that leads to the following formula
obtained from (114), assuming sufficiently large, so we can neglect the terms and . Note that the function decreases rapidly as , in particular , (1.4)
The FOS combinatorial model studied in Section 4.5 corresponds to the function. In this case (115) is satisfied for
(in particular whenit is).
We know from Theorem 10 that the RH rule does not hold w.p. 1 for this class of models, which I will refer to as n-Model.
Another class of models of particular interest to our study, as we will see in the following, is the one determined by the choice . In this case, condition (115) can be satisfied using different functions having opposing implications as far as the compliance of the model with the RH rule. We focus, in particular, on a solution ensuring the RH rule holds w.p. 1.
The model withwill be referred to as log(n)-Model.
The simplest log(n)-Model is the one defined by the choice
hence by the parameter value
Through the methods of the previous section, it is possible to prove the same statements as Theorems 9 and 10, that is, this log(n)-Model is compliant with PNT and not with the RH rule.
Let us consider instead the log(n)-Model defined by the assumption
where is the inverse function of the logarithmic integral function (I use for this function the same notation as in ). In this case, we get
and condition (115) is satisfied since we know it is (Theorem 3.3, )
Equations (111) and (112), under the approximation for , become
The double exponential distribution function (122) is often called Gumbel distribution [33,34].
In the case of the model with, the ratio (106) is equal to
it isasand deviates asymptotically from the Stirling number ratio which is.
Briefly speaking, the log(n)-Model defined above corresponds to a subset of the FOS universe which is different from the one of the n-Model, containing sequences conforming to both PNT and the RH rule, as stated by the following theorems.
The continuous approximation function becomes
In addition, for this function we can enunciate a proposition, which is the equivalent of the Prime Number Theorem.
Givenhowever small, there existssuch that forit holds
The proof is completely analogous to that of Theorem 9.
Associated with the log(n)-Model we can define the counting random variableas in Definition 8, after assuming the probability distribution (110). It is easy to prove the analog of Theorem 8 for this variable, in particular Equations (101) and (103). We can therefore apply the probability method developed for the n-Model also in the case of the log(n)-Model.
The RH rule holds w.p. 1 for the log(n)-Model with defined by (118).
Letbe the inverse function of the logarithmic integral functionand
its n-th derivative. Then we have
Note that the function is real analytic. The first derivative follows directly from the definition, since . We proceed by induction. The thesis is true for , indeed
Let us assume it is true for ()
then we have for the n-th derivative
from which, grouping the terms by powers of , the thesis follows. □
Letbe the random counting variable of Definition 8 with probability distribution (110) associated with the log(n)-Model (118), then it is
We can get an estimate of the speed of convergence to 1 of the probability of the RH rule as follows. If we denote with the subset of random sequences of positive integers distributed according to the log(n)-Model with mean , under the assumption that the sequence of prime numbers belongs to the set , we can use the properties of the Gumbel distribution and Chebyshev’s inequality to get the probability of the RH rule, more generally the probability of any difference , as a function of n. In other words, we can consider as a stochastic process of random variables differently distributed and the sequence of primes as particular realization of the process.
Different bounds of the difference
have been established for the sequence of prime numbers, depending on the conditions assumed. From ((1.3), ) we know that it holds unconditionally for
while under the Riemann Hypothesis, we get (Theorem 6.2, )
From the properties of the Gumbel distribution we know the variance of is (note that the probability distribution (112) is not exactly a Gumbel distribution because of the cut at of definition (110). Assuming n sufficiently large, so that (121) and (122) hold, we can consider the probability distribution of the model as a Gumbel distribution).
hence, from Chebyshev’s inequality (see Chapter IX, p. 233, ), it follows that the probability of the unconditioned bound converges to 1 with a quadratic law
while in the case the Riemann Hypothesis holds
5.2. Counting Successive Prime Pairs through the log(n)-Model
The general problem of prime pairs can be stated as follows: given d and N positive integers, d even, what is the number of pairs of primes (not necessarily consecutive), such that ? Connected with this there is the following one, we can call as the problem of counting successive prime pairs: given d and N positive integers, d even, what’s the number of pairs of primes , separated by the gap d, that is such that ?
Mathematics has no certain results about these two problems which are different from the so called “bounded gaps problem”, recently solved by mathematician Yitang Zhang , who proved that as there are infinitely many prime pairs , with . Successively, this bound has been lowered to 246 through the extension of the method of Zhang and other contributors. Nevertheless, the twin primes conjecture which requires the bound to be reduced to , remains unproven. Important results towards this goal can be found in [37,38], showing in particular that , that is there always be pairs of primes with d less than any fraction of , the average spacing between successive primes.
In 1923, Hardy and Littlewood proposed the following formula as a solution of the general problem, stressing that it was impossible for them “to offer anything approaching a rigorous proof” (see Conjecture B, ):
The product is over all odd primes in (127), over odd primes dividing d in (128). The constant is called the twin prime constant, while the term is responsible for the irregularities and the oscillating pattern of the counting functions. A formula similar to (126) for the counting of successive prime pairs separated by a gap d, was suggested by Wolf (, and the references therein) after enumerating, by means of a computer program, all gaps between consecutive primes up to . Starting from the observed pattern, which showed an exponential decay of the number of pairs depending on d, at the end of a heuristic procedure including approximations due to PNT, he deduced the complete formula (the procedure is reported in M. Wolf (2018), Some Heuristics on the Gaps between Consecutive Primes, available at https://arxiv.org/abs/1102.0481 accessed on 31 March 2021).
The functional dependence on N of the formula above can be transformed into a dependence on the sequence number n of the greatest prime interested in the count. Indeed, we can set and and, hence, it is easy to get
and the counting formula becomes
where I changed the capital letter N to lower case n so as to remember the different meaning of the functional dependence.
The original Hardy and Littlewood conjecture was empirically tested by several authors and used to calculate the number of pairs in the case of small gaps d between successive primes . I show in the following that the conjecture of Wolf, which is based on a large amount of empirical data, can be derived from the combinatorial model we defined as log(n)-Model in Remark 19.
Finally, the probability mass function (133) resulting from the log(n)-Model under Assumption 2 and is (note it is independent of parameter a)
Comparing the previous equation with (132), we see the log(n)-Model confirms Wolf’s conjecture, in particular the exponential decay of the pair number depending on d, at least for large values of the gap d, when Assumption 2 can be considered valid. Note that in the case of the n-Model, we would get the same expression as in (136), but with the function n in place of . The fact that only the RH rule compliant model agrees with the counting function of consecutive prime pairs, derived from empirical data, is a notable achievement of the theory, since it is a strong indication that the counting problem is deeply connected with the Riemann Hypothesis.
Figure 1 and Figure 2 show the results obtained from the log(n)-Model with respect to the actual numbers of pairs in two cases: and .
5.3. A Heuristic Model of the Distribution of Prime Numbers
The generalized model we presented in Section 5.1 can be directly related to the sequence of primes by changing condition (115) into the following
which leads to the value
while the point of maximum of the probability density function (113) becomes
It is interesting to note we would obtain the same expressions, with , if we substitute the condition (137) with the following one, on the point of maximum of the function
In this case, the mean value of changes to
This model has the property to express the prime counting function through the values of the sequence of primes from to . Let consider indeed the case when is constant. In this case, the average of the random counting variable (102) is
and it approximates the value of with any precision depending on .
From Equation (137) we get in the case of the log(n)-Model, :
in the case of the n-Model, :
The probability functions above are valid for (remember (110)), sufficiently large, and .
Equations (142)–(145) define the heuristic log(n)-Model and the heuristic n-Model respectively.
Examples of different probability distribution functions resulting for these heuristic models are given in Figure 3, for .
From Figure 3, we see the dispersion of the random variable around its mean value is very small in the case of the heuristiclog(n)-Model, so that we can assume the estimate is very close to the prime-counting function itself for this model as stated by Remark 22 in the particular case .
Table 5 shows some examples of estimate of , calculated through the heuristiclog(n)-Model with , for different orders of magnitude.
The following considerations we propose in the case of the heuristic log(n)-Model, because of its relevance, are obviously valid in the case , constant.
The following theorem gives a quantitative evaluation of the probability of error we do, when considering the random variable (in practice its mean value for small variances) as an estimate of .
Given the random variableof Definition 8,, let
be the first kind error,
the second kind error ofatand
the sum of the two error probabilities. Then for the heuristic log(n)-Model defined by Equations (142) and (143) withit is
From the theory of Gumbel distribution we know the variance of is
Through the heuristic model we can derive new lower and upper bounds of the prime-counting function:
We know ([41,42]) the following lower and upper bounds of the n-th prime hold
for the left-hand side and the right-hand side, hence for given by (143) it follows
and assuming sufficiently large so that the condition may be neglected, we can write (147) for given by
From Remark 22 and Theorem 13, we know we can consider the approximation as valid for the heuristic model, from which we get (147).
6. Concluding Remarks
The first aim of this work was to deepen the problem of randomness in the distribution of prime numbers through such simple combinatorial objects as First Occurrence Sequences, showing new analogies between the classical set partition problem and the distribution of primes themselves. First Occurrence Sequences define a general class of objects for which the Prime Number Theorem holds, such as for the prime sequence, but they fail to represent more stringent constraints, required by the Riemann Hypothesis, such as the equivalent condition established by Helge von Koch I called RH rule. In order to investigate this second step, the simple model must be generalized (or the class of combinatorial objects must be restricted) to discriminate between RH rule compliant and noncompliant models. The analysis based on probability methods shows the Riemann Hypothesis holds w.p. 1 (together with the Prime Number Theorem, of course) for the class of random sequences represented by the log(n)-Model with mean equal to , the inverse function of the logarithmic integral function. Therefore, we can conclude that the property represented by the Riemann Hypothesis through the RH rule is largely independent of the primes and belongs to a large class of random sequences. Whether this class also contains the sequence of prime numbers cannot be decided by the model except statistically. Something similar happens within the context of analytical theory when speaking of zeta function , Dirichlet L-functions (Chap. 12, ) (s is the complex variable ), and the Generalized Riemann Hypothesis “that is the hypothesis that not only but all the functions have their zeros in the critical strip on the line ” (p. 124, ).
Attempts to prove the Riemann hypothesis through the methods of physics go back as far as the so-called Hilbert–Polya conjecture, which associates the imaginary part of non-trivial zeros of to the eigenvalues of some self-adjoint (Hermitian) operator that might be considered like the Hamiltonian of a physical system (the story of Hilbert–Polya conjecture is documented on Odlyzko’s personal website; see http://www.dtc.umn.edu/~odlyzko/ accessed on 31 March 2021). Each type of combinatorial model we presented in the previous sections, based on probability equations such as (111) and more generally (25), can be transformed into a single particle Hamiltonian of an equivalent quantum system that emerges as a solution to an underlying combinatorial problem. This topic is outside the scope of this work and will not be treated here; I just want to mention that the analogy with the physical problem allows us to overcome some critical points of the combinatorial model and eliminate any arbitrariness in the choice of the mean of the random variable (the combinatorial counterpart of the n-th prime). The solution emerges as a general asymptotic solution for such models due to concepts such as interaction potential and energy levels, that play an important role also in describing integer sequences such as Fibonacci numbers and prime numbers, and the application of the Hellmann–Feynman theorem to the whole system (see  for a mathematical foundation of the theorem). These methods result in computational benefits improving the estimates obtained from the combinatorial model and may suggest new conjectures about the distribution of primes. In , the quantum model derived from what we have called n-Model is developed and applied to explore the region beyond the Skewes number in connection with the numerical results known in the literature derived through analytical methods.
These two topics (the parallelism between the treatment from the point of view of random sequences and of Riemann zeta and Dirichlet L-functions; the transposition of the problem into a quantum physics framework), seem worthy of being addressed in future work.
This research received no external funding.
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
I am grateful to Marek Wolf (Cardinal Stefan Wyszynski University in Warsaw, Department of Physics) for his data about the number of successive prime pairs up to .
Conflicts of Interest
The authors declare no conflict of interest.
Cramér, H. Prime numbers and probability. Skand. Math. Kongr.1935, 8, 107–115. [Google Scholar]
Cramér, H. On the order of magnitude of the difference between consecutive prime numbers. Acta Arith.1936, 2, 23–46. [Google Scholar] [CrossRef]
Granville, A. Harald Cramér and the Distribution of Prime Numbers. Scand. Actuar. J.1995, 1, 12–28. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely
those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or
the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas,
methods, instructions or products referred to in the content.