login
A166515
Partial sum of A166514.
1
0, 1, 2, 2, 4, 5, 8, 8, 12, 13, 18, 18, 24, 25, 32, 32, 40, 41, 50, 50, 60, 61, 72, 72, 84, 85, 98, 98, 112, 113, 128, 128, 144, 145, 162, 162, 180, 181, 200, 200, 220, 221, 242, 242, 264, 265, 288, 288, 312, 313, 338, 338, 364, 365, 392, 392, 420, 421, 450, 450, 480
OFFSET
0,3
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
Sequence in context: A300121 A267046 A308902 * A339560 A360142 A308952
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 16 2009
STATUS
approved