A166515 Partial sum of A166514.
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
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).
Programs
-
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 *)
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.