OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,1,-2,1).
FORMULA
a(n) = A286311(-n).
b(n) = A286311(n) + (period 6 sequence : repeat [0, 1, 0, 0, 0, -1]) = 0, 2, 1, 3, 5, 7, 12, 20, 31, 51, 83, 133, ... . See A134667(n).
a(n) = -(-1)^n*b(n).
G.f.: x*(2 - x + x^2) / ((1 + x - x^2)*(1 - x + x^2)). - Colin Barker, May 08 2017
MATHEMATICA
LinearRecurrence[{0, 1, -2, 1}, {0, 2, -1, 3}, 38] (* or *)
CoefficientList[Series[x (2 - x + x^2)/((1 + x - x^2) (1 - x + x^2)), {x, 0, 37}], x] (* Michael De Vlieger, May 08 2017 *)
PROG
(PARI) concat(0, Vec(x*(2 - x + x^2) / ((1 + x - x^2)*(1 - x + x^2)) + O(x^60))) \\ Colin Barker, May 08 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, May 08 2017
EXTENSIONS
Typo in data fixed and more terms added by Colin Barker, May 08 2017
STATUS
approved