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.

A336300 Primes p such that there exists k with p < k < q such that p+k and q+k are prime, where q is the next prime after p.

Original entry on oeis.org

5, 23, 29, 31, 47, 53, 73, 83, 113, 131, 139, 151, 173, 199, 211, 251, 293, 317, 359, 373, 467, 491, 509, 523, 541, 557, 593, 607, 647, 659, 683, 709, 719, 761, 773, 797, 809, 811, 863, 911, 991, 997, 1063, 1069, 1103, 1117, 1163, 1171, 1187, 1201, 1231, 1259, 1307, 1327, 1409, 1439, 1459, 1499
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Oct 22 2020

Keywords

Comments

There may be more than one such k: thus for a(17) = 293, k = 294, 300, and 306 all work.

Examples

			a(4)=31 is included because 31 is prime, the next prime after 31 is 37, and with k=36 we have 31+36=67 and 37+36=73 both prime.
		

Crossrefs

Includes A069142.

Programs

  • Maple
    P:= [seq(ithprime(i),i=2..1000)]:
    R:= NULL:
    for i from 1 to nops(P)-1 do
      for k from ceil(P[i]/2) to floor(P[i+1]/2) do
        if isprime(P[i]+2*k) and isprime(P[i+1]+2*k) then
          R:= R, P[i]; break
        fi
      od;
    od:
    R;