|
|
A257289
|
|
a(n) = 8*9^n - 7*8^n.
|
|
5
|
|
|
1, 16, 200, 2248, 23816, 243016, 2416520, 23583688, 226933256, 2159839816, 20378082440, 190918934728, 1778399954696, 16486635929416, 152228014061960, 1400838452135368, 12853836673840136, 117654854901535816, 1074656292809619080, 9798007424852945608
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
First differences of 9^n - 8^n = A016185.
a(n-1) is the number of numbers with n digits having the largest digit equal to 8. Note that this is independent of the base b > 8.
Equivalently, number of n-letter words over a 9-letter alphabet, which must not start with the last letter of the alphabet, and in which the first letter of the alphabet must appear.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
LinearRecurrence[{17, -72}, {1, 16}, 30] (* Harvey P. Dale, May 26 2019 *)
|
|
PROG
|
(PARI) a(n)=8*9^n-7*8^n
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|