OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (21,-134,240).
FORMULA
a(0)=1, a(1)=21, a(2)=307; for n>2, a(n) = 21*a(n-1) -134*a(n-2) +240*a(n-3). - Vincenzo Librandi, Jul 02 2013
a(n) = 18*a(n-1) -80*a(n-2) +3^n. - Vincenzo Librandi, Jul 02 2013
a(n) = (5*10^(n+2) - 7*8^(n+2) + 2*3^(n+2))/70. [Yahia Kahloune, Jul 06 2013]
MATHEMATICA
CoefficientList[Series[1 / ((1 - 3 x) (1 - 8 x) (1 - 10 x)), {x, 0, 30}], x] (* Vincenzo Librandi, Jul 02 2013 *)
LinearRecurrence[{21, -134, 240}, {1, 21, 307}, 20] (* Harvey P. Dale, Jul 02 2023 *)
PROG
(Magma) m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-3*x)*(1-8*x)*(1-10*x)))); /* or */ I:=[1, 21, 307]; [n le 3 select I[n] else 21*Self(n-1)-134*Self(n-2)+240*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Jul 02 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved