Search: a078721 -id:a078721
|
|
A007468
|
|
Sum of next n primes.
(Formerly M1846)
|
|
+10
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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).
|
|
LINKS
|
|
|
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
|
|
CROSSREFS
|
Cf. A078721 and A011756 for the starting and ending prime of each sum.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A011756
|
|
a(n) = prime(n*(n+1)/2).
|
|
+10
10
|
|
|
2, 5, 13, 29, 47, 73, 107, 151, 197, 257, 317, 397, 467, 571, 659, 769, 883, 1019, 1151, 1291, 1453, 1607, 1783, 1987, 2153, 2371, 2593, 2791, 3037, 3307, 3541, 3797, 4073, 4357, 4657, 4973, 5303, 5641, 5939, 6301, 6679, 7019, 7477
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
There are n distinct successive primes p (not appearing in the sequence) such that a(n) < p < a(n+1). - David James Sycamore, Jul 22 2018
|
|
LINKS
|
|
|
FORMULA
|
a(n) is asymptotic to (n*(n+1)/2) * log(n*(n+1)/2) = (n*(n+1)/2) * (log(n)+log(n+1)-log(2)) ~ (n^2 + n)*(2 log n)/2 ~ (n^2 + n)*(log n). - Jonathan Vos Post, Mar 12 2006
|
|
MAPLE
|
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a011756 n = a011756_list !! (n-1)
a011756_list = map a000040 $ tail a000217_list
|
|
CROSSREFS
|
Primes in leading diagonal of triangle in A078721.
|
|
KEYWORD
|
nonn,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A078722
|
|
a(n) = prime(n*(n+1)/2+2).
|
|
+10
3
|
|
|
3, 5, 11, 19, 37, 59, 83, 113, 163, 211, 269, 337, 409, 487, 587, 673, 787, 907, 1031, 1163, 1301, 1471, 1613, 1789, 1997, 2179, 2381, 2617, 2801, 3049, 3319, 3557, 3821, 4091, 4373, 4673, 4993, 5323, 5651, 5981, 6317, 6691, 7039, 7487, 7853, 8269, 8693, 9109
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
The sum of the reciprocals of the terms appears to converge.
|
|
LINKS
|
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) triprimes(n) = { sr = 0; for(j=0, n, x = j*(j+1)/2+2; z = prime(x); sr+=1.0/z; print1(z, ", "); ); print(); /* print(sr); */}
|
|
CROSSREFS
|
Apart from initial term, primes in second diagonal of triangle in A078721.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A161463
|
|
Sum of all primes from n-th prime to (2*n-1)-th prime.
|
|
+10
3
|
|
|
2, 8, 23, 48, 83, 132, 197, 270, 363, 468, 583, 714, 863, 1026, 1199, 1392, 1607, 1836, 2083, 2346, 2627, 2926, 3237, 3564, 3925, 4290, 4669, 5074, 5499, 5938, 6389, 6862, 7355, 7866, 8411, 8964, 9539, 10134, 10743, 11374, 12029, 12702, 13393, 14094
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Sum of next n primes starting with the n-th prime.
For sum of next n primes starting with the (T(n) + 1)-th prime, or A000124(n)-th prime = A078721(n), {T(n)=A000217(n)}, see A007468(n). (End)
74 of the first 1000 terms of this sequence are primes and each occurs at an odd index. - Harvey P. Dale, Jan 12 2014
|
|
LINKS
|
|
|
EXAMPLE
|
Sum of 3rd prime to 5th prime = 5+7+11, hence a(3) = 23; sum of 4th prime to 7th prime = 7+11+13+17, hence a(4) = 48.
|
|
MATHEMATICA
|
nn=100; With[{prs=Prime[Range[nn]]}, Table[Total[Take[prs, {n, 2n-1}]], {n, Floor[(nn+1)/2]}]] (* Harvey P. Dale, Jan 12 2014 *)
|
|
PROG
|
(Magma) [ &+[ NthPrime(k): k in [n..2*n-1] ]: n in [1..44] ]; // Klaus Brockhaus, Jun 12 2009
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A078724
|
|
a(n) = prime(n*(n+1)/2+3).
|
|
+10
2
|
|
|
5, 7, 13, 23, 41, 61, 89, 127, 167, 223, 271, 347, 419, 491, 593, 677, 797, 911, 1033, 1171, 1303, 1481, 1619, 1801, 1999, 2203, 2383, 2621, 2803, 3061, 3323, 3559, 3823, 4093, 4391, 4679, 4999, 5333, 5653, 5987, 6323, 6701, 7043, 7489, 7867, 8273, 8699, 9127
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
The sum of the reciprocals of the terms appears to converge.
|
|
LINKS
|
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) triprimes(n) = { sr = 0; for(j=1, n, x = j*(j+1)/2+2; z = prime(x); sr+=1.0/z; print1(z" "); ); print(); print(sr); }
|
|
CROSSREFS
|
Cf. A000040, A078721 (after 7, primes in third diagonal of triangle in comment).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A078725
|
|
a(n) = prime(n*(n+1)/2+4).
|
|
+10
2
|
|
|
7, 11, 17, 29, 43, 67, 97, 131, 173, 227, 277, 349, 421, 499, 599, 683, 809, 919, 1039, 1181, 1307, 1483, 1621, 1811, 2003, 2207, 2389, 2633, 2819, 3067, 3329, 3571, 3833, 4099, 4397, 4691, 5003, 5347, 5657, 6007, 6329, 6703, 7057, 7499, 7873, 8287, 8707, 9133
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
More generally one may consider the sequence S(n, m) = prime(n*(n+1)/2+m+1), for m=1, 2, 3...
|
|
LINKS
|
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) triprimes(n, m) = { sr = 0; for(j=m, n, x = j*(j+1)/2+m+1; z = prime(x); sr+=1.0/z; print1(z" "); ); print(); print(sr); }
(Magma) [NthPrime(n*(n+1) div 2 + 4): n in [0..50]]; // Vincenzo Librandi, Jun 08 2016
|
|
CROSSREFS
|
Apart from initial terms, primes in fourth diagonal of triangle in A078721.
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A078723
|
|
a(n) = prime(n*(n+1)/2 + n).
|
|
+10
1
|
|
|
3, 11, 23, 43, 71, 103, 149, 193, 251, 313, 389, 463, 569, 653, 761, 881, 1013, 1129, 1289, 1451, 1601, 1777, 1979, 2143, 2357, 2591, 2789, 3023, 3301, 3539, 3793, 4057, 4349, 4651, 4969, 5297, 5639, 5927, 6299, 6673, 7013, 7459, 7823, 8237, 8677, 9067, 9479
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The sum of the reciprocals appears to converge.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) triprimes(n) = { sr = 0; for(j=1, n, x = j*(j+1)/2 +j; z = prime(x); sr+=1.0/z; print1(z" "); ); print(); print(sr); }
|
|
CROSSREFS
|
Primes in second diagonal from right in triangle in A078721.
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A078746
|
|
a(n) = prime(2*n*(n+1)+1).
|
|
+10
1
|
|
|
2, 11, 41, 97, 179, 283, 439, 617, 829, 1087, 1381, 1697, 2081, 2467, 2909, 3433, 3929, 4517, 5119, 5801, 6481, 7237, 8059, 8863, 9739, 10663, 11701, 12659, 13729, 14867, 15973, 17239, 18443, 19843, 21179, 22549, 23971, 25541, 27043, 28657
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Central elements of odd-length rows of the triangle of primes:
. 2,
. 3, 5,
. 7, 11, 13,
. 17, 19, 23, 29,
. 31, 37, 41, 43, 47,
. 53, 59, 61, 67, 71, 73, etc.
The sum of the reciprocals of the terms converges by comparison with sum_{n>=1} 1/n^2, since 1/a(n) < 1/(2n(n+1)+1) < 1/n^2. The limit is about 0.6471.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) triprimes(n) = { sr = 0; for(j= 1, n, x = 2*j*(j-1) + 1; z = prime(x); sr+=1.0/z; print1(z" "); ); print(); print(sr); }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A344482
|
|
Primes, each occurring twice, such that a(C(n)) = a(4*n-C(n)) = prime(n), where C is the Connell sequence (A001614).
|
|
+10
1
|
|
|
2, 3, 2, 5, 7, 3, 11, 5, 13, 17, 7, 19, 11, 23, 13, 29, 31, 17, 37, 19, 41, 23, 43, 29, 47, 53, 31, 59, 37, 61, 41, 67, 43, 71, 47, 73, 79, 53, 83, 59, 89, 61, 97, 67, 101, 71, 103, 73, 107, 109, 79, 113, 83, 127, 89, 131, 97, 137, 101, 139, 103, 149, 107, 151
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Terms can be arranged in an irregular triangle read by rows in which row r is a permutation P of the primes in the interval [prime(s), prime(s+rlen-1)], where s = 1+(r-1)*(r-2)/2, rlen = 2*r-1 = A005408(r-1) and r >= 1 (see example).
P is the alternating (first term > second term < third term > fourth term < ...) permutation m -> 1, 1 -> 2, m+1 -> 3, 2 -> 4, m+2 -> 5, 3 -> 6, ..., rlen -> rlen where m = ceiling(rlen/2).
The triangle has the following properties.
Row lengths are the positive odd numbers (A005408).
Each even column is equal to the column preceding it.
Row records (A011756) are in the right border.
Indices of row records are the positive terms of A000290.
Each row r contains r terms that are duplicated in the next row.
In each row, the sum of terms which are not already listed in the sequence give A007468.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
Written as an irregular triangle the sequence begins:
2;
3, 2, 5;
7, 3, 11, 5, 13;
17, 7, 19, 11, 23, 13, 29;
31, 17, 37, 19, 41, 23, 43, 29, 47;
53, 31, 59, 37, 61, 41, 67, 43, 71, 47, 73;
79, 53, 83, 59, 89, 61, 97, 67, 101, 71, 103, 73, 107;
...
The triangle can be arranged as shown below so that, in every row, each odd position term is equal to the term immediately below it.
2
3 2 5
7 3 11 5 13
17 7 19 11 23 13 29
31 17 37 19 41 23 43 29 47
...
|
|
MATHEMATICA
|
nterms=64; a=ConstantArray[0, nterms]; For[n=1; p=1, n<=nterms, n++, If[a[[n]]==0, a[[n]]=Prime[p]; If[(d=4p-n)<=nterms, a[[d]]=a[[n]]]; p++]]; a
(* Second program, triangle rows *)
nrows=8; Table[rlen=2r-1; Permute[Prime[Range[s=1+(r-1)(r-2)/2, s+rlen-1]], Join[Range[2, rlen, 2], Range[1, rlen, 2]]], {r, nrows}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A125130
|
|
Successive sums of consecutive primes that form a triangular grid.
|
|
+10
0
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
These sums, for a given n, can be estimated by the following formula. sum est = x^2/(2*log(x)-1) Where x = prime(n*(n-1)/2+n) For example, n = 10000 x = 982555543 sum est = 23889718028585418 sum act = 23904330028803899 Relative Error = 0.00061127001680771897
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
PROG
|
(PARI) g2(n) = for(j=1, n, y=g(j*(j+1)/2); print1(y", ")) g(n) = local(s=0, x); for(x=1, n, s+=prime(x)); s
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.010 seconds
|