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!)
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 (list; graph; refs; listen; history; text; internal format)
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

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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)