A110516 Expansion of (1-x+x^2+x^3)/(1+x-x^4-x^5).
1, -2, 3, -2, 3, -4, 5, -4, 5, -6, 7, -6, 7, -8, 9, -8, 9, -10, 11, -10, 11, -12, 13, -12, 13, -14, 15, -14, 15, -16, 17, -16, 17, -18, 19, -18, 19, -20, 21, -20, 21, -22, 23, -22, 23, -24, 25, -24, 25, -26, 27, -26, 27, -28, 29, -28, 29, -30, 31, -30, 31, -32, 33, -32, 33, -34, 35, -34, 35, -36, 37, -36, 37, -38, 39, -38, 39
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,0,0,1,1)
Programs
-
Mathematica
CoefficientList[Series[(1-x+x^2+x^3)/(1+x-x^4-x^5),{x,0,80}],x] (* or *) LinearRecurrence[{-1,0,0,1,1},{1,-2,3,-2,3},80] (* Harvey P. Dale, Jul 14 2017 *)
-
PARI
x='x+O('x^50); Vec((1-x+x^2+x^3)/(1+x-x^4-x^5)) \\ G. C. Greubel, Aug 29 2017
Formula
G.f.: (1-x+x^2+x^3)/((1+x)(1-x^4)).
a(n) = -a(n-1) + a(n-4) + a(n-5).
a(n) = -sin(pi*n/2+pi/4)/sqrt(2) + cos(pi*n+pi/4)/sqrt(2) + (-1)^n*(2n+3)/4 + 1/4.
Comments