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!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
n is the lesser of twin primes (A001359) iff a(n+2) = A286900(n).
LINKS
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

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 April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)