A352948 Primes p such that p+2, (p^2-1)/2+p and (p^2+3)/2+3*p are also prime.
5, 29, 599, 2687, 3557, 4337, 5009, 8597, 23687, 26249, 26699, 36527, 37307, 39509, 55049, 59669, 61559, 65519, 69497, 72269, 72869, 74507, 75209, 81017, 82559, 87557, 92639, 93479, 97157, 102407, 103289, 106217, 114689, 120917, 136067, 140627, 147449, 156797, 162749, 167117, 179999, 181397
Offset: 1
Keywords
Examples
a(3) = 599 is a term because it, 599+2 = 601, (599*601-1)/2 = 179999, and 179999+599+601 = 181199 are prime.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[200000], And @@ PrimeQ[{#, # + 2, (#^2 - 1)/2 + # , (#^2 + 3)/2 + 3*#}] &] (* Amiram Eldar, Apr 10 2022 *)
-
Python
from itertools import islice from sympy import isprime, nextprime def agen(): # generator of terms p, q = 3, 5 while True: if q == p+2 and isprime((p*q-1)//2) and isprime((p*q-1)//2+p+q): yield p p, q = q, nextprime(q) print(list(islice(agen(), 42))) # Michael S. Branicky, Apr 10 2022
Comments