OFFSET
1,2
COMMENTS
a(n) is the number of n-digit numbers in A366964.
LINKS
Index entries for linear recurrences with constant coefficients, signature (21,-146,336).
FORMULA
a(n) = 23*8^(n-1) - 41*7^(n-1) + 3*6^n.
a(n) = 21*a(n-1) - 146*a(n-2) + 336*a(n-3) for n > 3.
O.g.f.: x^2*(5 + 6*x)/((1 - 6*x)*(1 - 7*x)*(1 - 8*x)).
E.g.f.: (161*exp(8*x) - 328*exp(7*x) + 168*exp(6*x) - 1)/56.
MATHEMATICA
LinearRecurrence[{21, -146, 336}, {0, 5, 111}, 21]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Nov 11 2023
STATUS
approved