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.

A054900 a(n) = Sum_{j >= 1} floor(n/16^j).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 0

Views

Author

Henry Bottomley, May 23 2000

Keywords

Crossrefs

Cf. A011371 and A054861 for analogs involving powers of 2 and 3.

Programs

  • Magma
    m:=16;
    function a(n) // a = A054900, m = 16
      if n eq 0 then return 0;
      else return a(Floor(n/m)) + Floor(n/m);
      end if; end function;
    [a(n): n in [0..127]]; // G. C. Greubel, Apr 28 2023
    
  • Mathematica
    a[n_, m_]:= If[n==0, 0, a[Floor[n/m], m] +Floor[n/m]];
    Table[a[n, 16], {n,0,127}] (* G. C. Greubel, Apr 28 2023 *)
  • SageMath
    m=16 # a = A054900
    def a(n): return 0 if (n==0) else a(n//m) + (n//m)
    [a(n) for n in range(128)] # G. C. Greubel, Apr 28 2023

Formula

a(n) = (n - A053836(n))/15.
From Hieronymus Fischer, Aug 14 2007: (Start)
Recurrence:
a(n) = a(floor(n/16)) + floor(n/16).
a(16*n) = a(n) + n.
a(n*16^m) = a(n) + n*(16^m - 1)/15.
a(k*16^m) = k*(16^m - 1)/15, for 0 <= k < 16, m>=0.
Asymptotic behavior:
a(n) = n/15 + O(log(n)).
a(n+1) - a(n) = O(log(n)) (this follows from the inequalities below).
a(n) <= (n-1)/15; equality holds for powers of 16.
a(n) >= (n-15)/15 - floor(log_16(n)); equality holds for n = 16^m - 1, m > 0.
Limits:
lim inf (n/15 - a(n)) = 1/15, for n --> oo.
lim sup (n/15 - log_16(n) - a(n)) = 0, for n --> oo.
lim sup (a(n+1) - a(n) - log_16(n)) = 0, for n --> oo.
Series:
G.f.: (1/(1-x))*Sum_{k > 0} x^(16^k)/(1-x^(16^k)). (End)