|
|
A102669
|
|
Number of digits >= 2 in decimal representation of n.
|
|
30
|
|
|
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,23
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{j=1..m+1} (floor(n/10^j + 4/5) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(2*10^j) - x^(10*10^j))/(1 - x^10^(j+1)).
General formulas for the number of digits >= d in the decimal representations of n, where 1 <= d <= 9:
a(n) = Sum_{j=1..m+1} (floor(n/10^j + (10-d)/10) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(d*10^j) - x^(10*10^j))/(1 - x^10^(j+1)). (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]>=2 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(p(n), n=0..116); # Emeric Deutsch, Feb 23 2005
|
|
MATHEMATICA
|
Table[Total@ Take[DigitCount@ n, {2, 9}], {n, 0, 104}] (* Michael De Vlieger, Aug 17 2017 *)
|
|
CROSSREFS
|
Cf. A027868, A054899, A055640, A055641, A102670 - A102685, A117804, A122840, A122841, A160093, A160094, A196563, A196564. Partial sums see A102670.
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|