The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A356475 First of three consecutive primes p,q,r such that p*q + q*r + r*p is prime. 4
2, 3, 5, 7, 17, 29, 37, 41, 43, 67, 83, 103, 137, 157, 179, 181, 193, 227, 277, 283, 347, 359, 383, 431, 457, 461, 607, 661, 701, 709, 757, 773, 823, 827, 839, 859, 937, 967, 1013, 1051, 1061, 1109, 1129, 1187, 1201, 1213, 1249, 1283, 1307, 1327, 1373, 1423, 1439, 1471, 1481, 1487, 1543, 1567 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(4) = 7 is a term because 7, 11, 13 are three consecutive primes with 7*11 + 11*13 + 13*7 = 311 which is prime.
MAPLE
R:= NULL: count:= 0:
P:= Vector(3, ithprime):
while count < 100 do
x:= P[1]*P[2]+P[2]*P[3]+P[3]*P[1];
if isprime(x) then R:= R, P[1]; count:= count+1 fi;
P[1..2]:= P[2..3];
P[3]:= nextprime(P[3]);
od:
R;
MATHEMATICA
Select[Partition[Prime[Range[250]], 3, 1], PrimeQ[Total[# * RotateLeft[#]]] &][[;; , 1]] (* Amiram Eldar, Aug 08 2022 *)
PROG
(Python)
from itertools import islice
from sympy import isprime, nextprime
def agen():
p, q, r = 2, 3, 5
while True:
if isprime(p*q + q*r + r*p): yield p
p, q, r = q, r, nextprime(r)
print(list(islice(agen(), 58))) # Michael S. Branicky, Aug 08 2022
(PARI) list(lim)=my(v=List(), p=2, q=3); forprime(r=5, nextprime(nextprime(lim\1+1)+1), if(isprime(p*q + q*r + r*p), listput(v, p)); p=q; q=r); Vec(v) \\ Charles R Greathouse IV, Sep 06 2022
CROSSREFS
Sequence in context: A060212 A107439 A262836 * A178382 A360591 A289757
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 08 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 June 17 07:15 EDT 2024. Contains 373433 sequences. (Running on oeis4.)