The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A333839 a(n) = Sum_{k = 4..n} ((prevprime(k) + nextprime(k))/2 - k). 0
 0, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 2, 4, 5, 5, 4, 2, 0, 0, 2, 4, 5, 5, 4, 2, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 2, 4, 5, 5, 4, 2, 2, 4, 5, 5, 4, 2, 0, 0, 2, 4, 5, 5, 4, 2, 1, 2, 2, 1, 0, 0, 2, 4, 5, 5, 4, 2, 1, 2, 2, 1, 2, 4, 5, 5, 4, 2, 3, 6, 8, 9, 9, 8, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 4,5 COMMENTS It looks like a(n) >= 0 for all n >= 4. If (n,n+2) are twin primes, then a(n) = 0 and a(n+1) = 0. Partial sums of b(k) = prevprime(k) + nextprime(k) - 2*k; b(k) = 0 for A145025. LINKS FORMULA a(n) = Sum_{k = 4..n} (A013632(k) - A049711(k)) / 2. EXAMPLE a(4) = (3 + 5)/2 - 4 = 0; a(5) = (3 + 5)/2 - 4 + (3 + 7)/2 - 5 = 0. MATHEMATICA Array[Sum[Total[NextPrime[k, {-1, 1}]]/2 - k, {k, 4, #}] &, 92, 4] (* Michael De Vlieger, Apr 10 2020 *) CROSSREFS Cf. A013632, A033559, A049711, A145025. Sequence in context: A164965 A021823 A131026 * A014604 A015199 A234044 Adjacent sequences:  A333836 A333837 A333838 * A333840 A333841 A333842 KEYWORD nonn AUTHOR Ctibor O. Zizka, Apr 07 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 17 00:17 EDT 2021. Contains 345080 sequences. (Running on oeis4.)