OFFSET

1,1

COMMENTS

At least one of the prime gaps before and after a(n) is divisible by 6, and exactly one is divisible by 4.

Dickson's conjecture implies there are, for example, infinitely many primes p such that p-4 is the prime before p, p+6 is the prime after p, and 2*p+1 is prime; these are members of the sequence.

For the sum of a(n) and the average of the primes immediately before and after a(n) see A338273.

a(3)=79, a(4)=83, a(5)=89 are three consecutive primes. The first case of four consecutive primes in the sequence is a(723)=67789, a(724)=67801, a(725)=67807, a(726)=67819. The first case of five consecutive primes in the sequence is a(13175)=2263249, a(13176)=2263273, a(13177)=2263307, a(13178)=2263319, a(13179)=2263321.

LINKS

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

EXAMPLE

a(3)=79 is in the sequence because 79 is prime, the primes before and after 79 are 73 and 83, and 79 + (73+83)/2 = 157 is prime.

MAPLE

q:= 3: r:= 5:

count:= 0: R:= NULL:

while count < 100 do

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

if isprime((p+2*q+r)/2) then count:= count+1; R:= R, q; fi

od:

R;

CROSSREFS

KEYWORD

nonn

AUTHOR

J. M. Bergot and Robert Israel, Oct 19 2020

STATUS

approved