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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A342705 Primes p such that (p^2 - p*q + q^2)/3 is prime, where q is the next prime after p. 2
 5, 7, 13, 17, 19, 59, 97, 101, 107, 109, 191, 223, 229, 277, 283, 569, 613, 631, 643, 709, 719, 743, 829, 857, 881, 1031, 1049, 1051, 1091, 1109, 1171, 1193, 1249, 1277, 1301, 1327, 1489, 1579, 1637, 1697, 1949, 1979, 2003, 2081, 2089, 2113, 2141, 2203, 2357, 2423, 2539, 2593, 2659, 2749, 2789, 2819 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS If p == -q (mod 3) then p^2 - p*q + q^2 is divisible by 3. LINKS Robert Israel, Table of n, a(n) for n = 1..10000 EXAMPLE a(5) = 19 is a term because 19 and 23 are consecutive primes and (19^2 - 19*23 + 23^2)/3 = 151 is prime. MAPLE R:= NULL: q:= 2: count:= 0: while count < 100 do   p:= q; q:= nextprime(p);   r:= (p^2-p*q+q^2)/3;   if r::integer and isprime(r) then     count:= count+1; R:= R, p;   fi; od: R; PROG (Python) from sympy import isprime, nextprime def aupto(limit):   p, q, num, alst = 2, 3, 7, []   while  p <= limit:     if num%3 == 0 and isprime(num//3): alst.append(p)     p, q = q, nextprime(q)     num = p**2 - p*q + q**2   return alst print(aupto(2819)) # Michael S. Branicky, Mar 18 2021 CROSSREFS Cf. A339920, A342706. Sequence in context: A106067 A287614 A320866 * A314321 A314322 A028311 Adjacent sequences:  A342702 A342703 A342704 * A342706 A342707 A342708 KEYWORD nonn AUTHOR J. M. Bergot and Robert Israel, Mar 18 2021 STATUS approved

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

Last modified January 21 20:28 EST 2022. Contains 350480 sequences. (Running on oeis4.)