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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A352951 Primes p such that p+2, (p^2-5)/2-p, (p^2-1)/2+p, and (p^2+3)/2+3*p are all prime. 1
5, 29, 599, 26699, 59669, 72869, 189389, 285839, 389999, 508619, 623669, 708989, 862229, 908879, 945629, 945809, 953789, 1002149, 1134389, 1138409, 1431569, 1461209, 1712549, 2110289, 2127269, 2158589, 2704769, 2727299, 2837279, 3004049, 3068909, 3091379, 3280229, 3336659, 3402239, 3546269 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Lower twin primes p such that if q = p+2, then (p*q-1)/2, (p*q-1)/2-p-q and (p*q-1)/2+p+q are also prime.
All terms but the first == 29 (mod 30).
LINKS
EXAMPLE
a(3)=599 is a term because it, 599+2 = 601, (599*601-1)/2 = 179999, 179999-599-601 = 178799, and 179999+599+601 = 181199 are prime.
MAPLE
R:= 5: count:= 0:
for p from 29 by 30 while count < 60 do
if isprime(p) and isprime(p+2) then
q:= p+2; r:= (p*q-1)/2;
if isprime(r) and isprime(r+p+q) and isprime(r-p-q) then
count:= count+1; R:= R, p;
fi
fi
od:
R;
MATHEMATICA
Select[Prime[Range[250000]], And @@ PrimeQ[{# + 2, (#^2 - 5)/2 - #, (#^2 - 1)/2 + #, (#^2 + 3)/2 + 3*#}] &] (* Amiram Eldar, Apr 11 2022 *)
Select[Prime[Range[260000]], AllTrue[{#+2, (#^2-5)/2-#, (#^2-1)/2+#, (#^2+3)/2+3#}, PrimeQ]&] (* Harvey P. Dale, Jun 12 2024 *)
PROG
(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:
t, s = (p*q-1)//2, p+q
if isprime(t) and isprime(t+s) and isprime(t-s):
yield p
p, q = q, nextprime(q)
print(list(islice(agen(), 36))) # Michael S. Branicky, Apr 10 2022
CROSSREFS
Cf. A352948.
Subsequence of A001359.
Sequence in context: A259534 A176680 A352948 * A069142 A144994 A263369
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Apr 10 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 August 12 04:50 EDT 2024. Contains 375085 sequences. (Running on oeis4.)