OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
MAPLE
p:= 2: q:= 3: r:= 5:
Res:= NULL: count:= 0:
while count < 100 do
p:= q; q:= r; r:= nextprime(r);
s:= (p+q+r-1)/2;
if isprime(s) and nextprime(s) + prevprime(s) = 2*s then
count:= count+1; Res:= Res, s;
fi
od:
Res; # Robert Israel, May 03 2019
PROG
(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];
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Apr 05 2007
STATUS
approved