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.

A217864 Number of prime numbers between floor(n*log(n)) and (n + 1)*log(n + 1).

This page as a plain text file.
%I A217864 #23 Apr 27 2019 05:23:20
%S A217864 0,2,2,2,0,2,1,2,2,1,1,2,0,1,2,1,0,1,1,2,1,1,1,1,1,0,1,1,2,1,2,1,0,0,
%T A217864 1,1,1,1,0,2,0,1,1,1,1,1,1,0,2,2,0,0,1,0,1,2,1,1,1,0,1,1,1,2,1,2,2,0,
%U A217864 1,0,1,3,2,0,0,1,1,0,2,1,1,0,1,1,2,1,1
%N A217864 Number of prime numbers between floor(n*log(n)) and (n + 1)*log(n + 1).
%C A217864 Conjecture: a(n) is unbounded.
%C A217864 If Riemann Hypothesis is true, this is probably true as the PNT is generally a lower bound for Pi(n).
%C A217864 Conjecture: a(n)=0 infinitely often.
%C A217864 The first conjecture follows from Dickson's conjecture. The second conjecture follows from a theorem of Brauer & Zeitz on prime gaps. - _Charles R Greathouse IV_, Oct 15 2012
%D A217864 A. Brauer and H. Zeitz, Über eine zahlentheoretische Behauptung von Legendre, Sitz. Berliner Math. Gee. 29 (1930), pp. 116-125; cited in Erdos 1935.
%H A217864 Paul Erdős, <a href="http://www.renyi.hu/~p_erdos/1935-07.pdf">On the difference of consecutive primes</a>, Quart. J. Math., Oxford Ser. 6 (1935), pp. 124-128.
%e A217864 log(1)=0 and 2*log(2) ~ 1.38629436112. Hence, a(1)=0.
%e A217864 Floor(2*log(2)) = 1 and 3*log(3) ~ 3.295836866. Hence, a(2)=2.
%t A217864 Table[s = Floor[n*Log[n]]; PrimePi[(n+1) Log[n+1]] - PrimePi[s] + Boole[PrimeQ[s]], {n, 100}] (* _T. D. Noe_, Oct 15 2012 *)
%o A217864 (JavaScript)
%o A217864 function isprime(i) {
%o A217864 if (i==1) return false;
%o A217864 if (i==2) return true;
%o A217864 if (i%2==0) return false;
%o A217864 for (j=3;j<=Math.floor(Math.sqrt(i));j+=2)
%o A217864 if (i%j==0) return false;
%o A217864 return true;
%o A217864 }
%o A217864 for (i=1;i<88;i++) {
%o A217864 c=0;
%o A217864 for (k=Math.floor(i*Math.log(i));k<=(i+1)*Math.log(i+1);k++) if (isprime(k)) c++;
%o A217864 document.write(c+", ");
%o A217864 }
%o A217864 (PARI) a(n)=sum(k=n*log(n)\1,(n+1)*log(n+1),isprime(k)) \\ _Charles R Greathouse IV_, Oct 15 2012
%Y A217864 An alternate version of A166712.
%Y A217864 Cf. A217564, A096509, A000905, A050504, A000720.
%K A217864 nonn
%O A217864 1,2
%A A217864 _Jon Perry_, Oct 13 2012