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,-5,1).
FORMULA
a(n) = 7*a(n-1) - 5*a(n-2) + a(n-3).
G.f.: x*(x - 1)/(x^3 - 5*x^2 + 7*x - 1). - Colin Barker, Nov 23 2012
MATHEMATICA
(See A192806.)
LinearRecurrence[{7, -5, 1}, {0, 1, 6}, 30] (* Harvey P. Dale, Oct 09 2017 *)
PROG
(PARI) my(x='x+O('x^30)); concat([0], Vec(x*(x-1)/(x^3-5*x^2+7*x-1))) \\ G. C. Greubel, Jan 02 2019
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( x*(x-1)/(x^3-5*x^2+7*x-1) )); // G. C. Greubel, Jan 02 2019
(Sage) (x*(x-1)/(x^3-5*x^2+7*x-1)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 02 2019
(GAP) a:=[0, 1, 6];; for n in [4..25] do a[n]:=7*a[n-1]-5*a[n-2]+a[n-3]; od; Print(a); # Muniru A Asiru, Jan 02 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 10 2011
STATUS
approved