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.

A213329 Smallest k such that there are n - 1 primes between k*p(n) and k*p(n + 1) where p(n) is the n-th prime, or 0 if no such k exists.

Original entry on oeis.org

1, 2, 2, 3, 8, 5, 13, 9, 8, 25, 10, 15, 31, 19, 19, 15, 56, 0, 33, 79, 26, 33, 0, 21, 54, 110, 52, 126, 57, 16, 71, 42, 140, 29, 130, 0, 51, 76, 51, 53, 179, 0, 192, 93, 216, 34, 34, 107, 247, 120, 84, 278, 0, 84, 105, 99, 301, 95, 154, 287, 0, 40, 154, 325
Offset: 1

Views

Author

Irina Gerasimova, Mar 04 2013

Keywords

Comments

Smallest prime q such that there is a prime number of primes between q*p(n) and q*p(n + 1) where p(n) is the n-th prime: 5, 3, 2, 2, 5, 2, 7, 2, 2, 2, 2, 13, 13, 3, 2, 2, 3, 2, 2, 7, 2, 3, 2, 3, 2, 7, 3, 7, 3, 3, 3, 2, 7, 2, 7, 2, 3, 3, 3, 2, 11, 2, 11, 5, 29, 3, 7, 3, 7, 2, 3, 11, 2, 2, 2, 5, 3,...
Smallest m such that there are m primes between k*p(n) and k*p(n + 1) for some k > 1 where p(n) is the n-th prime: 1, 1, 1, 2, 1, 2, 1, 2, 0, 3, 1, 1, 1, 3, 3, 0, 2, 2, 0, 3, 1, 2, 4, 1, 0, 1,...
Primes p for which there are no primes between k*p and k*q for some k > 1 where q is the next prime after p: 29, 59, 71, 101,...
Only-one-gap primes: primes p for which there are primes between k*p and k*q for all k > 1 where q is the next prime after p: 2, 3, 5, 7, 11, 13, 17, 19, 23, 31, 37, 41, 43, 47, 53, 61, 67, 73, 79, 83, 89, 97, 103,...
Smallest k such that there is exactly one twin prime pair and no other primes between k*p and k*(p+2) where (p, p+2) is the n-th twin prime pair, or 0 if no such k exists; 3, 2, 5, 4, 2, 10, 2, 6, 0, 3, 0, 7, 0, 6,...
Primes p(n) for which there is exactly one prime quadruplet q, q+2, q+6, q+8 and no other primes between k*p(n) and k*p(n+1) for some k: 61, 163, 197, 271, 409,...

Examples

			For n=4, p(4) = 7 and p(4 + 1) = 11.  We are looking for an interval containing 4 - 1 = 3 primes.  There are zero primes between 1 * 7 = 7 and 1 * 11 = 11.  There are two primes between 2 * 7 = 14 and 2 * 11 = 22 (17 and 19).  There are three primes between 3 * 7 = 21 and 3 * 11 = 33 (23, 29, and 31).  So a(4) = 3.
		

Crossrefs

Cf. 2-gap primes A080192, 3-gap primes A195270.

Programs

  • PARI
    a(n)=my(p=prime(n),q=nextprime(p+1),k,t=if(q/p>(1.+1/16597)^(n-1),2010760,max(exp(1/25/((q/p)^(1./(n-1))-1)),396738)));while(sum(i=k++*p+1,k*q-1,isprime(i))!=n-1,if(k>t,return(0)));k \\ Charles R Greathouse IV, Mar 06 2013

Extensions

a(13)-a(17) from Charles R Greathouse IV, Mar 06 2013
a(18)-a(64) from Michael B. Porter, Mar 12 2013