OFFSET
1,2
COMMENTS
a(n) is the number of n-digit numbers in A366960.
LINKS
Index entries for linear recurrences with constant coefficients, signature (9,-26,24).
FORMULA
a(n) = 27*4^(n-1) - 41*3^(n-1) + 7*2^n.
a(n) = 9*a(n-1) - 26*a(n-2) + 24*a(n-3) for n > 3.
O.g.f.: x^2*(13 + 2*x)/((1 - 2*x)*(1 - 3*x)*(1 - 4*x)).
E.g.f.: (exp(x) - 1)^2*(81*exp(2*x) - 2*exp(x) - 1)/12.
MATHEMATICA
LinearRecurrence[{9, -26, 24}, {0, 13, 119}, 25]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Nov 11 2023
STATUS
approved