OFFSET
1,2
REFERENCES
"Linear Algebra, Examples and Applications" by Alain M. Robert, World Scientific, 2005, p. 58.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,3,-9).
FORMULA
Limit a(n+1)/a(n)= 3 as n-> infinity.
a(n)= 3*a(n-1) +3*a(n-2) -9*a(n-3) = 3^(n-2) + (-1)^n*A108411(n-2), n>=2.
From Colin Barker, Sep 23 2016: (Start)
a(n) = 3^(n/2-1)+3^(n-2) for n>1 and even.
a(n) = 3^(n-2)-3^((n-3)/2) for n>1 and odd.
(End)
MATHEMATICA
M = {{0, 1, 2}, {1, 2, 0}, {2, 0, 1}} v[1] = {1, 0, 0} v[n_] := v[n] = M.v[n - 1] a1 = Table[v[n][[3]], {n, 1, 50}]
PROG
(PARI) concat(0, Vec(2*x^2*(1-2*x)/((3*x-1)*(3*x^2-1)) + O(x^40))) \\ Colin Barker, Sep 23 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula and Gary W. Adamson, Sep 11 2006
EXTENSIONS
Definition replaced with generating function by the Assoc. Eds. of the OEIS, Mar 27 2010
A-number in formula corrected - R. J. Mathar, Mar 30 2010
STATUS
approved