cp's OEIS Frontend

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.

A166363 Number of primes in the half-open interval (n*(log(n))^2..(n+1)*(log(n+1))^2].

This page as a plain text file.
%I A166363 #29 Feb 16 2025 08:33:11
%S A166363 0,2,2,1,3,1,2,3,2,2,3,2,2,4,1,2,3,3,3,3,2,2,5,2,3,4,1,3,3,3,4,3,3,3,
%T A166363 4,3,3,4,1,3,3,5,3,4,4,3,3,3,4,3,3,4,4,4,2,3,4,3,3,4,5,3,5,4,2,3,3,6,
%U A166363 2,4,5,3,2,2,3,6,3,6,3,4,4,6,3,4,3,4,4,4,2,3,6,3,3,2,6,5,2,6,3,5,3,2,5,4,4
%N A166363 Number of primes in the half-open interval (n*(log(n))^2..(n+1)*(log(n+1))^2].
%C A166363 The open-closed half-open intervals form a partition of the real line for x > 0, thus each prime appears in a unique interval.
%C A166363 The n-th interval length is ~ (log(n+1/2))^2 + 2*log(n+1/2) ~ (log(n))^2 as n goes to infinity.
%C A166363 The n-th interval prime density is ~ 1/[log(n+1/2)+2*log(log(n+1/2))] ~ 1/log(n) as n goes to infinity.
%C A166363 The expected number of primes in the n-th interval is ~ [(log(n+1/2))^2 + 2*log(n+1/2)] / [log(n+1/2)+2*log(log(n+1/2))] ~ log(n) as n goes to infinity.
%C A166363 For n = 1 there is no prime.
%C A166363 If it can be proved that each interval always contains at least one prime, this would constitute even shorter intervals than A166332(n), let alone A143898(n), as n gets large.
%C A166363 The Shanks Conjecture and the Cramer-Granville Conjecture tell us that the intervals of length (log(n))^2 are of very critical length (the constant M > 1 of the Cramer-Granville Conjecture definitely matters!). There seems to be some risk that one such interval does not contain a prime.
%C A166363 The Wolf Conjecture (which agrees better with numerical evidence) seems more in favor of each interval's containing at least one prime.
%C A166363 From _Charles R Greathouse IV_, May 13 2010: (Start)
%C A166363 Not all intervals > 1 contain primes!
%C A166363 a(n) = 0 for n = 1, 4977, 17512, 147127, 76082969 (and no others up to 10^8).
%C A166363 Higher values include 731197850, 2961721173, 2103052050563, 188781483769833, 1183136231564246 but this list is not exhaustive.
%C A166363 The intervals have length (log n)^2 + 2*log n + o(1). In the Cramer model, the probability that a given integer in the interval would be prime is approximately 1/(log n + 2*log log n). Tedious calculation gives the probability that a(n) = 0 in the Cramer model as 3C(log n)^2/n * (1 + o(1)) with C = exp(-5/2)/3. Thus under that model we would expect to find roughly C*(log N)^3 numbers n up to N with a(n) = 0. In fact, the numbers are not that common since the probabilities are not independent.
%C A166363 (End)
%C A166363 The similar sequence A345755 relies on intervals that are slightly more than twice as wide as those in the present sequence. A345755 does not include zero entries for n <= 2772, suggesting that the lengths of prime gaps may be bracketed by the two sequences. We conjecture that prime gaps may be larger than log(p)^2, but are not larger than log_2(p)^2. - _Hal M. Switkay_, Aug 29 2023
%H A166363 Charles R Greathouse IV, <a href="/A166363/b166363.txt">Table of n, a(n) for n = 1..10000</a>
%H A166363 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeGaps.html">Prime Gaps</a>.
%H A166363 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Cramer-GranvilleConjecture.html">Cramer-Granville Conjecture</a>.
%H A166363 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ShanksConjecture.html">Shanks Conjecture</a> (and Wolf Conjecture.)
%F A166363 a(n) = pi((n+1)*(log(n+1))^2) - pi(n*(log(n))^2) since the intervals are half-open properly.
%o A166363 (PARI) a(n)=sum(k=ceil(n*log(n)^2),floor((n+1)*log(n+1)^2), isprime(k)) \\ _Charles R Greathouse IV_, Aug 21 2015
%Y A166363 Cf. A166332, A000720, A111943, A143898, A134034, A143935, A144140 (primes between successive n^K, for different K), A014085 (primes between successive squares).
%Y A166363 Cf. A182315, A345755.
%K A166363 nonn
%O A166363 1,2
%A A166363 _Daniel Forgues_, Oct 12 2009
%E A166363 Edited by _Daniel Forgues_, Oct 18 2009 and Nov 01 2009
%E A166363 Edited by _Charles R Greathouse IV_, May 13 2010