OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3, -1).
FORMULA
a(n) = (-1)^n*A098150(n-1), n>0.
G.f.: (3*x^2+1)/(1-3*x+x^2).
a(n) = 3*L(2n+1)-F(2n), where F(n) is the n-th Fibonacci number and L(n) is the n-th Lucas number. - Rigoberto Florez, Dec 24 2018
MATHEMATICA
Join[{1}, LinearRecurrence[{3, -1}, {3, 11}, 30]] (* Harvey P. Dale, Jun 25 2014 *)
CoefficientList[Series[(3 x^2 + 1)/(1 - 3 x + x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 26 2014 *)
Table[3LucasL[2n+1]-Fibonacci[2n], {n, 0, 20}] (* Rigoberto Florez, Dec 24 2018 *)
PROG
(Magma) I:=[1, 3, 11]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2): n in [1..50]]; // Vincenzo Librandi, Jun 26 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jamel Ghanouchi, Nov 02 2009
EXTENSIONS
Edited by R. J. Mathar, Nov 03 2009
STATUS
approved