A081631 a(n) = 2*2^n - (-2)^n.
1, 6, 4, 24, 16, 96, 64, 384, 256, 1536, 1024, 6144, 4096, 24576, 16384, 98304, 65536, 393216, 262144, 1572864, 1048576, 6291456, 4194304, 25165824, 16777216, 100663296, 67108864, 402653184, 268435456, 1610612736, 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
[2*2^n-(-2)^n: n in [0..40]]; // Vincenzo Librandi, Aug 10 2013
-
Mathematica
CoefficientList[Series[(1 + 6 x) / ((1 - 2 x) (1 + 2 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 10 2013 *) LinearRecurrence[{0,4},{1,6},40] (* or *) With[{nn=20},Riffle[ NestList[ 4#&,1,nn],NestList[4#&,6,nn]]] (* Harvey P. Dale, Aug 04 2019 *)
-
PARI
a(n)=2*2^n-(-2)^n \\ Charles R Greathouse IV, Oct 07 2015
Formula
G.f.: (1+6*x)/((1-2*x)*(1+2*x)).
E.g.f.: 2*exp(2*x)-exp(-2*x).
Comments