A161624 Sum of all numbers from n to n-th prime.
3, 5, 12, 22, 56, 76, 132, 162, 240, 390, 441, 637, 783, 855, 1023, 1311, 1634, 1738, 2107, 2366, 2491, 2929, 3233, 3729, 4453, 4826, 5005, 5400, 5589, 6006, 7663, 8150, 8925, 9169, 10580, 10846, 11737, 12663, 13287, 14271, 15290, 15610, 17433, 17775
Offset: 1
Keywords
Examples
First prime is 2, so a(1) = 1+2 = 3; fifth prime is 11, so a(5) = 5+6+7+8+9+10+11 = 56.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[ &+[n..NthPrime(n)]: n in [1..44] ]; // Klaus Brockhaus, Jun 14 2009
-
Mathematica
snos[n_]:=Module[{pr=Prime[n]},((pr+n)(pr-n+1))/2]; Array[snos, 50] (* Harvey P. Dale, Jun 05 2012 *)
Formula
a(n) = Sum_{k=n..prime(n)} k.
Extensions
Edited and extended by Klaus Brockhaus, Jun 15 2009