A033713 Number of zeros in numbers 1 to 999..9 (n digits).
0, 9, 189, 2889, 38889, 488889, 5888889, 68888889, 788888889, 8888888889, 98888888889, 1088888888889, 11888888888889, 128888888888889, 1388888888888889, 14888888888888889, 158888888888888889, 1688888888888888889, 17888888888888888889, 188888888888888888889, 1988888888888888888889
Offset: 1
References
- M. Kraitchik, Mathematical Recreations. Dover, NY, 2nd ed., 1953, p. 49.
Links
- F. Calogero, Cool irrational numbers and their rather cool rational approximations, Math. Intell. 25 (4), 72-76 (2003).
- Index entries for linear recurrences with constant coefficients, signature (21,-120,100).
Programs
-
Mathematica
Table[ Sum[9i*10^(i - 1), {i, 1, n}], {n, 0, 16}] LinearRecurrence[{21,-120,100},{0,9,189},30] (* Harvey P. Dale, Jan 24 2012 *)
-
PARI
a(n)=((n-1)*(10^n)-n*10^(n-1)+1)/9 \\ Charles R Greathouse IV, Feb 19 2017
Formula
From Stephen G Penrice, Oct 01 2000: (Start)
a(n) = (1/9)*((n-1)*(10^n)-n*10^(n-1)+1).
G.f.: (9*x^2)/((1-x)(1-10x)^2). (End)
a(n) = Sum_{i=1..n} 9*i*10^(i-1).
a(1)=0, a(2)=9, a(3)=189, a(n)=21*a(n-1)-120*a(n-2)+100*a(n-3). - Harvey P. Dale, Jan 24 2012
a(n+1) = A058183(10^n-1) for n >= 1. - Jianing Song, Apr 17 2022
E.g.f.: exp(x)*(1 + exp(9*x)*(9*x - 1))/9. - Stefano Spezia, Sep 13 2023
Extensions
More terms from Erich Friedman.
a(18)-a(21) from Stefano Spezia, Sep 13 2023
Comments