# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a102674 Showing 1-1 of 1 %I A102674 #23 Nov 16 2022 17:26:57 %S A102674 0,0,0,0,1,2,3,4,5,6,6,6,6,6,7,8,9,10,11,12,12,12,12,12,13,14,15,16, %T A102674 17,18,18,18,18,18,19,20,21,22,23,24,25,26,27,28,30,32,34,36,38,40,41, %U A102674 42,43,44,46,48,50,52,54,56,57,58,59,60,62,64,66,68,70,72,73,74,75,76,78 %N A102674 Number of digits >= 4 in the decimal representations of all integers from 0 to n. %C A102674 The total number of digits >= 4 occurring in all the numbers 0, 1, 2, ... n (in decimal representation). - _Hieronymus Fischer_, Jun 10 2012 %H A102674 Hieronymus Fischer, Table of n, a(n) for n = 0..10000 %F A102674 From _Hieronymus Fischer_, Jun 10 2012: (Start) %F A102674 a(n) = (1/2)*Sum_{j=1..m+1} (floor(n/10^j + 3/5)*(2n + 2 + (1/5 - floor(n/10^j + 3/5))*10^j) - floor(n/10^j)*(2n + 2 - (1 + floor(n/10^j)) * 10^j)), where m = floor(log_10(n)). %F A102674 a(n) = (n+1)*A102673(n) + (1/2)*Sum_{j=1..m+1} (((1/5)*floor(n/10^j + 3/5) + floor(n/10^j))*10^j - (floor(n/10^j + 3/5)^2 - floor(n/10^j)^2)*10^j), where m = floor(log_10(n)). %F A102674 a(10^m - 1) = 6*m*10^(m-1). %F A102674 (This is the total number of digits >= 4 occurring in all the numbers with <= m places.) %F A102674 G.f.: g(x) = (1/(1-x)^2)*Sum_{j>=0} (x^(4*10^j) - x^(10*10^j))/(1 - x^10^(j+1)). (End) %p A102674 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]>=4 then ct:=ct+1 else ct:=ct fi od: ct: end:seq(add(p(i),i=0..n),n=0..90); # _Emeric Deutsch_, Feb 22 2005 %t A102674 Accumulate[Table[Total[Drop[Most[DigitCount[n]],3]],{n,0,80}]] (* _Harvey P. Dale_, Nov 27 2015 *) %Y A102674 Partial sums of A102673. %Y A102674 Cf. A027868, A054899, A055640, A055641, A102669-A102685, A117804, A122840, A122841, A160093, A160094, A196563, A196564. %Y A102674 Cf. A000120, A000788, A023416, A059015 (for base 2). %K A102674 nonn,base,easy %O A102674 0,6 %A A102674 _N. J. A. Sloane_, Feb 03 2005 %E A102674 More terms from _Emeric Deutsch_, Feb 22 2005 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE