A100887 Expansion of (-1+2x+2x^2)/((1+x+x^2)(1-x-x^2)).
-1, 2, 1, 0, 4, 4, 5, 12, 17, 26, 46, 72, 115, 190, 305, 492, 800, 1292, 2089, 3384, 5473, 8854, 14330, 23184, 37511, 60698, 98209, 158904, 257116, 416020, 673133, 1089156, 1762289, 2851442, 4613734, 7465176, 12078907, 19544086, 31622993, 51167076
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0, 1, 2, 1).
Programs
-
Mathematica
a[n_] := Fibonacci[n + 1]/2 - Sqrt[3]Cos[2Pi*n/3 + Pi/6]; Table[ a[n], {n, 0, 39}] a[0] = -1; a[1] = 2; a[2] = 1; a[3] = 0; a[n_] := a[n] = a[n - 2] + 2a[n - 3] + a[n - 4]; Table[ a[n], {n, 0, 39}] CoefficientList[ Series[(-1 + 2x + 2x^2)/((1 - x - x^2)(1 + x + x^2)), {x, 0, 39}], x] (* Robert G. Wilson v, Dec 02 2004 *)
-
PARI
Vec((-1+2*x+2*x^2)/((1+x+x^2)*(1-x-x^2))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
Formula
a(n) = Fib(n+1)/2 - sqrt(3)cos(2Pi*n/3 + Pi/6); a(n) = a(n-2) + 2a(n-3) + a(n-4), a(0) = -1, a(1) = 2, a(2) = 1, a(3) = 0
Extensions
Edited and extended by Robert G. Wilson v, Dec 02 2004
Comments