login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A356762 Primes p such that, if q is the next prime, p*q+p+q, p*q-p-q, p*q+2*(p+q) and p*q-2*(p+q) are all prime. 2
5, 50929, 74759, 127541, 349849, 1287731, 1294753, 3941711, 4190023, 6130739, 6310061, 6593329, 6816973, 7347709, 7573849, 8690351, 9813409, 10985959, 11703187, 12130553, 12504001, 18032059, 18468763, 20207471, 21357191, 23635603, 24301309, 25078181, 28509521, 28729567, 28855459, 30200411, 31304239 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..1000

EXAMPLE

a(3) = 74759 is a term because it is prime, the next prime is 74761, and

74759*74761 + 74759 + 74761 = 5589207119

74759*74761 - 74759 - 74761 = 5588908079

74759*74761 + 2*(74759 + 74761) = 5589356639

74759*74761 - 2*(74759 + 74761) = 5588758559

are all prime.

MAPLE

q:= 2: R:= NULL: count:= 0:

while count < 40 do

p:= q; q:= nextprime(q); if isprime(p*q+p+q) and isprime(p*q-p-q) and isprime(p*q+2*p+2*q) and

isprime(p*q-2*p-2*q) then count:= count+1; R:= R, p; fi

od:

R;

MATHEMATICA

Select[Partition[Prime[Range[2*10^6]], 2, 1], AllTrue[{(p = #[[1]])*(q = #[[2]]) + p + q, p*q - p - q, p*q + 2*(p + q), p*q - 2*(p + q)}, PrimeQ] &][[;; , 1]] (* Amiram Eldar, Aug 26 2022 *)

PROG

(Python)

from sympy import isprime, nextprime

from itertools import count, islice

def agen(): # generator of terms

p, q = 2, 3

while True:

if all(isprime(t) for t in [p*q+p+q, p*q-p-q, p*q+2*(p+q), p*q-2*(p+q)]):

yield p

p, q = q, nextprime(q)

print(list(islice(agen(), 15))) # Michael S. Branicky, Aug 26 2022

CROSSREFS

Cf. A356765.

Sequence in context: A165711 A167369 A259161 * A242833 A242478 A247845

Adjacent sequences: A356759 A356760 A356761 * A356763 A356764 A356765

KEYWORD

nonn

AUTHOR

J. M. Bergot and Robert Israel, Aug 26 2022

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 3 05:56 EST 2022. Contains 358512 sequences. (Running on oeis4.)