<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OALibJ</journal-id><journal-title-group><journal-title>Open Access Library Journal</journal-title></journal-title-group><issn pub-type="epub">2333-9705</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/oalib.1102989</article-id><article-id pub-id-type="publisher-id">OALibJ-70336</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Biomedical&amp;Life Sciences</subject><subject> Business&amp;Economics</subject><subject> Chemistry&amp;Materials Science</subject><subject> Computer Science&amp;Communications</subject><subject> Earth&amp;Environmental Sciences</subject><subject> Engineering</subject><subject> Medicine&amp;Healthcare</subject><subject> Physics&amp;Mathematics</subject><subject> Social Sciences&amp;Humanities</subject></subj-group></article-categories><title-group><article-title>
 
 
  A Power Law Governing Prime Gaps
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Raul</surname><given-names>Matsushita</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Sergio</surname><given-names>Da Silva</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib></contrib-group><aff id="aff2"><addr-line>Graduate Program in Economics, Federal University of Santa Catarina, Florianopolis, Brazil</addr-line></aff><aff id="aff1"><addr-line>Department of Statistics, University of Brasilia, Brasilia, Brazil</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>raulmta@unb.br(RM)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>30</day><month>09</month><year>2016</year></pub-date><volume>03</volume><issue>09</issue><fpage>1</fpage><lpage>6</lpage><history><date date-type="received"><day>August</day>	<month>18,</month>	<year>2016</year></date><date date-type="rev-recd"><day>Accepted:</day>	<month>August</month>	<year>29,</year>	</date><date date-type="accepted"><day>September</day>	<month>2,</month>	<year>2016</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  A prime gap is the difference between two successive prime numbers. Prime gaps are casually thought to occur randomly. However, the “
  k
  -tuple conjecture” suggests that prime gaps are non-random by estimating how often pairs, triples and larger groupings of primes will appear. The 
  k
  -tuple conjecture is yet to be proven, but a very recent work presents a result that contributes to a confirmation of the
  k
  -tuple conjecture by finding unexpected biases in the distribution of consecutive primes. Here, we present another contribution to confirmation of the 
  k
  -tuple conjecture based on statistical physics. The pattern we find 
  comes in the form of a power law in the distribution of prime gaps. We find that prime gaps are proportional to the inverse of the chance of a number to be prime.
 
</p></abstract><kwd-group><kwd>Prime Numbers</kwd><kwd> Power Laws</kwd><kwd> Prime Gaps</kwd><kwd> k-Tuple Conjecture</kwd><kwd> Number Theory</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Prime numbers are divisible only by themselves and 1. Primes are the building blocks of the entire number line because all the other numbers are created by multiplying primes together. Thus, primes are the core of arithmetic.</p><p>Whether a number is prime or not is pre-determined, as evidenced by innumerous laws already proven. For instance, the prime number theorem states that the average length of the gap between a prime <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x2.png" xlink:type="simple"/></inline-formula> and the next prime is<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x3.png" xlink:type="simple"/></inline-formula>. Such prime gaps have been extensively studied; however many questions and conjectures remain unanswered. In particular, there is no way to predict with certainty which numbers are prime and so, for practical purposes, prime gaps are considered to occur randomly. Actually, the “k-tuple conjecture” [<xref ref-type="bibr" rid="scirp.70336-ref1">1</xref>] allows for a non-random explanation by estimating how often pairs, triples and larger groupings of primes will appear. The k-tuple conjecture is yet to be proven, but a very recent work [<xref ref-type="bibr" rid="scirp.70336-ref2">2</xref>] , however, presents a result that contributes to a confirmation of the k-tuple conjecture by finding unexpected biases in the distribution of consecutive primes.</p><p>Apart from 2 and 5, all prime numbers end in 1, 3, 7 or 9, and each of the four endings is supposedly equally likely. But the authors in Ref. [<xref ref-type="bibr" rid="scirp.70336-ref2">2</xref>] find that primes ending in 1 were less likely to be followed by another prime ending in 1. That is unexpected if the primes are truly random. The authors [<xref ref-type="bibr" rid="scirp.70336-ref2">2</xref>] find that in the first hundred million primes, a prime ending in 1 is followed by another ending in 1 just 18.5 percent of the time. (Incidentally, we confirmed this pattern using a sample of 50,000 prime numbers, but found 15.8 percent of the time instead. Perhaps the difference can be explained by our smaller sample, or perhaps we are right after all and 18.5 is just a typo.) If the primes were distributed randomly, the authors argue that one would expect to see two 1 s next to each other 25 percent of the time. Primes ending in 3 and 7 follow a 1 about 30 percent of the time, while a 9 follows a 1 around 22 percent of instances.</p><p>The authors then show that the last-digit pattern can be explained by the groupings given by the k-tuple conjecture. However, as the primes tend to infinity, the pattern vanishes and the primes become genuinely random. Here, we contribute to the literature by presenting further evidence that the k-tuple conjecture can be true. In line with the authors in Ref. [<xref ref-type="bibr" rid="scirp.70336-ref2">2</xref>] we also find unexpected biases in the distribution of consecutive primes. However, we adopt a statistical physics perspective. The patterns we show to occur come in the form of power laws in the distribution of prime gaps.</p><p>There is already substantial literature on primes adopting the statistical physics perspective. In line with our finding, the histograms in the distribution of gaps between primes divided into “congruence families” are shown to be scale invariant [<xref ref-type="bibr" rid="scirp.70336-ref3">3</xref>] . A theory to explain the origin of the unexpected periodic behavior of gaps between primes has been linked to the k-tuple conjecture, the statistical mechanics of spin systems and the Sierpinski fractal [<xref ref-type="bibr" rid="scirp.70336-ref4">4</xref>] . Higher-order gaps between the primes have been analyzed by Fourier decomposition to show patterns in the resulting power spectra [<xref ref-type="bibr" rid="scirp.70336-ref5">5</xref>] . The gaps between primes have been shown to exhibit a period six oscillation [<xref ref-type="bibr" rid="scirp.70336-ref6">6</xref>] . The histogram of the increments (the difference between two consecutive gaps between primes) has been shown to follow an exponential distribution with superposed periodic behavior of period three [<xref ref-type="bibr" rid="scirp.70336-ref7">7</xref>] . Rather than prime gaps, for the distribution of primes themselves there have been claims of self-similarity [<xref ref-type="bibr" rid="scirp.70336-ref8">8</xref>] , small world networks [<xref ref-type="bibr" rid="scirp.70336-ref9">9</xref>] and even chaos [<xref ref-type="bibr" rid="scirp.70336-ref10">10</xref>] .</p></sec><sec id="s2"><title>2. Power Law Pattern</title><p>As the authors in Ref. [<xref ref-type="bibr" rid="scirp.70336-ref2">2</xref>] , we investigate whether all the prime numbers ending in 1, 3, 7 or 9 are equally likely. First, we transform the sequence of 50,000 numbers of such four endings into a binary sequence, as in <xref ref-type="table" rid="table1">Table 1</xref>.</p><p>Then we let <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x4.png" xlink:type="simple"/></inline-formula> be the relative frequency of a number <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x5.png" xlink:type="simple"/></inline-formula> to be prime. After, we</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Binary transform of the sequence of numbers ending in 1, 3, 7 or 9</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Number n</th><th align="center" valign="middle" >Prime? 0 = no, 1 = yes</th></tr></thead><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >0</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >7</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >9</td><td align="center" valign="middle" >0</td></tr><tr><td align="center" valign="middle" >11</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >13</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >17</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >19</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >21</td><td align="center" valign="middle" >0</td></tr><tr><td align="center" valign="middle" >23</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >27</td><td align="center" valign="middle" >0</td></tr><tr><td align="center" valign="middle" >29</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >31</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >33</td><td align="center" valign="middle" >0</td></tr><tr><td align="center" valign="middle" >37</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >…</td><td align="center" valign="middle" >…</td></tr></tbody></table></table-wrap><p>consider a Bernoulli random variable <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x6.png" xlink:type="simple"/></inline-formula> such that <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x7.png" xlink:type="simple"/></inline-formula> if <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x8.png" xlink:type="simple"/></inline-formula> is prime and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x9.png" xlink:type="simple"/></inline-formula> otherwise. Our aim is to find the functional form of the relative frequency<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x10.png" xlink:type="simple"/></inline-formula>. We could observe the occurrences of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x11.png" xlink:type="simple"/></inline-formula> tend to decrease as <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x12.png" xlink:type="simple"/></inline-formula> grows. This pattern cannot be easily visualized considering a plot of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x13.png" xlink:type="simple"/></inline-formula> against <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x14.png" xlink:type="simple"/></inline-formula> due to the very fact that our series is a sequence of 0 s and 1 s.</p><p>To overcome this difficulty, we devised the following: Assume <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x15.png" xlink:type="simple"/></inline-formula> is a nonstationary Bernoulli process, where the probability of success <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x16.png" xlink:type="simple"/></inline-formula> is not constant. Such a probability can be estimated using a nonlinear Kalman filter [<xref ref-type="bibr" rid="scirp.70336-ref11">11</xref>] , which linearizes an estimate of the current mean and covariance. <xref ref-type="fig" rid="fig1">Figure 1</xref> (top) shows the estimates of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x17.png" xlink:type="simple"/></inline-formula> versus<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x18.png" xlink:type="simple"/></inline-formula>, and the bottom shows the adjusted straight line for <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x18.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x19.png" xlink:type="simple"/></inline-formula> in red font. It is implied that</p><disp-formula id="scirp.70336-formula1"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/70336x20.png"  xlink:type="simple"/></disp-formula><p>Thus, for <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x21.png" xlink:type="simple"/></inline-formula> the probability <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x22.png" xlink:type="simple"/></inline-formula> behaves according to a power law that takes the form:</p><disp-formula id="scirp.70336-formula2"><label>. (2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/70336x23.png"  xlink:type="simple"/></disp-formula><p>This power law can be translated in terms of prime gaps, as in <xref ref-type="table" rid="table2">Table 2</xref>. First note that the prime gap distribution is approximately geometric.</p><p>Then, let <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x24.png" xlink:type="simple"/></inline-formula> be a geometric random variable with probability of success<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x25.png" xlink:type="simple"/></inline-formula>. Tentatively consider that “success” is the occurrence of a prime number <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x26.png" xlink:type="simple"/></inline-formula> and that the</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Estimations using a nonlinear Kalman filter show the chances of a number to be prime follows a power law (red font)</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/70336x27.png"/></fig><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Prime numbers and prime gaps</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Prime number</th><th align="center" valign="middle" >Prime gap</th></tr></thead><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >2</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >1</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >2</td></tr><tr><td align="center" valign="middle" >7</td><td align="center" valign="middle" >2</td></tr><tr><td align="center" valign="middle" >11</td><td align="center" valign="middle" >4</td></tr><tr><td align="center" valign="middle" >13</td><td align="center" valign="middle" >2</td></tr><tr><td align="center" valign="middle" >17</td><td align="center" valign="middle" >4</td></tr><tr><td align="center" valign="middle" >19</td><td align="center" valign="middle" >2</td></tr><tr><td align="center" valign="middle" >23</td><td align="center" valign="middle" >4</td></tr><tr><td align="center" valign="middle" >29</td><td align="center" valign="middle" >6</td></tr><tr><td align="center" valign="middle" >...</td><td align="center" valign="middle" >...</td></tr></tbody></table></table-wrap><p>successive Bernoulli trials are independent. Thus, the expected number of trials until the occurrence of a subsequent prime is given by:</p><disp-formula id="scirp.70336-formula3"><label>. (3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/70336x28.png"  xlink:type="simple"/></disp-formula><p>However, because our Bernoulli process is nonstationary and the Bernoulli trials are not independent, one cannot expect an analytic solution such as that provided by Equation (3) to hold true. But one can empirically determine an analogous substitute for Equation (3) by considering estimates of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x29.png" xlink:type="simple"/></inline-formula> on the basis of the prime gaps shown in <xref ref-type="table" rid="table2">Table 2</xref>.</p><p>Using the nonlinear Kalman filter for this geometric process, <xref ref-type="fig" rid="fig2">Figure 2</xref> shows the dispersion of estimates of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x30.png" xlink:type="simple"/></inline-formula> (considering a geometric process) and estimates of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x31.png" xlink:type="simple"/></inline-formula></p><p>(considering a Bernoulli process). As can be seen, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/70336x32.png" xlink:type="simple"/></inline-formula>as expected for a typical geometric process. However, the adjusted straight line (in red font) presents the form:</p><disp-formula id="scirp.70336-formula4"><label>. (4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/70336x33.png"  xlink:type="simple"/></disp-formula><p>Therefore, prime gaps are proportional to the inverse of the chance of a number to be prime.</p><p>Alternatively, consideration of the power law in Equation (2) yields:</p><disp-formula id="scirp.70336-formula5"><label>. (5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/70336x34.png"  xlink:type="simple"/></disp-formula></sec><sec id="s3"><title>3. Conclusion</title><p>Although the difference between two successive prime numbers is casually considered random, the k-tuple conjecture casts doubt on that. The k-tuple conjecture is yet to be</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> Estimations using a nonlinear Kalman filter show prime gaps follow a power law (red font)</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/70336x35.png"/></fig><p>proven, but finding unexpected biases in the distribution of consecutive primes provides confirmation of the k-tuple conjecture. Motivated by a recent mathematical study [<xref ref-type="bibr" rid="scirp.70336-ref2">2</xref>] , we explain departures from randomness in prime gaps from a statistical physics perspective. The pattern we find that challenges the hypothesis of the genuine random behavior of prime gaps comes in the form of a power law. We find that prime gaps are proportional to the inverse of the chance of a number to be prime.</p></sec><sec id="s4"><title>Cite this paper</title><p>Matsushita, R. and Da Silva, S. (2016) A Power Law Governing Prime Gaps. Open Access Library Journal, 3: e2989. http://dx.doi.org/10.4236/oalib.1102989</p></sec></body><back><ref-list><title>References</title><ref id="scirp.70336-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Hardy, G.H. and Littlewood, J.E. (1923) Some Problems of “Partitio Numerorum”. III. On the Expression of a Number as a Sum of Primes. Acta Mathematica, 44, 1-70.http://dx.doi.org/10.1007/BF02403921</mixed-citation></ref><ref id="scirp.70336-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Lemke Oliver, R.J. and Soundararajan, K. (2016) Unexpected Biases in the Distribution of Consecutive Primes. http://arxiv.org/abs/1603.03720</mixed-citation></ref><ref id="scirp.70336-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Dahmen, S.R., Prado, S.D. and Stuermer-Daitx, T. (2001) Similarity in the Statistics of Prime Numbers. Physica A, 296, 523-528. http://dx.doi.org/10.1016/S0378-4371(01)00183-2</mixed-citation></ref><ref id="scirp.70336-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Ares, S. and Castro, M. (2006) Hidden Structure in the Randomness of the Prime Number Sequence? Physica A, 360, 285-296. http://dx.doi.org/10.1016/j.physa.2005.06.066</mixed-citation></ref><ref id="scirp.70336-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Szpiro, G.G. (2007) Peaks and Gaps: Spectral Analysis of the Intervals between Prime Numbers. Physica A, 384, 291-296. http://dx.doi.org/10.1016/j.physa.2007.05.038</mixed-citation></ref><ref id="scirp.70336-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Wolf, M. (1999) Applications of Statistical Mechanics in Number Theory. Physica A, 274, 149-157. http://dx.doi.org/10.1016/S0378-4371(99)00318-0</mixed-citation></ref><ref id="scirp.70336-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Kumar, P., Ivanov, P.C. and Stanley, H.E. (2003) Information Entropy and Correlations in Prime Numbers. arXiv: condmat/0303110.</mixed-citation></ref><ref id="scirp.70336-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Wolf, M. (1997) 1/f Noise in the Distribution of Prime Numbers. Physica A, 241, 493-499.http://dx.doi.org/10.1016/S0378-4371(97)00251-3</mixed-citation></ref><ref id="scirp.70336-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Chandra, A.K. and Dasgupta, S. (2005) A Small World Network of Prime Numbers. Physica A, 357, 436-446. http://dx.doi.org/10.1016/j.physa.2005.02.089</mixed-citation></ref><ref id="scirp.70336-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Gamba, Z., Hernando, J. and Romanelli, L. (1990) Are Prime Numbers Regularly Ordered? Physics Letters A, 145, 106-108. http://dx.doi.org/10.1016/0375-9601(90)90200-8</mixed-citation></ref><ref id="scirp.70336-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Harvey, A.C. (1989) Forecasting, Structural Time Series Models and the Kalman Filter. Cambridge University Press, Cambridge.</mixed-citation></ref></ref-list></back></article>