%I #38 Oct 02 2024 16:53:54
%S 0,1,1,2,1,2,1,3,2,4,2,2,3,2,4,4,1,2,3,2,3,4,2,3,3,3,4,2,4,3,4,4,5,3,
%T 4,6,2,5,3,7,4,4,5,2,4,5,4,3,3,3,4,6,3,3,3,4,5,4,3,5,3,5,3,4,7,4,6,6,
%U 4,6,3,3,3,6,7,6,2,5,6,2,6,4,4,3,5,3,7
%N Number of primes between n^2 and n^2 + log_2(n)^2 (inclusive).
%C Indices of zeros: 1, 1165, 4292936, 4765516.
%C Conjecture: a(n) > 0 for n > 4765516.
%C Conjecture checked up to n = 5 * 10^10. - _Charles R Greathouse IV_, Mar 21 2013
%C Conjecture checked up to 4 * 10^18. Note that this conjecture is consistent with Granville's conjecture that lim sup (prime(n+1)-prime(n))/log(prime(n))^2 >= 2/e^gamma, where gamma is Euler's constant. - _Charles R Greathouse IV_, Mar 21 2016
%H T. D. Noe, <a href="/A217317/b217317.txt">Table of n, a(n) for n = 1..10000</a>
%t Table[Length[Select[Range[n^2, n^2 + Log[2, n]^2], PrimeQ]], {n, 100}] (* _T. D. Noe_, Mar 21 2013 *)
%t Table[PrimePi[n^2+Log[2,n]^2]-PrimePi[n^2],{n,90}] (* _Harvey P. Dale_, May 22 2014 *)
%o (Python)
%o import math
%o def isprime(k):
%o s = 3
%o while s*s <= k:
%o if k%s==0: return 0
%o s+=2
%o return 1
%o for n in range(1, 333):
%o c = 0
%o top = n*n + int(math.log(n, 2)**2) + 1
%o for i in range(n*n+1, top):
%o if i&1: c += isprime(i)
%o print(str(c), end=', ')
%o (PARI) a(n)=sum(i=n^2+1,n^2+(log(n)/log(2))^2,isprime(i)) \\ _Charles R Greathouse IV_, Mar 21 2013
%Y Cf. A089610, A216266.
%K nonn
%O 1,4
%A _Alex Ratushnyak_, Mar 20 2013