login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A286901
Sum of the numbers from prevprime(n) to n.
2
5, 7, 12, 11, 18, 15, 24, 34, 45, 23, 36, 27, 42, 58, 75, 35, 54, 39, 60, 82, 105, 47, 72, 98, 125, 153, 182, 59, 90, 63, 96, 130, 165, 201, 238, 75, 114, 154, 195, 83, 126, 87, 132, 178, 225, 95, 144, 194, 245, 297, 350, 107, 162, 218, 275, 333, 392, 119, 180, 123
OFFSET
3,1
COMMENTS
n is the lesser of twin primes (A001359) iff a(n+2) = A286900(n).
FORMULA
a(n) = Sum_{i=prevprime(n)..n} i.
MAPLE
A286901:=n->add(i, i=prevprime(n)..n): seq(A286901(n), n=3..100);
MATHEMATICA
Array[Total@ Range[NextPrime[#, -1], #] &, 60, 3] (* Michael De Vlieger, May 15 2017 *)
PROG
(Python)
from __future__ import division
from sympy import prevprime
def A286901(n):
m = prevprime(n)
return (m + n)*(n - m + 1)//2 # Chai Wah Wu, Feb 26 2018
CROSSREFS
Cf. A001359, A286900 (sum of the numbers from n to nextprime(n)).
Sequence in context: A333436 A086255 A306513 * A171490 A047382 A314301
KEYWORD
nonn,easy,look
AUTHOR
Wesley Ivan Hurt, May 15 2017
EXTENSIONS
a(25) inserted by Chai Wah Wu, Feb 26 2018
STATUS
approved