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.

A007468 Sum of next n primes.

This page as a plain text file.
%I A007468 M1846 #48 Oct 22 2023 02:03:11
%S A007468 2,8,31,88,199,384,659,1056,1601,2310,3185,4364,5693,7360,9287,11494,
%T A007468 14189,17258,20517,24526,28967,33736,38917,45230,51797,59180,66831,
%U A007468 75582,84463,95290,106255,117424,129945,143334,158167,173828,190013,207936,225707,245724
%N A007468 Sum of next n primes.
%C A007468 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 A007468 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 A007468 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A007468 T. D. Noe, <a href="/A007468/b007468.txt">Table of n, a(n) for n = 1..1000</a>
%F A007468 a(n) = prime(1 + n(n-1)/2) + ... + prime(n + n(n-1)/2), where prime(i) is i-th prime.
%e A007468 a(1)=2 because "sum of next 1 prime" is 2;
%e A007468 a(2)=8 because sum of next 2 primes is 3+5=8;
%e A007468 a(3)=31 because sum of next 3 primes is 7+11+13=31, etc.
%t A007468 a[n_] := Sum[Prime[i], {i, 1+n(n-1)/2, n+n(n-1)/2}]; Table[a[n], {n,100}]
%t A007468 (* Second program: *)
%t A007468 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 A007468 (Python)
%o A007468 from sympy import nextprime
%o A007468 def aupton(terms):
%o A007468   alst, p = [], 2
%o A007468   for n in range(1, terms+1):
%o A007468     s = 0
%o A007468     for i in range(n):
%o A007468       s += p
%o A007468       p = nextprime(p)
%o A007468     alst.append(s)
%o A007468   return alst
%o A007468 print(aupton(40)) # _Michael S. Branicky_, Feb 08 2021
%Y A007468 Cf. A078721 and A011756 for the starting and ending prime of each sum.
%K A007468 nonn,easy
%O A007468 1,1
%A A007468 _N. J. A. Sloane_, _Simon Plouffe_
%E A007468 More terms from _Zak Seidov_, Sep 21 2002