|
|
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
|
|
|
FORMULA
|
|
|
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", "))
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|