cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A102676 Number of digits >= 5 in the decimal representations of all integers from 0 to n.

This page as a plain text file.
%I A102676 #23 Nov 16 2022 17:26:43
%S A102676 0,0,0,0,0,1,2,3,4,5,5,5,5,5,5,6,7,8,9,10,10,10,10,10,10,11,12,13,14,
%T A102676 15,15,15,15,15,15,16,17,18,19,20,20,20,20,20,20,21,22,23,24,25,26,27,
%U A102676 28,29,30,32,34,36,38,40,41,42,43,44,45,47,49,51,53,55,56,57,58,59,60,62
%N A102676 Number of digits >= 5 in the decimal representations of all integers from 0 to n.
%C A102676 The total number of digits >= 5 occurring in all the numbers 0, 1, 2, ... n (in decimal representation). - _Hieronymus Fischer_, Jun 10 2012
%D A102676 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.
%H A102676 Hieronymus Fischer, <a href="/A102676/b102676.txt">Table of n, a(n) for n = 0..10000</a>
%F A102676 From _Hieronymus Fischer_, Jun 10 2012: (Start)
%F A102676 a(n) = (1/2)*Sum_{j=1..m+1} (floor(n/10^j + 1/2)*(2n + 2 - floor(n/10^j + 1/2)*10^j - floor(n/10^j)*(2n + 2 - (1+floor(n/10^j))*10^j)), where m = floor(log_10(n)).
%F A102676 a(n) = (n+1)*A102675(n) + (1/2)*Sum_{j=1..m+1} (floor(n/10^j)*10^j - (floor(n/10^j + 1/2)^2 - floor(n/10^j)^2)*10^j), where m = floor(log_10(n)).
%F A102676 a(10^m-1) = 5*m*10^(m-1).
%F A102676 (This is the total number of digits >= 5 occurring in all the numbers with <= m places.)
%F A102676 G.f.: g(x) = (1/(1-x)^2)*Sum_{j>=0} (x^(5*10^j) - x^(10*10^j))/(1-x^10^(j+1)).
%F A102676 G.f.: g(x) = (1/(1-x)^2)*Sum_{j>=0} x^(5*10^j)/(1+x^(5*10^j)).  (End)
%p A102676 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(add(p(i),i=0..n), n=0..83); # _Emeric Deutsch_, Feb 23 2005
%t A102676 Accumulate[Table[Total[Take[DigitCount[n],{5,9}]],{n,0,80}]] (* _Harvey P. Dale_, Apr 27 2015 *)
%Y A102676 Partial sums of A102675.
%Y A102676 Cf. A027868, A054899, A055640, A055641, A102669-A102685, A117804, A122840, A122841, A160093, A160094, A196563, A196564.
%Y A102676 Cf. A000120, A000788, A023416, A059015 (for base 2).
%K A102676 nonn,base,easy
%O A102676 0,7
%A A102676 _N. J. A. Sloane_, Feb 03 2005
%E A102676 More terms from _Emeric Deutsch_, Feb 23 2005