The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A277186 Sum of primes within 2n-wide closed interval centered upon prime(n). 0
5, 10, 17, 26, 31, 67, 83, 83, 119, 139, 161, 228, 281, 281, 341, 408, 474, 553, 546, 635, 635, 780, 824, 1092, 954, 1008, 1008, 1139, 1197, 1336, 1621, 1687, 1650, 1823, 1854, 1854, 2238, 2634, 2507, 2587, 2450, 2673, 3223, 3223, 3403, 3403, 3591, 4054, 4054, 4331, 4535, 4535, 4828, 4444, 4666 (list; graph; refs; listen; history; text; internal format)
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.
LINKS
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
Sequence in context: A061409 A342553 A229997 * A193053 A340047 A098749
KEYWORD
nonn,easy
AUTHOR
Walter Carlini, Oct 04 2016
EXTENSIONS
More terms from Michael De Vlieger, Oct 04 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 07:28 EDT 2024. Contains 372760 sequences. (Running on oeis4.)