OFFSET
0,33
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..10000
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)
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 *)
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;
[a(n): n in [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
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, May 23 2000
STATUS
approved