OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-1).
FORMULA
G.f.: (3+x) / (1-3*x+x^2).
a(n) = 3*a(n-1)-a(n-2) for n>1.
a(n) = (2^(-2-n)*((9-sqrt(5))*(3+sqrt(5))^(n+1) - (9+sqrt(5))*(3-sqrt(5))^(n+1))) / sqrt(5).
a(n) = 4*Fibonacci(2*n+2) - Fibonacci(2*n+1).
MATHEMATICA
Table[3Fibonacci[2n+1]+4Fibonacci[2n], {n, 0, 30}] (* or *) LinearRecurrence[ {3, -1}, {3, 10}, 30] (* Harvey P. Dale, Apr 05 2019 *)
PROG
(PARI) a(n) = 3*fibonacci(2*n+1) + 4*fibonacci(2*n)
(PARI) Vec((3+x)/(1-3*x+x^2) + O(x^50))
(Magma) k:=3; [k*Fibonacci(2*n+1)+(k+1)*Fibonacci(2*n): n in [0..30]]; // Bruno Berselli, Apr 06 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Apr 05 2016
EXTENSIONS
Changed offset and adapted definition, programs and formulas by Bruno Berselli, Apr 06 2016
STATUS
approved