A052288 First differences of the average of two consecutive primes (A024675).
2, 3, 3, 3, 3, 3, 5, 4, 4, 5, 3, 3, 5, 6, 4, 4, 5, 3, 4, 5, 5, 7, 6, 3, 3, 3, 3, 9, 9, 5, 4, 6, 6, 4, 6, 5, 5, 6, 4, 6, 6, 3, 3, 7, 12, 8, 3, 3, 5, 4, 6, 8, 6, 6, 4, 4, 5, 3, 6, 12, 9, 3, 3, 9, 10, 8, 6, 3, 5, 7, 7, 6, 5, 5, 7, 6, 6, 9, 6, 6, 6, 4, 5, 5, 7, 6, 3, 3, 8, 10, 6, 6, 6, 5, 9, 7, 10, 12, 8, 8, 6
Offset: 1
Examples
a(30) = ((113 + 127)/2) - ((127 + 131)/2) = (131 - 113)/2 = 9; a(31) = ((127 + 131)/2) - ((137 + 131)/2) = (137 - 127)/2 = 5.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
Formula
a(n) = (prime(n+3) - prime(n+1))/2.
Comments