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.

Showing 1-2 of 2 results.

A166737 Number of primes in (n^2*log(n)..(n+1)^2*log(n+1)] semi-open intervals, n >= 1.

Original entry on oeis.org

1, 3, 4, 4, 6, 6, 8, 8, 10, 11, 10, 13, 13, 14, 16, 14, 17, 20, 18, 21, 21, 22, 21, 24, 22, 30, 22, 31, 28, 25, 34, 32, 32, 33, 33, 34, 36, 38, 41, 35, 41, 40, 41, 45, 41, 41, 48, 49, 48, 49, 48, 48, 48, 54, 56, 54, 51, 56, 56, 61, 62, 57, 60, 62, 63, 59, 65, 66, 64, 65, 77, 67
Offset: 1

Views

Author

Daniel Forgues, Oct 21 2009

Keywords

Comments

Number of primes in (n*(n*log(n))..(n+1)*((n+1)*log(n+1))] semi-open intervals, n >= 1.
The semi-open intervals form a partition of the real line for x > 0, thus each prime appears in a unique interval.
The n-th interval length is:
(n+1/2)*[2*log(n+1/2)+1]
2*n*log(n) as n goes to infinity
The n-th interval prime density is:
1/[2*log(n+1/2)+log(log(n+1/2))]
1/(2*log(n)) as n goes to infinity
The expected number of primes for n-th interval is:
(n+1/2)*[2*log(n+1/2)+1]/[2*log(n+1/2)+log(log(n+1/2))]
n as n goes to infinity
The actual number of primes for n-th interval seems to be (from graph): a(n) = n + O(n^(1/2))
The partial sums of this sequence give:
pi((n+1)^2*log(n+1)) = Sum_{i=1}^n {a(i)} ~ Sum_{i=1}^n {i} = t_n = n*(n+1)/2

Crossrefs

Cf. A166712 (for intervals containing an asymptotic average of one prime.)
Cf. A014085 (for primes between successive squares.)
Cf. A000720.

Formula

a(n) = pi((n+1)^2*log(n+1)) - pi(n^2*log(n)) since the intervals are semi-open properly.

Extensions

Corrected and edited by Daniel Forgues, Oct 23 2009

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

Original entry on oeis.org

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, 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, 1, 0, 1, 3, 2, 0, 0, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Jon Perry, Oct 13 2012

Keywords

Comments

Conjecture: a(n) is unbounded.
If Riemann Hypothesis is true, this is probably true as the PNT is generally a lower bound for Pi(n).
Conjecture: a(n)=0 infinitely often.
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

Examples

			log(1)=0 and 2*log(2) ~ 1.38629436112. Hence, a(1)=0.
Floor(2*log(2)) = 1 and 3*log(3) ~ 3.295836866. Hence, a(2)=2.
		

References

  • A. Brauer and H. Zeitz, Über eine zahlentheoretische Behauptung von Legendre, Sitz. Berliner Math. Gee. 29 (1930), pp. 116-125; cited in Erdos 1935.

Crossrefs

An alternate version of A166712.

Programs

  • JavaScript
    function isprime(i) {
    if (i==1) return false;
    if (i==2) return true;
    if (i%2==0) return false;
    for (j=3;j<=Math.floor(Math.sqrt(i));j+=2)
    if (i%j==0) return false;
    return true;
    }
    for (i=1;i<88;i++) {
    c=0;
    for (k=Math.floor(i*Math.log(i));k<=(i+1)*Math.log(i+1);k++) if (isprime(k)) c++;
    document.write(c+", ");
    }
    
  • Mathematica
    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 *)
  • PARI
    a(n)=sum(k=n*log(n)\1,(n+1)*log(n+1),isprime(k)) \\ Charles R Greathouse IV, Oct 15 2012
Showing 1-2 of 2 results.