OFFSET
1,1
COMMENTS
Values of p (lesser of consecutive primes) are in the sequence A022885.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Interprime
EXAMPLE
600 is in this sequence because 593, 599, 601 and 607 are consecutive primes, and 600 = (599+601)/2 = (593+607)/2.
MATHEMATICA
(Prime@ # + Prime[# + 3])/2 & /@ Select[Range@ 240, (First@ # + Last@ #)/2 == (#[[2]] + #[[3]])/2 &@ Prime@ Range[#, # + 3] & (* Michael De Vlieger, Nov 18 2015 *)
Mean/@Select[Partition[Prime[Range[300]], 4, 1], (#[[2]]+#[[3]])/2==(#[[1]]+#[[4]])/2&] (* Harvey P. Dale, Aug 18 2024 *)
PROG
(PARI) {forprime(q=3, 2000, p=precprime(q-1); r=nextprime(q+1); s=nextprime(r+1); m=(q+r)/2; if(m==(p+s)/2, print1(m, ", ")))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Antonio Roldán, Oct 23 2015
STATUS
approved