OFFSET
0,1
COMMENTS
LINKS
FORMULA
G.f.: (2-5*x+5*x^2)/((1-2*x)*(1-x^2)). - Vincenzo Librandi, Feb 18 2016
EXAMPLE
For n = 6; a(n) = 2^n + 2*(-1)^n - 1 = 2^6 + 2*(-1)^6 - 1 = 65.
MATHEMATICA
Table [2^n + 2 (-1)^n - 1, {n, 0, 80}] (* or *) CoefficientList[Series[(2 - 5 x + 5 x^2) / ((1 - 2 x) (1 - x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 18 2016 *)
LinearRecurrence[{2, 1, -2}, {2, -1, 5}, 40] (* Harvey P. Dale, Feb 25 2022 *)
PROG
(Magma) [2^n + 2*(-1)^n - 1: n in [0..300]]
CROSSREFS
KEYWORD
sign
AUTHOR
Jaroslav Krizek, Feb 17 2016
STATUS
approved