OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,6,-9).
FORMULA
G.f.: x/((1-x)*(1 - 3*x - 9*x^2)).
a(n) = 4*a(n-1) + 6*a(n-2) - 9*a(n-3).
a(n) = 3^(n-1)*Sum_{k=0..n} Fibonacci(n-k)*3^(-k).
a(n) = (3/2 + 3*sqrt(5)/2)^n*(1/22 + 7*sqrt(5)/110) + (1/22 - 7*sqrt(5)/110)*(3/2 - 3*sqrt(5)/2)^n - 1/11.
a(n) = (3^n*A000285(n) - 1)/11, the case m = 3 of Sum_{k=0..n} m^(k-1)*F(k) = (m^n*(m*F(n) + F(n+1)) - 1)/(m^2 + m - 1), F=A000045. - Ehren Metcalfe, Apr 29 2018
MATHEMATICA
Join[{a=0, b=1}, Table[c=3*b+9*a+1; a=b; b=c, {n, 60}]] (* Vladimir Joseph Stephan Orlovsky, Jan 18 2011 *)
Table[Sum[3^(k-1) Fibonacci[k], {k, 0, n}], {n, 0, 30}] (* or *) LinearRecurrence[{4, 6, -9}, {0, 1, 4}, 30] (* Harvey P. Dale, Dec 09 2011 *)
CoefficientList[Series[x/((1-x)(1-3x-9x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 25 2012 *)
PROG
(Magma) I:=[0, 1, 4]; [n le 3 select I[n] else 4*Self(n-1)+6*Self(n-2)-9*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 25 2012
(PARI) x='x+O('x^30); concat([0], Vec(x/((1-x)*(1 - 3*x - 9*x^2)))) \\ G. C. Greubel, Dec 31 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Sep 22 2004
EXTENSIONS
Sign in second formula corrected by Harvey P. Dale, Dec 09 2011
STATUS
approved