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.

A339414 Primes p such that (p+q)/4 is prime, where q is the next prime after p.

Original entry on oeis.org

3, 5, 23, 31, 83, 131, 251, 271, 331, 383, 443, 563, 971, 1123, 1223, 1231, 1283, 1291, 1543, 2063, 2371, 2383, 2551, 2851, 2903, 2963, 3083, 3323, 3691, 3889, 4051, 4283, 4591, 4733, 4831, 4871, 4951, 5003, 5209, 5351, 5683, 5711, 5851, 6229, 6271, 6323, 6491, 6863, 6911, 7393, 7451, 7583, 7643
Offset: 1

Views

Author

Robert Israel, Dec 03 2020

Keywords

Comments

After the initial 2 terms, a(n)=2*A118134(n)-3. - Hugo Pfoertner, Dec 03 2020

Examples

			a(5)=83 is in the sequence because it is prime, the next prime is 89, and (83+89)/4 = 43 is prime.
		

Crossrefs

Subset of A098058.
Cf. A118134.

Programs

  • Maple
    P:= select(isprime, [seq(i,i=3..10000,2)]):
    R:= (P[1..-2]+P[2..-1])/4:
    P[select(i-> R[i]::integer and isprime(R[i]), [$1..nops(R)])];
  • PARI
    isok(p) = isprime(p) && iferr(isprime((p+nextprime(p+1))/4),E,0); \\ Michel Marcus, Dec 04 2020