login
a(n) is the number of primes p satisfying n*(log_2(n))^2 < p <= (n+1)*(log_2(n+1))^2.
2

%I #51 Sep 27 2023 13:19:28

%S 1,3,2,3,3,4,4,4,5,3,4,4,6,3,5,7,3,4,6,5,5,7,5,3,6,6,7,6,4,6,5,7,5,6,

%T 5,6,7,6,8,4,6,6,9,3,5,7,9,5,7,9,4,7,7,5,7,6,5,9,7,8,3,7,8,8,8,6,4,7,

%U 6,8,10,7,8,7,6,7,6,6,6,7,7,10,4,8,9,7

%N a(n) is the number of primes p satisfying n*(log_2(n))^2 < p <= (n+1)*(log_2(n+1))^2.

%C Prime gaps appear to grow more slowly than any power function.

%C Cramér's conjecture states that prime gaps grow as follows: prime(n+1) - prime(n) = O(log(prime(n))^2).

%C Since prime(n) ~ n*log(n), we conjecture that a(n) > 0 for n > 0, and that the exponent 2 cannot be replaced by any smaller exponent.

%C Note: n*(log_2(n))^2 < n^(log(127)/log(16)) when n >= 267. Therefore the conjecture immediately above is stronger than the conjecture that A143935(n) > 0 when n > 0, which in turn is stronger than Legendre's conjecture.

%C This sequence relies on intervals that are slightly more than twice as wide as those in the similar sequence A166363. A comment at that sequence by Greathouse discovers zero values (representing prime-free intervals). In contrast, the present sequence 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 Hal M. Switkay, <a href="/A345755/b345755.txt">Table of n, a(n) for n = 1..2772</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Cram%C3%A9r%27s_conjecture">Cramér's conjecture</a>

%e a(10) is the number of primes > 110.35 and <= 131.64. a(10) = 3, because the primes in this interval are 113, 127, and 131.

%t Differences @ Table[PrimePi[n*Log2[n]^2], {n, 1, 100}] (* _Amiram Eldar_, Jun 27 2021 *)

%o (PARI) f(n) = n*(log(n)/log(2))^2;

%o a(n) = primepi(f(n+1)) - primepi(f(n)); \\ _Michel Marcus_, Jun 30 2021

%Y Cf. A014085, A143935, A166363.

%K nonn

%O 1,2

%A _Hal M. Switkay_, Jun 27 2021