OFFSET
1,1
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
389, 397, 401 are consecutive primes. 593 = (389+397+401-1)/2 = A006562(10) is a balanced prime, it is the average of the preceding prime 587 and the next prime 599. Hence 397 is a term.
MATHEMATICA
bpQ[{r_, q_, s_}]:=Module[{p=(r+q+s-1)/2}, PrimeQ[p]&&Mean[{NextPrime[p], NextPrime[p, -1]}]==p]; Select[Partition[Prime[Range[ 11000]], 3, 1], bpQ][[;; , 2]] (* Harvey P. Dale, Oct 10 2024 *)
PROG
(Magma) [ q: 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 ];
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Apr 05 2007
STATUS
approved