%I #15 Sep 08 2022 08:46:24
%S 41,47,79,103,107,151,157,167,191,229,263,283,311,313,317,337,439,521,
%T 547,557,619,631,677,691,709,727,733,761,797,809,823,853,859,863,947,
%U 953,977,991,1051,1091,1103,1151,1153,1213,1229,1289,1301,1327,1429,1447,1471,1487,1493,1511,1607,1627
%N Odd primes p such that p mod A001414((p+q)/2) and q mod A001414((p+q)/2) are prime, where q is the least prime > p.
%C If v is prime such that v-26, v-24, 6*v-1 and 6*v+1 are prime, then 6*v-1 is in the sequence. Dickson's conjecture implies there are infinitely many terms of this form.
%H Robert Israel, <a href="/A329446/b329446.txt">Table of n, a(n) for n = 1..10000</a>
%e a(3)=79 is in the sequence because it is an odd prime, the next prime is 83, A001414((79+83)/2) = A001414(3^4) = 12, and 79 mod 12 = 7 and 83 mod 12 = 11 are both prime.
%p P:= select(isprime, [seq(i,i=3..2000,2)]):
%p Res:= NULL:
%p for i from 1 to nops(P)-1 do
%p m:= (P[i]+P[i+1])/2;
%p L:= ifactors(m)[2];
%p M:= convert(map(convert,L,`*`),`+`);
%p if isprime(P[i] mod M) and isprime(P[i+1] mod M) then
%p Res:= Res, P[i]
%p fi
%p od:
%p Res;
%o (Magma) [p:p in PrimesUpTo(1700)|IsPrime(p mod s) and IsPrime(NextPrime(p) mod s) where s is &+[j[1]*j[2]: j in Factorization((p+NextPrime(p)) div 2)] ]; // _Marius A. Burtea_, Nov 13 2019
%Y Cf. A001414.
%K nonn
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Nov 13 2019