|
|
A054898
|
|
a(n) = Sum_{k>0} floor(n/9^k).
|
|
4
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,19
|
|
COMMENTS
|
Different from the highest power of 9 dividing n!, A090618.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = floor(n/9) + floor(n/81) + floor(n/729) + floor(n/6561) + ....
Recurrence:
a(n) = floor(n/9) + a(floor(n/9));
a(9*n) = n + a(n);
a(n*9^m) = n*(9^m-1)/8 + a(n).
a(k*9^m) = k*(9^m-1)/8, for 0<=k<9, m>=0.
Asymptotic behavior:
a(n) = n/8 + O(log(n)),
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/8; equality holds for powers of 9.
a(n) >= (n-8)/8 - floor(log_9(n)); equality holds for n=9^m-1, m>0.
lim inf (n/8 - a(n)) =1/8, for n-->oo.
lim sup (n/8 - log_9(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_9(n)) = 0, for n-->oo.
G.f.: g(x) = sum{k>0, x^(9^k)/(1-x^(9^k))}/(1-x). (End)
|
|
EXAMPLE
|
a(100)=12.
a(10^3)=124.
a(10^4)=1248.
a(10^5)=12498.
a(10^6)=124996.
a(10^7)=1249997.
a(10^8)=12499996.
a(10^9)=124999997.
|
|
MATHEMATICA
|
Table[t = 0; p = 9; While[s = Floor[n/p]; t = t + s; s > 0, p *= 9]; t, {n, 0, 100} ]
Table[Sum[Floor[n/9^k], {k, n}], {n, 0, 100}] (* Harvey P. Dale, Jul 10 2024 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|