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,-122,168).
FORMULA
a(n) = 2*2^n/25 - 49*7^n/25 + 72*12^n/25. - R. J. Mathar, Jun 23 2013
From Vincenzo Librandi, Jun 26 2013: (Start)
a(n) = 21*a(n-1) - 122*a(n-2) + 168*a(n-3).
a(n) = 19*a(n-1) - 84*a(n-2) + 2^n. (End)
MATHEMATICA
CoefficientList[Series[1 / ((1 - 2 x) (1 - 7 x) (1 - 12 x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jun 26 2013 *)
PROG
(Magma) I:=[1, 21, 319]; [n le 3 select I[n] else 21*Self(n-1)-122*Self(n-2)+168*Self(n-3): n in [1..20]]; /* or */ m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1/((1-2*x)*(1-7*x)*(1-12*x))))); // Vincenzo Librandi, Jun 26 2013
(PARI) x='x+O('x^99); Vec(1/((1-2*x)*(1-7*x)*(1-12*x))) \\ Altug Alkan, Sep 21 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved