|
|
A054900
|
|
a(n) = Sum_{j >= 1} floor(n/16^j).
|
|
3
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,33
|
|
LINKS
|
|
|
FORMULA
|
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)
|
|
MATHEMATICA
|
a[n_, m_]:= If[n==0, 0, a[Floor[n/m], m] +Floor[n/m]];
|
|
PROG
|
(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;
(SageMath)
def a(n): return 0 if (n==0) else a(n//m) + (n//m)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|