|
|
A034961
|
|
Sums of three consecutive primes.
|
|
53
|
|
|
10, 15, 23, 31, 41, 49, 59, 71, 83, 97, 109, 121, 131, 143, 159, 173, 187, 199, 211, 223, 235, 251, 269, 287, 301, 311, 319, 329, 349, 371, 395, 407, 425, 439, 457, 471, 487, 503, 519, 533, 551, 565, 581, 589, 607, 633, 661, 679, 689, 701, 713, 731, 749, 771
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(1) = 10 = 2 + 3 + 5.
a(42) = 565 = 181 + 191 + 193.
|
|
MATHEMATICA
|
|
|
PROG
|
(Sage)
BB = primes_first_n(57)
L = []
for i in range(55):
L.append(BB[i]+BB[i+1]+BB[i+2])
(Magma) [&+[ NthPrime(n+k): k in [0..2] ]: n in [1..50] ]; // Vincenzo Librandi, Apr 03 2011
(PARI) is(n)=my(p=precprime(n\3), q=nextprime(n\3+1), r=n-p-q); if(r>q, r==nextprime(q+2), r==precprime(p-1) && r) \\ Charles R Greathouse IV, Jul 05 2017
(Python)
from sympy import nextprime
from itertools import count, islice
def agen(): # generator of terms
p, q, r = 2, 3, 5
while True:
yield p + q + r
p, q, r = q, r, nextprime(r)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|