OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (7,12).
FORMULA
a(n) = 7*a(n-1) + 12*a(n-2).
MATHEMATICA
a[n_]:=(MatrixPower[{{1, 4}, {1, -8}}, n].{{1}, {1}})[[2, 1]]; Table[Abs[a[n]], {n, -1, 40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *)
CoefficientList[Series[x/(1-7x-12x^2), {x, 0, 30}], x] (* or *) LinearRecurrence[{7, 12}, {0, 1}, 30] (* Harvey P. Dale, Jan 11 2012 *)
PROG
(Sage) [lucas_number1(n, 7, -12) for n in range(0, 20)] # Zerinvary Lajos, Apr 24 2009
(Magma) [n le 2 select n-1 else 7*Self(n-1) + 12*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 14 2012
(PARI) x='x+O('x^30); concat([0], Vec(x/(1-7*x-12*x^2))) \\ G. C. Greubel, Jan 06 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved