OFFSET
1,5
COMMENTS
Also difference between partial sum of the first n primes and the sum of the first n odd numbers. - Cino Hilliard, Dec 02 2007
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
Table[ Sum[ Prime[i], {i, n}] - n^2, {n, 53}] (* Robert G. Wilson v, Jun 25 2005 *)
Module[{nn=60, prs}, prs=Accumulate[Prime[Range[nn]]]; #[[1]]-#[[2]]&/@Thread[ {prs, Range[ nn]^2}]] (* Harvey P. Dale, Aug 14 2024 *)
PROG
(PARI) g(n) = for(x=1, n, y=sum(j=1, x, 2*j-1); z=sum(j=1, x, prime(j)); print1(z-y", ")) \\ Cino Hilliard, Dec 02 2007
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Alexandre Wajnberg, Jun 23 2005
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jun 25 2005
STATUS
approved