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.

A092494 a(n) = Sum_{p prime and p<=n} ceiling(n/p).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 10, 11, 12, 13, 16, 17, 20, 21, 23, 25, 27, 28, 31, 32, 34, 36, 39, 40, 42, 43, 45, 46, 49, 50, 54, 55, 56, 58, 60, 62, 65, 66, 68, 70, 73, 74, 78, 79, 81, 83, 86, 87, 89, 90, 92, 94, 97, 98, 100, 102, 104, 106, 109, 110, 114, 115, 117, 119, 120, 122
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 05 2004

Keywords

Comments

a(n) = A013939(n) + A048865(n).

Crossrefs

Cf. A006590.

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    V:= Vector(N):
    p:= 0:
    do
      p:= nextprime(p);
      if p > N then break fi;
      V[p]:= V[p]+1;
      for k from 2 to floor(N/p) do
        V[(k-1)*p+1 .. k*p]:= V[(k-1)*p+1 .. k*p] +~ k;
      od;
      if (k-1)*p+1<=N then V[(k-1)*p+1..N]:= V[(k-1)*p+1..N]+~ k fi
    od:
    convert(V,list); # Robert Israel, Jun 19 2019
  • PARI
    a(n) = sum(k=1, n, isprime(k)*ceil(n/k)); \\ Michel Marcus, Jun 19 2019