OFFSET
1,1
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*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]
bpnQ[{a_, b_, c_}]:=Module[{d=b(b-1)+1, e, f}, e=NextPrime[d, -1]; f= NextPrime[ d]; (a+c)/2==b&&PrimeQ[d]&&(e+f)/2==d]; Select[Partition[Prime[ Range[ 1200000]], 3, 1], bpnQ][[All, 2]] (* Harvey P. Dale, May 12 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 05 2008
EXTENSIONS
a(11)-a(27) from Donovan Johnson, Aug 24 2011
STATUS
approved