A083086 a(n) = (2^(n+1) + (-4)^n)/3.
1, 0, 8, -16, 96, -320, 1408, -5376, 22016, -87040, 350208, -1396736, 5595136, -22364160, 89489408, -357892096, 1431699456, -5726535680, 22906667008, -91625619456, 366504574976, -1466014105600, 5864064811008, -23456242466816, 93825003421696, -375299946577920
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (-2,8).
Programs
-
Magma
[(2*2^n+(-4)^n)/3: n in [0..30]]; // Vincenzo Librandi, Nov 12 2011
-
Mathematica
LinearRecurrence[{-2,8}, {1,0}, 41] (* G. C. Greubel, Feb 19 2023 *)
-
PARI
a(n)=(2*2^n+(-4)^n)/3 \\ Charles R Greathouse IV, Oct 07 2015
-
SageMath
[(2^(n+1)+(-4)^n)/3 for n in range(41)] # G. C. Greubel, Feb 19 2023
Formula
a(n) = (2*2^n + (-4)^n)/3.
G.f.: (1+2*x)/((1+4*x)*(1-2*x)).
E.g.f.: (2*exp(2*x) + exp(-4*x))/3.
a(n) = -2*a(n-1) + 8*a(n-2). - Vincenzo Librandi, Nov 12 2011
Comments