OFFSET
0,3
COMMENTS
Pisano period lengths: 1, 2, 8, 4, 4, 8, 3, 4, 24, 4, 110, 8, 168, 6, 8, 8, 288, 24, 18, 4, ... . - R. J. Mathar, Aug 10 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,7).
FORMULA
From R. J. Mathar, Apr 29 2008: (Start)
O.g.f.: x/(1 - 4*x - 7*x^2).
a(n) = -7^n*(A^n - B^n)/(2*sqrt(11)) where A = -1/(2+sqrt(11)) and B = 1/(sqrt(11)-2). (End)
MATHEMATICA
a[n_]:=(MatrixPower[{{1, 2}, {1, -5}}, n].{{1}, {1}})[[2, 1]]; Table[Abs[a[n]], {n, -1, 40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *)
LinearRecurrence[{4, 7}, {0, 1}, 30] (* Vincenzo Librandi, Nov 12 2012 *)
PROG
(Sage) [lucas_number1(n, 4, -7) for n in range(0, 21)]# Zerinvary Lajos, Apr 23 2009
(Magma) [n le 2 select n-1 else 4*Self(n-1)+7*Self(n-2): n in [1..30] ]; // Vincenzo Librandi, Nov 12 2012
(PARI) x='x+O('x^30); concat([0], Vec(x/(1-4*x-7*x^2))) \\ G. C. Greubel, Jan 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved