OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
C. G. Bower, Transforms (2)
Index entries for linear recurrences with constant coefficients, signature (3,3,-9).
FORMULA
a(n) = (1/6)*((5-(-1)^n)*3^floor(n/2) + 2*3^n). - Ralf Stephan, May 11 2004
a(n) = 3*a(n-1)+3*a(n-2)-9*a(n-3). G.f.: -x*(9*x^2+x-2) / ((3*x-1)*(3*x^2-1)). - Colin Barker, Dec 15 2012
MATHEMATICA
CoefficientList[Series[-(9 x^2 + x - 2)/((3 x - 1) (3 x^2 - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 19 2013 *)
PROG
(Magma) [(1/6)*((5-(-1)^n)*3^Floor(n/2) + 2*3^n): n in [1..30]]; // Vincenzo Librandi, Oct 19 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Vincenzo Librandi, Oct 19 2013
STATUS
approved