[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A166448
Sum of first n primes minus next prime.
3
-1, 0, 3, 6, 15, 24, 39, 54, 71, 98, 123, 156, 195, 234, 275, 322, 379, 434, 497, 566, 633, 708, 785, 866, 959, 1058, 1157, 1262, 1367, 1466, 1589, 1714, 1849, 1978, 2125, 2270, 2421, 2580, 2741, 2908, 3085, 3256, 3445, 3634, 3829, 4016, 4215, 4434, 4659, 4884
OFFSET
1,3
LINKS
EXAMPLE
2-3=-1, 2+3-5=0, 2+3+5-7=3,..
MATHEMATICA
Clear[lst, n, a, b]; a=0; lst={}; Do[a+=Prime[n]; b=a-Prime[n+1]; AppendTo[lst, b], {n, 5!}]; lst
Module[{nn=60, prs}, prs=Prime[Range[nn]]; Accumulate[Take[prs, nn-1]]- Take[ prs, {2, nn}]] (* Harvey P. Dale, Oct 12 2015 *)
PROG
(PARI) A166448()={ summ=0; for (n=1, 500, p=prime(n); summ+=p;
write("b166448.txt", n, " ", (summ-prime(n+1)) )); \\end FOR }
CROSSREFS
Sequence in context: A179805 A006639 A242757 * A192171 A281758 A280465
KEYWORD
sign
AUTHOR
STATUS
approved