OFFSET
1,1
EXAMPLE
n k(n) prime(n) Sum_{j=k(n)..prime(n)} j
= ==== ======== ========================
1 0 2 0 + 1 + 2 = 3 = a(1)
2 1 3 1 + 2 + 3 = 6 = a(2)
3 4 5 4 + 5 = 9 = a(3)
4 6 7 6 + 7 = 13 = a(4)
5 8 11 8 + 9 + 10 + 11 = 38 = a(5)
PROG
(PARI) k=0; p=2; for(i=1, 1e2, s=p*(p+1)/2-k*(k-1)/2; print1(s", "); p=nextprime(p+1); while(isprime(k++), ))
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Juri-Stepan Gerasimov, Jun 16 2009, Jun 27 2009
EXTENSIONS
Corrected and extended by Charles R Greathouse IV, Mar 25 2010
Name clarified and Example section edited by Jon E. Schoenfield, Feb 10 2019
STATUS
approved