login
A093809
a[n] =a[n-1] + 2*n*Prime[n]-n^2
0
0, 8, 29, 69, 154, 274, 463, 703, 1036, 1516, 2077, 2821, 3718, 4726, 5911, 7351, 9068, 10940, 13125, 15565, 18190, 21182, 24471, 28167, 32392, 36968, 41801, 47009, 52490, 58370, 65283, 72643, 80596, 88892, 98097, 107673, 117922, 128866, 140371
OFFSET
1,2
MATHEMATICA
hg[n_Integer?Positive] :=hg[n] =hg[n-1] + 2*n*Prime[n]-n^2 hg[1] =0 digits=50 a=Table[hg[n], {n, 1, digits}]
nxt[{n_, a_}]:={n+1, a+2(n+1)Prime[n+1]-(n+1)^2}; NestList[nxt, {1, 0}, 40][[All, 2]] (* Harvey P. Dale, May 01 2017 *)
CROSSREFS
Sequence in context: A341402 A247541 A320695 * A244244 A037157 A288115
KEYWORD
nonn
AUTHOR
Roger L. Bagula, May 19 2004
STATUS
approved