This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A235402 #58 Feb 27 2019 14:02:40 %S A235402 1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6, %T A235402 6,6,6,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9, %U A235402 9,9,9,9,9,10,10,10,10,10,10,10 %N A235402 Mode of maximal "prime gaps" in Cramer's model with n urns. %C A235402 Cramer (1936) sets up his probabilistic model of primes as follows: "Let U1, U2, U3, ... be an infinite series of urns containing black and white balls, the chance of drawing a white ball from Un being 1/(log n) for n>2, while the composition of U1 and U2 may be arbitrarily chosen. We now assume that one ball is drawn from each urn, so that an infinite series of alternately black and white balls is obtained." White balls simulate "primes", and black balls are "composites". %C A235402 Note that the model, as stated, is underdetermined: the content of urns U1 and U2 is arbitrary. To compute exact distributions of maximal gaps, here we assume that %C A235402 U1 is empty — it produces neither "primes" nor "composites"; %C A235402 U2 always produces white balls (i.e., the number 2 is certain to be "prime"). %C A235402 It is not guaranteed that there are any "primes" > 2 at all. To circumvent this, we define the maximal prime gap as 1 + the longest run of "composites" observed in a given experiment with n urns. %H A235402 J. H. Cadwell, <a href="http://dx.doi.org/10.1090/S0025-5718-1971-0299567-6">Large intervals between consecutive primes</a>, Math. Comp. 25 (1971), No. 116, 909-913. %H A235402 H. Cramer, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa2/aa212.pdf">On the order of magnitude of the difference between consecutive prime numbers</a>, Acta Arith. 2 (1936), 23-46. %H A235402 A. Kourbatov, <a href="http://arxiv.org/abs/1401.6959">The distribution of maximal prime gaps in Cramer's probabilistic model of primes</a>, arXiv:1401.6959 [math.NT], 2014. %H A235402 A. Kourbatov, <a href="http://www.javascripter.net/math/statistics/maximalprimegapsincramermodel.htm">Maximal gaps between Cramer's random primes from 2 to N: cdf, histogram, mode, median</a> %H A235402 A. Kourbatov, <a href="http://arxiv.org/abs/1503.01744">Verification of the Firoozbakht conjecture for primes up to four quintillion</a>, arXiv preprint arXiv:1503.01744 [math.NT], 2015. %H A235402 Alexei Kourbatov, <a href="https://arxiv.org/abs/1506.03042">Upper Bounds for Prime Gaps Related to Firoozbakht's Conjecture</a>, arXiv preprint arXiv:1506.03042 [math.NT], 2015. %H A235402 A. Kourbatov, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Kourbatov/kourb7.html">Upper bounds for prime gaps related to Firoozbakht's conjecture</a>, J. Int. Seq. 18 (2015) 15.11.2 %H A235402 Alexei Kourbatov, <a href="http://arxiv.org/abs/1610.03340">On the distribution of maximal gaps between primes in residue classes</a>, arXiv:1610.03340 [math.NT], 2016. %H A235402 Alexei Kourbatov, Marek Wolf, <a href="https://arxiv.org/abs/1901.03785">Predicting maximal gaps in sets of primes</a>, arXiv:1901.03785 [math.NT], 2019. %F A235402 a(n) = n log(li n)/(li n) + O(log n) = (log n)^2 - (log n)*(log log n) + O(log n), where li n is the logarithmic integral of n. The formula can be proved using results of Cramer (1936); Cadwell (1971) gives a derivation for the equivalent formula on the right (without li n). %e A235402 For n=3 we have only three urns: U1, U2, U3. Of these, only U3 produces random results: %e A235402 - a white ball ("prime") with probability 1/(log3) ~ 0.91, or %e A235402 - a black ball ("composite") with probability 1 - 1/(log 3). %e A235402 Thus the longest run of "composites" is 0 with probability 0.91. Consequently, the maximal gap between "primes" is 1 with probability 0.91, so the mode (most probable value) of maximal "prime gap" is 1. %Y A235402 Cf. A235492 (median of maximal "prime gaps" in Cramer's model). %K A235402 nonn %O A235402 1,5 %A A235402 _Alexei Kourbatov_, Jan 10 2014