OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (18,-95,150).
FORMULA
a(0)=1, a(2)=18, a(3)=229, a(n) = 18*a(n-1)-95*a(n-2)+150*a(n-3). - Vincenzo Librandi, Jul 01 2013
a(n) = 15*a(n-1) -50*a(n-2) -3^n. - Vincenzo Librandi, Jul 01 2013
a(n) = (2*10^(n+2) - 7*5^(n+2) + 5*3^(n+2))/70. [Yahia Kahloune, Aug 13 2013]
MAPLE
a:= n-> (Matrix(3, (i, j)-> `if`(i=j-1, 1, `if`(j=1, [18, -95, 150][i], 0)))^n)[1, 1]: seq(a(n), n=0..25); # Alois P. Heinz, Jul 01 2013
MATHEMATICA
CoefficientList[Series[1 / ((1 - 3 x) (1 - 5 x) (1 - 10 x)), {x, 0, 30}], x] (* Vincenzo Librandi, Jul 01 2013 *)
LinearRecurrence[{18, -95, 150}, {1, 18, 229}, 20] (* Harvey P. Dale, Aug 12 2023 *)
PROG
(Magma) I:=[1, 18, 229]; [n le 3 select I[n] else 18*Self(n-1)-95*Self(n-2)+150*Self(n-3): n in [1..20]]; /* or */ m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-3*x)*(1-5*x)*(1-10*x)))); // Vincenzo Librandi, Jul 01 2013
(PARI) a(n) = (2*10^(n+2) - 7*5^(n+2) + 5*3^(n+2))/70; \\ Joerg Arndt, Aug 13 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved