login
A377207
Number of n-digit numbers where every digit is either a 9 or adjacent to a 9.
0
1, 18, 99, 342, 2691, 13788, 65709, 407772, 2115981, 11108358, 63181719, 334551402, 1802963871, 9931645728, 53256984129, 288681869232, 1572458030361, 8484410567898, 46019764248939, 249748559819262, 1351163694059451, 7326501636596868, 39716608228492149, 215099382176679492
OFFSET
1,2
COMMENTS
The 9 in the definition can also be any other nonzero digit.
FORMULA
G.f.: x*(1 + 8*x)*(1 + 9*x)/(1 - x - 9*x^2 - 81*x^3). - Andrew Howroyd, Oct 20 2024
EXAMPLE
The a(1) = 1 number is 9.
The a(2) = 18 numbers are 19, 29, 39, 49, 59, 69, 79, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99.
PROG
(PARI) Vec((1 + 8*x)*(1 + 9*x)/(1 - x - 9*x^2 - 81*x^3) + O(x^25)) \\ Andrew Howroyd, Oct 20 2024
CROSSREFS
Sequence in context: A044269 A044650 A008920 * A221911 A263999 A087638
KEYWORD
nonn,base,easy
AUTHOR
Edwin McCravy, Oct 19 2024
EXTENSIONS
a(9) onwards from Andrew Howroyd, Oct 20 2024
STATUS
approved