|
|
A052386
|
|
Number of integers from 1 to 10^n-1 that lack 0 as a digit.
|
|
12
|
|
|
0, 9, 90, 819, 7380, 66429, 597870, 5380839, 48427560, 435848049, 3922632450, 35303692059, 317733228540, 2859599056869, 25736391511830, 231627523606479, 2084647712458320, 18761829412124889, 168856464709124010, 1519708182382116099, 13677373641439044900
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 9*a(n-1) + 9.
a(n) = 10*a(n-1)-9*a(n-2). G.f.: 9*x / ((x-1)*(9*x-1)). - Colin Barker, Sep 26 2013
|
|
EXAMPLE
|
For n=2, the numbers from 1 to 99 which *have* 0 as a digit are the 9 numbers 10, 20, 30, ..., 90. So a(1) = 99 - 9 = 90.
|
|
MATHEMATICA
|
Table[9(9^n - 1)/8, {n, 0, 20}]
LinearRecurrence[{10, -9}, {0, 9}, 30] (* Harvey P. Dale, Mar 22 2019 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|