OFFSET
1,2
COMMENTS
a(n) is the number of n-digit numbers in A366963.
LINKS
Index entries for linear recurrences with constant coefficients, signature (18,-107,210).
FORMULA
a(n) = 27*7^(n-1) - 47*6^(n-1) + 4*5^n.
a(n) = 21*a(n-1) - 146*a(n-2) + 336*a(n-3) for n > 3.
O.g.f.: x^2*(7 + 5*x)/((1 - 5*x)*(1 - 6*x)*(1 - 7*x)).
E.g.f.: (162*exp(7*x) - 329*exp(6*x) + 168*exp(5*x) - 1)/42.
MATHEMATICA
LinearRecurrence[{18, -107, 210}, {0, 7, 131}, 22]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Nov 11 2023
STATUS
approved