OFFSET
1,2
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
For n>2, a(n) = (1/9)*((8-(-1)^n)*3^floor(n/2) + 2*3^n). - Ralf Stephan, May 11 2004
G.f.: -x*(3*x^4+5*x^3+6*x^2-x-1) / ((3*x-1)*(3*x^2-1)). - Colin Barker, Dec 15 2012
MATHEMATICA
CoefficientList[Series[-(3 x^4 + 5 x^3 + 6 x^2 - x - 1)/((3 x - 1) (3 x^2 - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 19 2013 *)
LinearRecurrence[{3, 3, -9}, {1, 4, 9, 25, 63}, 30] (* Harvey P. Dale, Feb 20 2016 *)
PROG
(Magma) [1, 4] cat [(1/9)*((8-(-1)^n)*3^Floor(n/2) + 2*3^n): n in [3..30]]; // Vincenzo Librandi, Oct 19 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Vincenzo Librandi, Oct 19 2013
STATUS
approved