OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
C. Caldwell, List of small primes.
FORMULA
a(n) = A034961(3n-2). - R. J. Mathar, Apr 20 2009, Jun 17 2009
EXAMPLE
a(1) = 10 = 2 + 3 + 5 = prime(1) + prime(2) + prime(3).
a(2) = 31 = 7 + 11 + 13 = prime(4) + prime(5) + prime(6).
a(3) = 59 = 17 + 19 + 23 = prime(7) + prime(8) + prime(9).
MATHEMATICA
Total/@Partition[Prime[Range[150]], 3] (* Harvey P. Dale, May 25 2011 *)
PROG
(Magma) [&+[NthPrime(n+k): k in [0..2]]: n in [1..1000 by 3]]; // Vincenzo Librandi, Apr 23 2011
(Python)
from sympy import prime, nextprime
def a(n):
p = prime(3*n - 2); q = nextprime(p); r = nextprime(q)
return p + q + r
print([a(n) for n in range(1, 49)]) # Michael S. Branicky, Oct 31 2021
(SageMath)
def A100500(n): return sum(nth_prime(3*n-j) for j in range(3))
[A100500(n) for n in range(1, 61)] # G. C. Greubel, Apr 03 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Jun Mizuki (suzuki32(AT)sanken.osaka-u.ac.jp), Nov 23 2004
STATUS
approved