OFFSET
1,2
COMMENTS
a(n) is the number of n-digit numbers in A366965.
LINKS
Index entries for linear recurrences with constant coefficients, signature (24,-191,504).
FORMULA
a(n) = 17*9^(n-1) - 31*8^(n-1) + 2*7^n.
a(n) = 24*a(n-1) - 191*a(n-2) + 504*a(n-3) for n > 3.
O.g.f.: x^2*(3 + 7*x)/((1 - 7*x)*(1 - 8*x)*(1 - 9*x)).
E.g.f.: (136*exp(9*x) - 279*exp(8*x) + 144*exp(7*x) - 1)/72.
MATHEMATICA
LinearRecurrence[{24, -191, 504}, {0, 3, 79}, 21]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Nov 11 2023
STATUS
approved