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.

A094820 Partial sums of A038548.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 11, 13, 15, 16, 19, 20, 22, 24, 27, 28, 31, 32, 35, 37, 39, 40, 44, 46, 48, 50, 53, 54, 58, 59, 62, 64, 66, 68, 73, 74, 76, 78, 82, 83, 87, 88, 91, 94, 96, 97, 102, 104, 107, 109, 112, 113, 117, 119, 123, 125, 127, 128, 134, 135, 137, 140, 144, 146, 150
Offset: 1

Views

Author

Vladeta Jovovic, Jun 12 2004

Keywords

Comments

a(n) = number of pairs (c,d) of integers such that 0 < c <= d and c*d <= n. - Clark Kimberling, Jun 18 2011
Equivalently, the number of representations of n in the form x + y*z, where x, y, and z are positive integers and y <= z. - John W. Layman, Feb 21 2012

Crossrefs

Programs

  • Maple
    ListTools:-PartialSums([seq(ceil(numtheory:-tau(n)/2), n=1..100)]); # Robert Israel, Feb 24 2016
  • Mathematica
    f[n_, k_] := Floor[n/k] - Floor[(n - 1)/k]
    g[n_, k_] := If[k^2 <= n, f[n, k], 0]
    Table[Sum[f[n, k], {k, 1, n}], {n, 1, 100}] (* A000005 *)
    t = Table[Sum[g[n, k], {k, 1, n}], {n, 1, 100}]
    (* A038548 *)
    a[n_] := Sum[t[[i]], {i, 1, n}]
    Table[a[n], {n, 1, 100}]  (* A094820 *)
    (* Clark Kimberling, Jun 18 2011 *)
    Table[Sum[Boole[d <= Sqrt[n]], {d, Divisors[n]}], {n, 1, 66}] // Accumulate (* Jean-François Alcover, Dec 13 2012 *)
  • PARI
    a(n) = sum(k=1, n, ceil(numdiv(k)/2)); \\ Michel Marcus, Feb 24 2016
    
  • Python
    from math import isqrt
    def A094820(n): return ((s:=isqrt(n))*(1-s)>>1)+sum(n//k for k in range(1,s+1)) # Chai Wah Wu, Oct 23 2023
  • Ruby
    def a(n)
        (1..Math.sqrt(n)).inject(0) { |accum, i| accum + 1 + (n/i).to_i - i }
      end # Peter Kagey, Feb 24 2016
    

Formula

G.f.: (1/(1 - x))*Sum_{k>=1} x^(k^2)/(1 - x^k). - Ilya Gutkovskiy, Apr 13 2017
a(n) ~ (log(n) + 2*gamma - 1)*n/2 + sqrt(n)/2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Aug 19 2019
a(n) = (A006218(n) + A000196(n))/2. - Ridouane Oudra, Nov 25 2022
a(n) = A211264(n) + A000196(n). - Ridouane Oudra, Sep 13 2024