This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A135267 Difference between partial sum of the first n primes and the first n even numbers greater than 0. 1
 0, -1, -2, -3, -2, -1, 2, 5, 10, 19, 28, 41, 56, 71, 88, 109, 134, 159, 188, 219, 250, 285, 322, 363, 410, 459, 508, 559, 610, 663, 728, 795, 866, 937, 1016, 1095, 1178, 1265, 1354, 1447, 1544, 1641, 1746, 1851, 1958, 2065, 2182, 2309, 2438, 2567, 2698, 2833, 2968, 3111, 3258, 3409, 3564, 3719, 3878, 4039, 4200 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS G. C. Greubel, Table of n, a(n) for n = 1..1000 FORMULA a(n) = A007504(n) - A002378(n). - R. J. Mathar, Sep 10 2016 MATHEMATICA Table[Sum[Prime[k], {k, 1, n}] - n*(n + 1), {n, 1, 50}] (* G. C. Greubel, Oct 08 2016 *) With[{nn=70}, #[[1]]-#[[2]]&/@Thread[{Accumulate[Prime[Range[ nn]]], Accumulate[ Range[2, 2nn, 2]]}]] (* Harvey P. Dale, Aug 20 2017 *) PROG (PARI) g(n) = for(x=1, n, y=sum(j=1, x, 2*j); z=sum(j=1, x, prime(j)); print1(z-y", ")) (PARI) a(n)=my(s, k); forprime(p=2, , if(k++>n, break); s+=p); s-n*(n+1) \\ Charles R Greathouse IV, Oct 08 2016 CROSSREFS Cf. A002378, A007504. Sequence in context: A049063 A120894 A134819 * A242406 A270469 A204933 Adjacent sequences:  A135264 A135265 A135266 * A135268 A135269 A135270 KEYWORD sign,easy AUTHOR Cino Hilliard, Dec 02 2007 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 September 17 04:58 EDT 2019. Contains 327119 sequences. (Running on oeis4.)