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,-131,231).
FORMULA
a(0)=1, a(1)=21, a(2)=310; for n > 2, a(n) = 21*a(n-1) - 131*a(n-2) + 231*a(n-3). - Vincenzo Librandi, Jul 02 2013
a(n) = 18*a(n-1) - 77*a(n-2) + 3^n. - Vincenzo Librandi, Jul 02 2013
a(n) = (11^(n+2) - 2*7^(n+2) + 3^(n+2))/32. - Yahia Kahloune, Jul 06 2013
O.g.f.: 1/((1-3*x) * (1-7*x) * (1-11*x)).
E.g.f.: (d^2/dx^2)(exp(3*x)*(exp(4*x)-1)^2/(4^2*2!)) = exp(3*x)*(121*exp(8*x) - 98*exp(4*x) + 9)/32. - Wolfdieter Lang, Apr 13 2017
MAPLE
a:= n-> (Matrix(3, (i, j)-> `if`(i=j-1, 1, `if`(j=1, [21, -131, 231][i], 0)))^n)[1, 1]: seq (a(n), n=0..25); # Alois P. Heinz, Jul 02 2013
MATHEMATICA
CoefficientList[Series[1 / ((1 - 3 x) (1 - 7 x) (1 - 11 x)), {x, 0, 30}], x] (* Vincenzo Librandi, Jul 02 2013 *)
PROG
(Magma) m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-3*x)*(1-7*x)*(1-11*x)))); /* or */ I:=[1, 21, 310]; [n le 3 select I[n] else 21*Self(n-1)-131*Self(n-2)+231*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Jul 02 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved