OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
PrimeNextTwinAverage[n_]:=Module[{k}, k=n+1; While[ !PrimeQ[k-1]||!PrimeQ[k+1], k++ ]; k]; lst={}; Do[If[PrimeQ[n-1]&&PrimeQ[n+1], a=n; a+=PrimeNextTwinAverage[a]; If[PrimeQ[a-1]&&PrimeQ[a+1], AppendTo[lst, a]]], {n, 8!}]; lst
Select[Total/@Partition[Mean/@Select[Partition[Prime[Range[ 2000]], 2, 1], #[[2]] - #[[1]] ==2&], 2, 1], AllTrue[#+{1, -1}, PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 12 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 30 2009
EXTENSIONS
Comment and examples edited by R. J. Mathar, Jul 31 2007
STATUS
approved