A087205 a(n) = -2*a(n-1) + 4*a(n-2), a(0)=1, a(1)=2.
1, 2, 0, 8, -16, 64, -192, 640, -2048, 6656, -21504, 69632, -225280, 729088, -2359296, 7634944, -24707072, 79953920, -258736128, 837287936, -2709520384, 8768192512, -28374466560, 91821703168, -297141272576, 961569357824, -3111703805952
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (-2,4)
Programs
-
Magma
[(-1)^(n+1)*2^n*Fibonacci(n-2): n in [0..50]]; // G. C. Greubel, Oct 08 2018
-
Mathematica
Table[-(-2)^n*Fibonacci[n - 2], {n, 0, 50}] (* G. C. Greubel, Oct 08 2018 *) LinearRecurrence[{-2,4},{1,2},30] (* Harvey P. Dale, Jan 24 2022 *)
-
PARI
Vec((4*x+1)/(-4*x^2+2*x+1)+O(x^66)) \\ Joerg Arndt, Jul 14 2013
-
PARI
vector(50, n, n--; (-1)^(n+1)*2^n*fibonacci(n-2)) \\ G. C. Greubel, Oct 08 2018
Formula
a(n) = (-1-sqrt(5))^n * (1/2-3*sqrt(5)/10) + (-1+sqrt(5))^n * (1/2+3*sqrt(5)/10).
G.f.: (4*x +1)/(-4*x^2 +2*x +1). - Joerg Arndt, Jul 14 2013
a(n) = -(-2)^n*F(n-2) for n >= 0, with F = A000045, and F(-1) = 1, F(-2) = -1. - Wolfdieter Lang, Oct 08 2018
Comments