OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1,1,-1,-1,1).
FORMULA
G.f.: x(1+x-x^2+x^3)/((1+x)^2*(1-x)^3*(1+x^2)).
a(n) = (2n^2+6n+5)/16 + (2n-1)*(-1)^n/16 - sqrt(2)*cos(Pi*n/2+Pi/4)/4.
MATHEMATICA
CoefficientList[Series[x (1 + x - x^2 + x^3)/((1 + x)^2*(1 - x)^3*(1 + x^2)), {x, 0, 50}], x] (* G. C. Greubel, May 15 2016 *)
LinearRecurrence[{1, 1, -1, 1, -1, -1, 1}, {0, 1, 2, 2, 4, 5, 8}, 70] (* Harvey P. Dale, Jan 16 2017 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 16 2009
STATUS
approved