login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of zeros in numbers 1 to 111...1 (n+1 digits).
9

%I #34 Sep 13 2023 11:06:37

%S 1,21,321,4321,54321,654321,7654321,87654321,987654321,10987654321,

%T 120987654321,1320987654321,14320987654321,154320987654321,

%U 1654320987654321,17654320987654321,187654320987654321

%N Number of zeros in numbers 1 to 111...1 (n+1 digits).

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (21,-120,100).

%F a(1) = 1; for n>1, a(n) = n*10^(n-1)+a(n-1).

%F G.f.: x/((1-x)*(1-10*x)^2).

%F a(n) = 10^n*(n+1)/9-1/81*10^(n+1)+1/81.

%F a(n) = (10^n*(9*n-1)+1)/81. - _Kenneth E. Caviness_, Mar 30 2011

%F E.g.f.: (1 - exp(9*x) + 90*x*exp(9*x))*exp(x)/81. - _Ilya Gutkovskiy_, May 02 2016

%F a(n) = Sum_{i=0..n}(i*10^(i-1)). - _José de Jesús Camacho Medina_, Dec 14 2016

%o (Magma) [(10^n*(9*n-1)+1)/81: n in [1..25]]; // _Vincenzo Librandi_, Mar 31 2011

%o (PARI) a(n) = sum(i=0, n, i*10^(i-1)); \\ _Michel Marcus_, Dec 15 2016

%Y Cf. A033713.

%K nonn,easy,base

%O 1,2

%A _Olivier Gérard_

%E Better description from _Stephen G Penrice_, Oct 03 2000