A125130 Successive sums of consecutive primes that form a triangular grid.
2, 10, 41, 129, 328, 712, 1371, 2427, 4028, 6338, 9523, 13887, 19580, 26940, 36227, 47721, 61910, 79168, 99685, 124211, 153178, 186914, 225831, 271061, 322858, 382038, 448869, 524451, 608914, 704204, 810459, 927883, 1057828, 1201162
Offset: 1
Examples
The consecutive primes 2, 3, 5, 7, 11, 13 form the triangular grid 2 3 5 7 11 13 These consecutive primes add up to 41, the third entry in the table.
Links
- Paolo Xausa, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
With[{nmax = 50}, Accumulate[Prime[Range[PolygonalNumber[nmax]]]][[PolygonalNumber[Range[nmax]]]]] (* Paolo Xausa, May 15 2025 *)
-
PARI
a(n) = sum(x=1, n*(n+1)/2, prime(x))
Formula
a(n) ~ x^2/(2*log(x)-1), where x = prime(n*(n-1)/2+n). For n = 10000, the relative error is about 0.06%.