OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (7,-12,8).
FORMULA
a(n) = 7*a(n-1) - 12*a(n-2) + 8*a(n-3).
G.f.: x*(1-2*x)/(1-7*x+12*x^2-8*x^3). - Colin Barker, Jul 26 2012
MATHEMATICA
(See A192808.)
LinearRecurrence[{7, -12, 8}, {0, 1, 5}, 30] (* G. C. Greubel, Jan 02 2019 *)
CoefficientList[Series[x (1-2x)/(1-7x+12x^2-8x^3), {x, 0, 30}], x] (* Harvey P. Dale, Aug 26 2021 *)
PROG
(PARI) my(x='x+O('x^30)); concat([0], Vec(x*(1-2*x)/(1-7*x+12*x^2-8*x^3) )) \\ ~~~
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( x*(1-2*x)/(1-7*x+12*x^2-8*x^3) )); // G. C. Greubel, Jan 02 2019
(Sage) (x*(1-2*x)/(1-7*x+12*x^2-8*x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 02 2019
(GAP) a:=[0, 1, 5];; for n in [4..25] do a[n]:=7*a[n-1]-12*a[n-2]+8*a[n-3]; od; Print(a); # Muniru A Asiru, Jan 02 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 10 2011
STATUS
approved