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.

A065595 a(n) = (sum of first n primes)^2 - sum of squares of first n primes.

This page as a plain text file.
%I A065595 #15 Oct 12 2015 01:50:12
%S A065595 0,12,62,202,576,1304,2698,4902,8444,14244,22242,34082,50236,70704,
%T A065595 97118,131886,176844,230524,297658,378314,471608,584104,715410,870982,
%U A065595 1057804,1271924,1511090,1781586,2080464,2414944,2819566,3270206
%N A065595 a(n) = (sum of first n primes)^2 - sum of squares of first n primes.
%H A065595 Harry J. Smith, <a href="/A065595/b065595.txt">Table of n, a(n) for n=1,...,500</a>
%F A065595 a(n) = (A007504(n))^2 - A024450(n). - _R. J. Mathar_, Oct 07 2011
%e A065595 a(4) = 202 because (2 + 3 + 5 + 7)^2 - (2^2 + 3^2 + 5^2 + 7^2) = 17^2 - (4 + 9 + 25 + 49) = 289 - 87 = 202
%t A065595 With[{prs=Prime[Range[40]]},Table[Total[Take[prs,n]]^2-Total[Take[ prs,n]^2], {n,40}]] (* _Harvey P. Dale_, Dec 04 2011 *)
%o A065595 (PARI) { a1=a2=0; for (n=1, 500, a1+=prime(n); a2+=prime(n)^2; write("b065595.txt", n, " ", a1^2 - a2) ) } \\ _Harry J. Smith_, Oct 23 2009
%Y A065595 Cf. A007504, A024450.
%K A065595 easy,nonn
%O A065595 1,2
%A A065595 _Terrel Trotter, Jr._, Dec 01 2001
%E A065595 a(26)-a(32) from _Harry J. Smith_, Oct 23 2009