OFFSET
1,1
COMMENTS
a(n) is the sum of primes within the closed interval [prime(n)-n, prime(n)+n], where prime(n) is the n-th prime.
EXAMPLE
a(3) = 2 + 3 + 5 + 7 = 17; starting at prime(3) = 5, subtract 3 and add 3 to obtain the interval 2 through 8, and then add up the primes within that interval, inclusive of the endpoints of the interval.
MATHEMATICA
Table[Total@ Select[Range[Prime@ n - n, Prime@ n + n], PrimeQ], {n, 55}] (* Michael De Vlieger, Oct 04 2016 *)
PROG
(PARI) a(n) = sum(k=prime(n)-n, prime(n)+n, isprime(k)*k); \\ Michel Marcus, Nov 01 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Walter Carlini, Oct 04 2016
EXTENSIONS
More terms from Michael De Vlieger, Oct 04 2016
STATUS
approved