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.

Showing 1-1 of 1 results.

A332687 a(n) = Sum_{k=1..n} ceiling(n/prime(k)).

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 13, 15, 17, 19, 22, 24, 27, 29, 32, 35, 37, 39, 42, 44, 47, 50, 53, 55, 58, 60, 63, 65, 68, 70, 74, 76, 78, 81, 84, 87, 90, 92, 95, 98, 101, 103, 107, 109, 112, 115, 118, 120, 123, 125, 128, 131, 134, 136, 139, 142, 145, 148, 151, 153
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 19 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Ceiling[n/Prime[k]], {k, 1, n}], {n, 1, 60}]
    Table[n + Sum[PrimeNu[k], {k, 1, n - 1}], {n, 1, 60}]
    nmax = 60; CoefficientList[Series[x/(1 - x)^2 + (x/(1 - x)) Sum[x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    With[{nmax = 100}, Range[nmax] + Join[{0}, Accumulate[Table[PrimeNu[k], {k, 1, nmax - 1}]]]] (* Amiram Eldar, Sep 21 2024 *)
  • PARI
    a(n) = sum(k=1, n, ceil(n/prime(k))); \\ Michel Marcus, Feb 21 2020
    
  • PARI
    lista(nmax) = my(s = 1); for(n = 2, nmax, print1(s, ", "); s += omega(n-1) + 1); \\ Amiram Eldar, Sep 21 2024

Formula

G.f.: x/(1 - x)^2 + (x/(1 - x)) * Sum_{k>=1} x^prime(k) / (1 - x^prime(k)).
a(n) = n + Sum_{k=1..n-1} omega(k), where omega = A001221.
a(n) = n - omega(n) + Sum_{k=1..n} pi(floor(n/k)), where pi = A000720.
a(n) = n + A013939(n-1) for n >= 2. - Amiram Eldar, Sep 21 2024
Showing 1-1 of 1 results.