OFFSET
1,1
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1) = (3+5)/2 = 4; a(2) = (5+7)/2+(7+11)/2 = 15; a(3) = (11+13)/2+(13+17)/2 +(17+19)/2 = 45.
MATHEMATICA
(* sum of next n integer interprimes*) i1 := n(n-1)/2+1; i2 := n(n-1)/2+n; Table[Sum[(Prime[i+2]+Prime[i+1])/2, {i, i1, i2}], {n, 1, 40}]
With[{nn=40}, Total/@TakeList[Mean/@Partition[Prime[Range[2, (nn(nn+1))/2+2]], 2, 1], Range[nn]]] (* Harvey P. Dale, Feb 24 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 24 2002
STATUS
approved