A341700 Sum of the primes p satisfying n < p <= 2n.
2, 3, 5, 12, 7, 18, 24, 24, 41, 60, 49, 72, 59, 59, 88, 119, 102, 102, 120, 120, 161, 204, 181, 228, 228, 228, 281, 281, 252, 311, 341, 341, 341, 408, 408, 479, 515, 515, 515, 594, 553, 636, 593, 593, 682, 682, 635, 635, 732, 732, 833, 936, 883, 990, 1099, 1099
Offset: 1
Keywords
Examples
a(7) = 24 = 11+13 (sum of primes larger than 7 and less than or equal to 14).
Programs
-
Mathematica
Array[Total@ Select[Range[# + 1, 2 #], PrimeQ] &, 56] (* Michael De Vlieger, Feb 17 2021 *)
-
Python
from sympy import nextprime def A341700(n): s, m = 0, nextprime(n) while m <= 2*n: s += m m = nextprime(m) return s
Comments