login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342504 Primes p such that (p*r+q*s)/2 is prime, where p,q,r,s are consecutive primes. 3
5, 7, 37, 53, 79, 97, 107, 109, 263, 293, 409, 463, 563, 571, 701, 853, 877, 1031, 1423, 1567, 1699, 1747, 1789, 2029, 2837, 2917, 2969, 3137, 3251, 3331, 3413, 3461, 3533, 3881, 3889, 4229, 4513, 4909, 4937, 5051, 5059, 5843, 6011, 6151, 6361, 6521, 6779, 7331, 7547, 7673, 8243, 8269, 8287, 8693 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

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

EXAMPLE

a(3) = 37 is a term because 37,41,43,47 are consecutive primes and (37*43+41*47)/2 = 1759 is prime.

MAPLE

R:= NULL: count:= 0:

q:= 3: r:= 5: s:= 7:

while count < 100 do

  p:= q; q:= r; r:= s; s:= nextprime(s);

  if isprime((p*r+q*s)/2) then

     count:= count+1; R:= R, p;

  fi

od:

R;

PROG

(Python)

from sympy import isprime, nextprime

def aupton(terms):

  alst, p, q, r, s = [], 2, 3, 5, 7

  while len(alst) < terms:

    if isprime((p*r + q*s)//2): alst.append(p)

    p, q, r, s = q, r, s, nextprime(s)

  return alst

print(aupton(54)) # Michael S. Branicky, Mar 14 2021

CROSSREFS

Cf. A342505, A342506.

Sequence in context: A196203 A196473 A081851 * A192156 A322380 A006067

Adjacent sequences:  A342501 A342502 A342503 * A342505 A342506 A342507

KEYWORD

nonn

AUTHOR

J. M. Bergot and Robert Israel, Mar 14 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 6 11:48 EST 2021. Contains 349563 sequences. (Running on oeis4.)