OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
Averages of twin prime pairs: 4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150, ...
108 = 6 + 12 + 18 + 30 + 42, 570 = 72 + 102 + 108 + 138 + 150, ...
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; b=PrimeNextTwinAverage[a]; c=PrimeNextTwinAverage[b]; d=PrimeNextTwinAverage[c]; e=PrimeNextTwinAverage[d]; a=a+b+c+d+e; If[PrimeQ[a-1]&&PrimeQ[a+1], AppendTo[lst, a]]], {n, 3*8!}]; lst
Select[Total/@(Partition[Mean/@Select[Partition[Prime[Range[10000]], 2, 1], #[[2]]-#[[1]]==2&], 5, 1]), AllTrue[#+{1, -1}, PrimeQ]&] (* Harvey P. Dale, Sep 26 2024 *)
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 30 2009
STATUS
approved