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.

A272206 Rounded barycenter of first n primes defined as a(n) = round(sum_{i=1..n}(i*prime(i)) / sum_{i=1..n}prime(i)).

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 25, 26, 26, 27, 28, 28, 29, 30, 30, 31, 32, 32, 33, 34, 35, 35, 36, 37, 37, 38, 39, 39, 40, 41, 41, 42, 43, 43, 44, 45
Offset: 1

Views

Author

Andres Cicuttin, May 21 2016

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[i*Prime[i], {i, 1, n}]/Sum[Prime[i], {i, 1, n}];
    Table[a[n] // Round, {n, 1, 64}];
  • PARI
    a(n) = round(sum(k=1, n, k*prime(k))/ sum(k=1, n, prime(k))); \\ Michel Marcus, May 22 2016

Formula

a(n) = round(sum_{i=1..n}(i*prime(i)) / sum_{i=1..n}prime(i)).
a(n) = round(A014285(n)/A007504(n)).