OFFSET
3,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 3..10000
FORMULA
a(n) = Sum_{i=prevprime(n)..n} i.
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
KEYWORD
AUTHOR
Wesley Ivan Hurt, May 15 2017
EXTENSIONS
a(25) inserted by Chai Wah Wu, Feb 26 2018
STATUS
approved