|
|
A102675
|
|
Number of digits >= 5 in decimal representation of n.
|
|
2
|
|
|
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,56
|
|
COMMENTS
|
|
|
REFERENCES
|
Curtis Cooper, Number of large digits in the positive integers not exceeding n, Abstracts Amer. Math. Soc., 25 (No. 1, 2004), p. 38, Abstract 993-11-964.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{j=1..m+1} (floor(n/10^j + 1/2) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(5*10^j) - x^(10*10^j))/(1 - x^10^(j+1)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} x^(5*10^j)/(1 + x^(5*10^j)). (End)
|
|
MAPLE
|
p:=proc(n) local b, ct, j: b:=convert(n, base, 10): ct:=0: for j from 1 to nops(b) do if b[j]>=5 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(p(n), n=0..120); # Emeric Deutsch, Feb 23 2005
|
|
MATHEMATICA
|
Table[Count[IntegerDigits[n], _?(#>4&)], {n, 0, 120}] (* Harvey P. Dale, Nov 13 2013 *)
|
|
CROSSREFS
|
Cf. A007091 (indices of 0's), A027868, A054899, A055640, A055641, A102669-A102685, A117804, A122840, A122841, A160093, A160094, A196563, A196564, A102676 (partial sums).
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|