%I M1846 #48 Oct 22 2023 02:03:11
%S 2,8,31,88,199,384,659,1056,1601,2310,3185,4364,5693,7360,9287,11494,
%T 14189,17258,20517,24526,28967,33736,38917,45230,51797,59180,66831,
%U 75582,84463,95290,106255,117424,129945,143334,158167,173828,190013,207936,225707,245724
%N Sum of next n primes.
%C If we arrange the prime numbers into a triangle, with 2 at the top, 3 and 5 in the second row, 7, 11 and 13 in the third row, and so on and so forth, this sequence gives the row sums. - _Alonso del Arte_, Nov 08 2011
%C In the first 20000 terms, the only perfect square > 1 is 207936 (n=38). Is it the only one? Is there some proof/conjecture? - _Carlos Eduardo Olivieri_, Mar 09 2015
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A007468/b007468.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = prime(1 + n(n-1)/2) + ... + prime(n + n(n-1)/2), where prime(i) is i-th prime.
%e a(1)=2 because "sum of next 1 prime" is 2;
%e a(2)=8 because sum of next 2 primes is 3+5=8;
%e a(3)=31 because sum of next 3 primes is 7+11+13=31, etc.
%t a[n_] := Sum[Prime[i], {i, 1+n(n-1)/2, n+n(n-1)/2}]; Table[a[n], {n,100}]
%t (* Second program: *)
%t With[{nn=40},Total/@TakeList[Prime[Range[(nn(nn+1))/2]],Range[nn]]] (* Requires Mathematica version 11 or later *) (* _Harvey P. Dale_, Jan 15 2020 *)
%o (Python)
%o from sympy import nextprime
%o def aupton(terms):
%o alst, p = [], 2
%o for n in range(1, terms+1):
%o s = 0
%o for i in range(n):
%o s += p
%o p = nextprime(p)
%o alst.append(s)
%o return alst
%o print(aupton(40)) # _Michael S. Branicky_, Feb 08 2021
%Y Cf. A078721 and A011756 for the starting and ending prime of each sum.
%K nonn,easy
%O 1,1
%A _N. J. A. Sloane_, _Simon Plouffe_
%E More terms from _Zak Seidov_, Sep 21 2002