OFFSET
1,2
COMMENTS
a(n) is the number of n-digit numbers in A366959.
LINKS
Index entries for linear recurrences with constant coefficients, signature (6,-11,6).
FORMULA
a(n) = (46*3^n - 93*2^n + 48)/6.
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) for n > 3.
O.g.f.: x^2*(15 + x)/((1 - x)*(1- 2*x)*(1 - 3*x)).
E.g.f.: (exp(x) - 1)^2*(46*exp(x) - 1)/6.
MATHEMATICA
LinearRecurrence[{6, -11, 6}, {0, 15, 91}, 27]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Nov 11 2023
STATUS
approved