A066532 If n is odd a(n) = 1, if n is even a(n) = 2^(n-1).
1, 2, 1, 8, 1, 32, 1, 128, 1, 512, 1, 2048, 1, 8192, 1, 32768, 1, 131072, 1, 524288, 1, 2097152, 1, 8388608, 1, 33554432, 1, 134217728, 1, 536870912, 1, 2147483648, 1, 8589934592, 1, 34359738368, 1, 137438953472, 1, 549755813888, 1, 2199023255552
Offset: 1
Links
- Harry J. Smith, Table of n, a(n) for n = 1..350
- Index entries for linear recurrences with constant coefficients, signature (0,5,0,-4).
Programs
-
Maple
A066532:=n->(2 - (n mod 2))^(n - 1): seq(A066532(n), n=1..50); # Wesley Ivan Hurt, Jul 21 2014
-
Mathematica
Table[ If[ OddQ[n], 1, 2^(n - 1)], {n, 42} ]
-
PARI
a(n) = { if (n%2, 1, 2^(n-1)) } \\ Harry J. Smith, Feb 22 2010
Formula
G.f.: 1/(1-x^2) + 2*x*(1+2*x^2)/(1-2*x^2). - Paul Barry, Jun 17 2006
a(n) = 2^n*(1-(-1)^n)/2+(1+(-1)^n)/2. - Paul Barry, Jun 17 2006
E.g.f.: sinh(x) + sinh(x)^2. - Arkadiusz Wesolowski, Aug 13 2012
a(n) = (2 - (n mod 2))^(n - 1). - Wesley Ivan Hurt, Jul 21 2014
Extensions
More terms from Robert G. Wilson v, Jan 07 2002
More terms from Ralf Stephan, Jul 25 2003
Comments