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.

A120934 Least prime p such that the interval [p,p+log(p)] contains n primes.

Original entry on oeis.org

2, 11, 457, 3251, 165701, 10526557, 495233351, 196039655873, 10687033762033, 79006533276941, 4313367040646743, 1740318019946551931
Offset: 1

Views

Author

T. D. Noe, Jul 21 2006

Keywords

Comments

Soundararajan states that, on average, there is one prime in the interval [k,k+log(k)] for any number k. Is there an upper limit to the number of primes in such an interval? Not if the prime k-tuple conjecture is true, in which case a(n) exists for all n. Note that a(n) > e^A008407(n). See A120935 for the largest prime in the interval.
a(n) begins a sequence of n primes whose prime pattern is one of the patterns in the n-th row of A186634. For example, the sequence of four consecutive primes beginning with 3251 is (3251, 3253, 3257, 3259), which has pattern (0, 2, 6, 8), which is in the 4th row of A186634.

Examples

			a(2)=11 because p=11 is the first prime with log(p) > 2 and 11+2 is prime.
		

Crossrefs

Cf. A120935, A120936 (number of primes in the interval [n, n+log(n)]), A020497.

Programs

  • Mathematica
    i=1; Table[While[p=Prime[i]; PrimePi[p+Log[p]]-PrimePi[p]+1< n, i++ ]; p, {n,5}]
  • PARI
    A120934(n) = {
     my(v = vector(n,k,prime(k)), i = 1);
     while(v[(i - 2) % n + 1] - v[i] > floor(log(v[i])),
      v[i] = nextprime(v[(i - 2) % n + 1] + 1);
      i = i % n + 1; );
     return(vecsort(v)[1]) } \\ Florian Baur, Jul 12 2023

Formula

This sequence grows superexponentially; a weak lower bound is a(n) >> (log n)^n. It seems that a(n) > n^n. - Charles R Greathouse IV, Apr 18 2012
A lower bound is a(n) > e^A008407(n). a(n) < b*e^A008407(n), for 2 <= n <= 12, b < 1.49. For 9 <= n <= 12, b < 1.0006. a(13) > 701673591209763173865. - Florian Baur, Jul 12 2023 [Corrected by Pontus von Brömssen, Nov 12 2023]

Extensions

a(12) from Donovan Johnson, Apr 18 2012

A364459 Number of primes in the interval [n,n+log(n)^2].

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 1, 2, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 4, 4, 3, 3, 2, 3, 3, 4, 3, 3, 3, 3, 4, 4, 3, 4, 4, 5, 5, 5, 4, 4, 4, 4, 4, 4, 5, 5, 4, 4, 4, 5, 4, 4, 3, 3, 3, 3, 3, 4, 3, 3, 4, 4, 4, 4, 4, 4, 5, 6, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5, 5
Offset: 1

Views

Author

Alain Rocchelli, Jul 25 2023

Keywords

Comments

On average, there are log(n) primes in the interval [n,n+log(n)^2] for any number n.

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(isprime(i), 1, 0), i=n..floor(n+log(n)^2)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 25 2023
  • PARI
    for(n=2, 100, An=primepi(n+(log(n))^2)-primepi(n-1); print1(An,", "))
Showing 1-2 of 2 results.