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.

A240621 Primes p such that p*q + 6 and p*q - 6 are primes where p and q are consecutive primes.

Original entry on oeis.org

5, 7, 11, 19, 23, 37, 79, 97, 307, 349, 439, 479, 503, 719, 907, 983, 991, 1061, 1069, 1109, 1597, 1609, 1621, 1867, 2111, 2609, 3301, 3371, 3851, 4129, 4211, 4639, 4999, 5119, 5471, 5683, 5779, 5867, 5939, 6563, 7951, 9337, 9461, 9551, 10061, 10181, 10273, 12251
Offset: 1

Views

Author

K. D. Bajpai, Apr 09 2014

Keywords

Examples

			7 is in the sequence because 7*11 + 6 = 83 and 7*11 - 6 = 71 are both prime where 7 and 11 are consecutive primes.
37 is in the sequence because 37*41 + 6 = 1523 and 37*41 - 6 = 1511 are both prime where 37 and 41 are consecutive primes.
		

Crossrefs

Programs

  • Maple
    KD := proc(n) local a,b,d; a:=ithprime(n)*ithprime(n+1); b:=a+6; d:=a-6; if  isprime(b) and isprime(d) then RETURN (ithprime(n)); fi; end: seq(KD(n), n=1..5000);
  • Mathematica
    Select[Partition[Prime[Range[1500]],2,1],AllTrue[Times@@#+{6,-6},PrimeQ]&][[All,1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 21 2017 *)
  • PARI
    isok(p) = isprime(p) && (q = nextprime(p+1)) && isprime(p*q-6) && isprime(p*q+6); \\ Michel Marcus, Apr 12 2014