OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (20,-127,252).
FORMULA
a(n) = 16*4^n/15 -49*7^n/6 +81*9^n/10. - R. J. Mathar, Jun 29 2013
a(0)=1, a(1)=20, a(2)=273; for n>2, a(n) = 20*a(n-1) -127*a(n-2) +252*a(n-3). - Vincenzo Librandi, Jul 03 2013
a(n) = 16*a(n-1) -63*a(n-2) +4^n. - Vincenzo Librandi, Jul 03 2013
MATHEMATICA
CoefficientList[Series[1 / ((1 - 4 x) (1 - 7 x) (1 - 9 x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jul 03 2013 *)
LinearRecurrence[{20, -127, 252}, {1, 20, 273}, 30] (* G. C. Greubel, Aug 24 2018 *)
PROG
(Magma) m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-4*x)*(1-7*x)*(1-9*x)))); /* or */ I:=[1, 20, 273]; [n le 3 select I[n] else 20*Self(n-1)-127*Self(n-2)+252*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Jul 03 2013
(PARI) x='x+O('x^30); Vec(1/((1-4*x)*(1-7*x)*(1-9*x))) \\ G. C. Greubel, Aug 24 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved