OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (2,3).
FORMULA
a(n) = 2*a(n-1)+3*a(n-2) for n > 1; a(0) = 1, a(1) = 5.
G.f.: (1+3*x)/((1+x)*(1-3*x)).
a(n) = 3*a(n-1)+2*(-1)^n. - Carmine Suriano, Mar 21 2014
MAPLE
MATHEMATICA
Table[(3*3^n - (-1)^n)/2, {n, 0, 30}] (* Wesley Ivan Hurt, Mar 21 2014 *)
LinearRecurrence[{2, 3}, {1, 5}, 50] (* Harvey P. Dale, Oct 31 2018 *)
PROG
(Magma) [ (3*3^n-(-1)^n)/2: n in [0..25] ];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, Aug 31 2009
STATUS
approved