login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A007468
Sum of next n primes.
(Formerly M1846)
19
2, 8, 31, 88, 199, 384, 659, 1056, 1601, 2310, 3185, 4364, 5693, 7360, 9287, 11494, 14189, 17258, 20517, 24526, 28967, 33736, 38917, 45230, 51797, 59180, 66831, 75582, 84463, 95290, 106255, 117424, 129945, 143334, 158167, 173828, 190013, 207936, 225707, 245724
OFFSET
1,1
COMMENTS
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
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
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(n) = prime(1 + n(n-1)/2) + ... + prime(n + n(n-1)/2), where prime(i) is i-th prime.
EXAMPLE
a(1)=2 because "sum of next 1 prime" is 2;
a(2)=8 because sum of next 2 primes is 3+5=8;
a(3)=31 because sum of next 3 primes is 7+11+13=31, etc.
MATHEMATICA
a[n_] := Sum[Prime[i], {i, 1+n(n-1)/2, n+n(n-1)/2}]; Table[a[n], {n, 100}]
(* Second program: *)
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 *)
PROG
(Python)
from sympy import nextprime
def aupton(terms):
alst, p = [], 2
for n in range(1, terms+1):
s = 0
for i in range(n):
s += p
p = nextprime(p)
alst.append(s)
return alst
print(aupton(40)) # Michael S. Branicky, Feb 08 2021
CROSSREFS
Cf. A078721 and A011756 for the starting and ending prime of each sum.
Sequence in context: A359117 A294264 A367037 * A280156 A054137 A343414
KEYWORD
nonn,easy
EXTENSIONS
More terms from Zak Seidov, Sep 21 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 04:50 EDT 2024. Contains 376097 sequences. (Running on oeis4.)