OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,4).
FORMULA
G.f.: (1+6*x)/((1-2*x)*(1+2*x)).
E.g.f.: 2*exp(2*x)-exp(-2*x).
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 *)
PROG
(Magma) [2*2^n-(-2)^n: n in [0..40]]; // Vincenzo Librandi, Aug 10 2013
(PARI) a(n)=2*2^n-(-2)^n \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Mar 26 2003
STATUS
approved