%I #14 Oct 20 2020 09:59:51
%S 23,37,79,83,89,131,233,359,367,379,439,443,509,661,683,727,809,997,
%T 1013,1237,1297,1319,1381,1439,1499,1543,1559,1601,1657,1789,1811,
%U 1867,1889,2011,2081,2111,2137,2161,2281,2351,2393,2399,2467,2543,2579,2693,2699,2789,2851,2939,3169,3181,3187
%N Primes p such that the sum of p and the average of the primes immediately before and after p is prime.
%C At least one of the prime gaps before and after a(n) is divisible by 6, and exactly one is divisible by 4.
%C 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.
%C For the sum of a(n) and the average of the primes immediately before and after a(n) see A338273.
%C 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.
%H Robert Israel, <a href="/A338270/b338270.txt">Table of n, a(n) for n = 1..10000</a>
%e 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.
%p q:= 3: r:= 5:
%p count:= 0: R:= NULL:
%p while count < 100 do
%p p:= q; q:= r; r:= nextprime(r);
%p if isprime((p+2*q+r)/2) then count:= count+1; R:= R, q; fi
%p od:
%p R;
%Y Cf. A338273.
%K nonn
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Oct 19 2020
|