cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A166448 Sum of first n primes minus next prime.

This page as a plain text file.
%I A166448 #10 Oct 12 2015 17:20:18
%S A166448 -1,0,3,6,15,24,39,54,71,98,123,156,195,234,275,322,379,434,497,566,
%T A166448 633,708,785,866,959,1058,1157,1262,1367,1466,1589,1714,1849,1978,
%U A166448 2125,2270,2421,2580,2741,2908,3085,3256,3445,3634,3829,4016,4215,4434,4659,4884
%N A166448 Sum of first n primes minus next prime.
%H A166448 Bill McEachen, <a href="/A166448/b166448.txt">Table of n, a(n) for n = 1..20000</a>
%e A166448 2-3=-1, 2+3-5=0, 2+3+5-7=3,..
%t A166448 Clear[lst,n,a,b]; a=0;lst={};Do[a+=Prime[n];b=a-Prime[n+1];AppendTo[lst,b],{n,5!}];lst
%t A166448 Module[{nn=60,prs},prs=Prime[Range[nn]];Accumulate[Take[prs,nn-1]]- Take[ prs,{2,nn}]] (* _Harvey P. Dale_, Oct 12 2015 *)
%o A166448 (PARI) A166448()={ summ=0; for (n=1, 500, p=prime(n); summ+=p;
%o A166448 write("b166448.txt", n, " ", (summ-prime(n+1)) ));  \\end FOR }
%Y A166448 Cf. A007504
%K A166448 sign
%O A166448 1,3
%A A166448 _Vladimir Joseph Stephan Orlovsky_, Oct 13 2009