OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,4,-3,-3).
FORMULA
a(n) = 3^(floor(n/2)+1)-fibonacci(n+3).
Recurrence: a(n+4)=a(n+3)+4*a(n+2)-3*a(n+1)-3*a(n).
G.f.: (1-x)/(1-x-4x^2+3x^3+3x^4) = (1-x)/((1-x-x^2)(1-3x^2)).
MATHEMATICA
Table[3^(Floor[n/2]+1)-Fibonacci[n+3], {n, 0, 100}]
LinearRecurrence[{1, 4, -3, -3}, {1, 0, 4, 1}, 40] (* Harvey P. Dale, Feb 23 2023 *)
PROG
(Maxima) makelist(3^(floor(n/2)+1)-fib(n+3), n, 0, 12);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emanuele Munarini, Jun 07 2011
STATUS
approved