OFFSET
1,1
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
EXAMPLE
............................................ 7
........................... 5 ............ 7 5 7
............ 3 .......... 5 3 5 ........ 7 5 3 5 7
2 ........ 3 2 3 ...... 5 3 2 3 5 .... 7 5 3 2 3 5 7
a(1)=2 ... a(2)=11 .... a(3)=36 ...... a(4)=85.
MATHEMATICA
nxt[{n_, a_}] := {n + 1, a + Prime[n + 1] (2 n + 1)}; NestList[nxt, {1, 2}, 50][[All, 2]] (* Harvey P. Dale, Jul 05 2018 *)
PROG
(PARI) a(n) = sum(i=1, n, prime(i)*(2*i-1)); \\ Michel Marcus, Jan 22 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved