cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A161624 Sum of all numbers from n to n-th prime.

This page as a plain text file.
%I A161624 #11 Sep 08 2022 08:45:45
%S A161624 3,5,12,22,56,76,132,162,240,390,441,637,783,855,1023,1311,1634,1738,
%T A161624 2107,2366,2491,2929,3233,3729,4453,4826,5005,5400,5589,6006,7663,
%U A161624 8150,8925,9169,10580,10846,11737,12663,13287,14271,15290,15610,17433,17775
%N A161624 Sum of all numbers from n to n-th prime.
%H A161624 Harvey P. Dale, <a href="/A161624/b161624.txt">Table of n, a(n) for n = 1..1000</a>
%F A161624 a(n) = Sum_{k=n..prime(n)} k.
%F A161624 a(n) = A034953(n) - A000217(n-1). - _Michel Marcus_, Feb 02 2018
%e A161624 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.
%t A161624 snos[n_]:=Module[{pr=Prime[n]},((pr+n)(pr-n+1))/2]; Array[snos, 50] (* _Harvey P. Dale_, Jun 05 2012 *)
%o A161624 (Magma) [ &+[n..NthPrime(n)]: n in [1..44] ]; // _Klaus Brockhaus_, Jun 14 2009
%Y A161624 Cf. A000027, A000040, A000217, A034953, A161570.
%K A161624 nonn
%O A161624 1,1
%A A161624 _Juri-Stepan Gerasimov_, Jun 15 2009
%E A161624 Edited and extended by _Klaus Brockhaus_, Jun 15 2009