OFFSET
0,1
COMMENTS
For n>0 also index k such that A011540(k) = 10^n.
For n>1: A011540(a(n)) is the least number with n zero digits.
For n>0: a(n) - 1 is the number of numbers with <= n digits which contain the digit '0'. - Hieronymus Fischer, Dec 27 2013
LINKS
Hieronymus Fischer, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (20,-109,90).
FORMULA
a(n+1) = 10*a(n) - 9*a(n-1) + 9*10^(n-1), n>0.
a(n) = 2 + 10^n - 9^n - (9^n - 1)/8.
A011540(a(n)) = 10^n, for n>0.
a(n) = 10^n + 2 - A002452(n+1).
G.f.: (189*x^2 - 38*x + 2)/((1-x)*(1-9*x)*(1-10*x)).
a(n) = 1 + sum_{1<=k<=n} A229127(k), for n>0. - Hieronymus Fischer, Dec 27 2013
EXAMPLE
MATHEMATICA
LinearRecurrence[{20, -109, 90}, {2, 2, 11}, 30] (* Harvey P. Dale, Aug 02 2015 *)
PROG
(PARI) for(n=0, 50, print1(2 +10^n -9^n -(9^n -1)/8, ", ")) \\ G. C. Greubel, Apr 18 2018
(Magma) [2 +10^n -9^n -(9^n -1)/8: n in [0..50]]; // G. C. Greubel, Apr 18 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, Jan 23 2013
STATUS
approved