login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
Sequence in context: A164965 A021823 A131026 * A014604 A015199 A234044
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)