Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #6 Sep 08 2022 08:45:30
%S 593,1907,4409,6323,15313,17483,19577,25673,26693,29269,34673,38867,
%T 46889,54773,64013,67169,68483,74567,81749,85049,95273,96431,110813,
%U 111863,127643,132929,134213,134639,135089,140351,156241,157253,160403
%N Balanced primes p of the form (r+q+s-1)/2, where r, q, s are consecutive primes.
%C The primes q arising here are in A129190.
%C q need not be a balanced prime, see however A129242.
%H Robert Israel, <a href="/A129191/b129191.txt">Table of n, a(n) for n = 1..10000</a>
%e 1907 = (1259+1277+1279-1)/2 is prime and 1259, 1277, 1279 are consecutive primes. 1907 = A006562(24) is a balanced prime, it has distance 6 to the preceding prime 1901 and to the next prime 1913. Hence 1907 is a term.
%p p:= 2: q:= 3: r:= 5:
%p Res:= NULL: count:= 0:
%p while count < 100 do
%p p:= q; q:= r; r:= nextprime(r);
%p s:= (p+q+r-1)/2;
%p if isprime(s) and nextprime(s) + prevprime(s) = 2*s then
%p count:= count+1; Res:= Res, s;
%p fi
%p od:
%p Res; # _Robert Israel_, May 03 2019
%o (Magma) [ p: q in PrimesInInterval(3, 110000) | IsPrime(p) and PreviousPrime(p)+NextPrime(p) eq 2*p where p is (PreviousPrime(q)+q+NextPrime(q)-1) div 2];
%Y Cf. A006562 (balanced primes), A127313, A129190, A129242.
%K nonn
%O 1,1
%A _Klaus Brockhaus_, Apr 05 2007