OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (prime(n+3) - prime(n+1))/2.
EXAMPLE
a(30) = ((113 + 127)/2) - ((127 + 131)/2) = (131 - 113)/2 = 9;
a(31) = ((127 + 131)/2) - ((137 + 131)/2) = (137 - 127)/2 = 5.
MATHEMATICA
Differences@ ListConvolve[{1, 1}/2, Prime@ Range[2, 120]] (* Michael De Vlieger, Dec 17 2016, after Jean-François Alcover at A024675 *)
Differences[Mean/@Partition[Prime[Range[2, 110]], 2, 1]] (* Harvey P. Dale, Sep 10 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Feb 08 2000
STATUS
approved