OFFSET
0,3
COMMENTS
Linear 2nd order recurrence.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,7).
FORMULA
From R. J. Mathar, Apr 21 2008: (Start)
O.g.f.: x/(1 - 3*x - 7*x^2).
a(n) = 14^n*(1/A^n -(-1)^n/B^n)/sqrt(37), where A = sqrt(37) - 3 = A010491 - 3 and B = sqrt(37) + 3 = A010491 + 3. (End)
a(n) = (7*(111+23*sqrt(37))*(1/2*(3+sqrt(37)))^n + (2553 + 431*sqrt(37)) * (1/2 (3-sqrt(37)))^n)/(518*(45+8*sqrt(37))). - Harvey P. Dale, Jul 04 2011
MATHEMATICA
a[n_]:=(MatrixPower[{{1, 3}, {1, -4}}, n].{{1}, {1}})[[2, 1]]; Table[Abs[a[n]], {n, -1, 40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *)
LinearRecurrence[{3, 7}, {0, 1}, 30] (* Harvey P. Dale, Jul 04 2011 *)
PROG
(Sage) [lucas_number1(n, 3, -7) for n in range(0, 23)] # Zerinvary Lajos, Apr 22 2009
(Magma) [n le 2 select n-1 else 3*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 - 3*x - 7*x^2))) \\ G. C. Greubel, Jan 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved