OFFSET
1,3
COMMENTS
Limit_{n->infinity} a(n+1)/a(n) = 3.
REFERENCES
Alain M. Robert, Linear Algebra, Examples and Applications 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
a(n) = 3^(n-2) - (-1)^n*A038754(n)/3. - R. J. Mathar, Nov 07 2011
From Colin Barker, Feb 05 2017: (Start)
a(n) = 3^(n-2) - 3^((n-3)/2)/2*(-2 + 2*(-1)^n + sqrt(3) + (-1)^n*sqrt(3)) for n>0.
a(n) = 3*a(n-1) + 3*a(n-2) - 9*a(n-3) for n>3.
(End)
MAPLE
A038754 := proc(n)
if type(n, 'even') then
3^(n/2);
else
2*3^((n-1)/2) ;
end if;
end proc:
A122008 := proc(n)
3^(n-2)-(-1)^n*A038754(n)/3 ;
end proc:
seq(A122008(n), n=1..10) ; # R. J. Mathar, Nov 07 2011
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][[1]], {n, 1, 50}]
LinearRecurrence[{3, 3, -9}, {1, 0, 5}, 30] (* Harvey P. Dale, Aug 28 2023 *)
PROG
(PARI) Vec((2*x-1)*(x-1)*x / ((3*x-1)*(3*x^2-1)) + O(x^50)) \\ Colin Barker, Feb 05 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula and Gary W. Adamson, Sep 11 2006
STATUS
approved