A135520 a(n) = 4*a(n-2).
2, 1, 8, 4, 32, 16, 128, 64, 512, 256, 2048, 1024, 8192, 4096, 32768, 16384, 131072, 65536, 524288, 262144, 2097152, 1048576, 8388608, 4194304, 33554432, 16777216, 134217728, 67108864, 536870912, 268435456, 2147483648, 1073741824
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0, 4).
Programs
-
Magma
[(5/4)*2^n+(3/4)*(-2)^n: n in [0..40]]; // Vincenzo Librandi, Jun 02 2011
-
Maple
A135520:=n->2^(n+(-1)^n); seq(A135520(n), n=0..50); # Wesley Ivan Hurt, Dec 13 2013
-
Mathematica
LinearRecurrence[{1,4,-4},{2,1,8},40] (* Harvey P. Dale, May 25 2012 *) LinearRecurrence[{0, 4},{2, 1},32] (* Ray Chandler, Aug 03 2015 *)
-
PARI
a(n)=1<<(n+(-1)^n) \\ Charles R Greathouse IV, Jun 01 2011
Formula
From R. J. Mathar, corrected Apr 14 2008: (Start)
O.g.f.: (5/(1-2*x) + 3/(1+2*x))/4.
a(n) = (5*2^n + 3*(-2)^n)/4.
a(n) = A000079(n) terms swapped by pairs. - Paul Curtz, Apr 26 2011
a(n) = 2^(n+(-1)^n). - Wesley Ivan Hurt, Dec 13 2013
E.g.f.: (1/4)*(5*exp(2*x) + 3*exp(-2*x)). - G. C. Greubel, Oct 17 2016
Extensions
More terms from R. J. Mathar, Feb 23 2008