OFFSET
1,1
EXAMPLE
10657 is balanced prime, 10657*10656-1=113560991 is balanced prime
(113560973(prev)+113561009(next))/2=113560991
MATHEMATICA
NextPrime[n_Int]:=Module[{k}, k=n+1; While[ !PrimeQ[k], k++ ]; k]; PrevPrime[n_Int]:=Module[{k}, k=n-1; While[ !PrimeQ[k], k-- ]; k]; s=""; For[i=2, i< 10^5, p=Prime[i]; If[(Prime[i-1]+Prime[i+1])/2==p, r=p*(p-1)-1; a=PrevPrime[r]; b=NextPrime[r]; If[PrimeQ[r]&&r==(a+b)/2, (*Print[p, ":", a, ", ", b, "; ", r]*)s=s<>ToString[p]<>", "]]; i++ ]; Print[s]
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 05 2008
EXTENSIONS
a(9)-a(30) from Donovan Johnson, Aug 24 2011
STATUS
approved