login
A102671
Number of digits >= 3 in decimal representation of n.
2
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 1, 1
OFFSET
0,34
COMMENTS
a(n) = 0 iff n is in A007089 (numbers in base 3). - Bernard Schott, Nov 20 2022
LINKS
FORMULA
From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = Sum_{j=1..m+1} (floor((n/10^j) + 7/10) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(3*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]>=3 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(p(n), n=0..116); # Emeric Deutsch, Feb 23 2005
MATHEMATICA
Table[Count[IntegerDigits[n], _?(#>2&)], {n, 0, 110}] (* Harvey P. Dale, Mar 07 2012 *)
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Feb 03 2005
EXTENSIONS
More terms from Emeric Deutsch, Feb 23 2005
STATUS
approved