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.

A022094 Sum of first prime(n) primes.

Original entry on oeis.org

5, 10, 28, 58, 160, 238, 440, 568, 874, 1480, 1720, 2584, 3266, 3638, 4438, 5830, 7418, 7982, 9854, 11240, 11966, 14288, 15968, 18650, 22548, 24680, 25800, 28104, 29296, 31734, 41022, 43940, 48494
Offset: 1

Views

Author

Detlef Pauly (dettodet(AT)yahoo.de)

Keywords

Crossrefs

Cf. A000040, A007504 (sum of first n primes).

Programs

  • Maple
    [ seq(sum(ithprime(k),k=1..ithprime(i)),i=1..100) ];
    # Alternative:
    Primes:= select(isprime, [2,seq(i,i=3..10^4,2)]):
    L:= ListTools:-PartialSums(Primes):
    seq(L[Primes[i]],i=1..numtheory:-pi(nops(Primes))); # Robert Israel, Jan 13 2019
  • Mathematica
    a[n_]:=Sum[Prime[k], {k,1,Prime[n]}]; Array[a, 50] (* Stefano Spezia, Jan 14 2019 *)

Formula

a(n) = A007504(A000040(n)). - Robert Israel, Jan 13 2019