login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A286900
Sum of the numbers from n to nextprime(n).
3
3, 5, 12, 9, 18, 13, 45, 38, 30, 21, 36, 25, 75, 62, 48, 33, 54, 37, 105, 86, 66, 45, 182, 159, 135, 110, 84, 57, 90, 61, 238, 207, 175, 142, 108, 73, 195, 158, 120, 81, 126, 85, 225, 182, 138, 93, 350, 303, 255, 206, 156, 105, 392, 339, 285, 230, 174, 117
OFFSET
1,1
COMMENTS
nextprime(n) refers to A151800(n); least prime > n. - David A. Corneth, May 19 2017
n is the lesser of twin primes (A001359) iff a(n) = A286901(n+2).
FORMULA
a(n) = Sum_{i=n..nextprime(n)} i.
MAPLE
A286900:=n->add(i, i=n..nextprime(n)): seq(A286900(n), n=1..100);
MATHEMATICA
Table[Sum[i, {i, n, NextPrime[n]}], {n, 100}]
PROG
(Python)
from __future__ import division
from sympy import nextprime
def A286900(n):
m = nextprime(n)
return (m + n)*(m - n + 1)//2 # Chai Wah Wu, Feb 26 2018
CROSSREFS
Cf. A001359, A151800, A286901 (sum of the numbers from prevprime(n) to n).
Sequence in context: A279728 A087122 A358336 * A361111 A361322 A037221
KEYWORD
nonn,easy,look
AUTHOR
Wesley Ivan Hurt, May 15 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | 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 September 24 12:17 EDT 2024. Contains 376196 sequences. (Running on oeis4.)