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.

A079725 Sum of composite numbers less than n-th prime.

Original entry on oeis.org

0, 0, 4, 10, 37, 49, 94, 112, 175, 305, 335, 505, 622, 664, 799, 1049, 1329, 1389, 1709, 1916, 1988, 2368, 2611, 3041, 3692, 3989, 4091, 4406, 4514, 4847, 6407, 6794, 7464, 7602, 8898, 9048, 9818, 10618, 11113, 11963, 12843, 13023, 14697, 14889, 15474
Offset: 1

Views

Author

N. J. A. Sloane, Feb 18 2003

Keywords

Examples

			Prime(6) = 13, so a(6) = 4 + 6 + 8 + 9 + 1 0 + 12 = 49 = 13*14/2 - 13 - 11 - 7 - 5 - 3 - 2 - 1.
		

Crossrefs

Equals A000217(Prime_n) - A007504(n) - 1 = A034953 - A007504 - A000012.
Partial sums of A054265.

Programs

  • Maple
    with(numtheory): A079725 := proc(n) local i:
    RETURN(ithprime(n)*(ithprime(n)+1)/2 add(ithprime(i),i=1..n)-1):
    end;
  • Mathematica
    a[n_] := Block[{p = Prime[n], k}, k = p(p + 1)/2 - 1 - Sum[Prime[i], {i, 1, n}]]; Table[ a[n], {n, 1, 45}]

Formula

a(n) = prime(n)*(prime(n)+1)/2 - sum_{1..n} prime(k) - 1.
Asymptotic expression: a(n) ~ n^2 * log(n)^2 / 2.

Extensions

Edited and extended by Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Robert G. Wilson v and T. D. Noe, Feb 18 2003