cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A073837 Sum of primes p satisfying n <= p <= 2n.

Original entry on oeis.org

2, 5, 8, 12, 12, 18, 31, 24, 41, 60, 60, 72, 72, 59, 88, 119, 119, 102, 139, 120, 161, 204, 204, 228, 228, 228, 281, 281, 281, 311, 372, 341, 341, 408, 408, 479, 552, 515, 515, 594, 594, 636, 636, 593, 682, 682, 682, 635, 732, 732, 833, 936, 936, 990, 1099, 1099
Offset: 1

Views

Author

Amarnath Murthy, Aug 12 2002

Keywords

Comments

a(n) = A034387(2*n) - A034387(n-1); a(n) <= A179213(n). [Reinhard Zumkeller, Jul 05 2010]

Examples

			a(7) = 31 = 7+11+13 (sum of primes between 7 and 14).
		

Crossrefs

Cf. A073838.

Programs

  • Maple
    for n from 1 to 150 do l := 0:for j from n to 2*n do if isprime(j) then l := l+j:fi:od:a[n] := l:od:seq(a[j],j=1..150);
  • Mathematica
    Table[Total[Select[Range[n, 2 n], PrimeQ]], {n, 56}] (* Jayanta Basu, Aug 12 2013 *)
  • PARI
    a(n)=sum(i=n,2*n,i*isprime(i))

Extensions

More terms from Sascha Kurz and Benoit Cloitre, Aug 14 2002