OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (8,-12).
FORMULA
G.f.: (1+2*x)/((1-6*x)(1-2*x)).
E.g.f.: 2*exp(6*x) - exp(2*x).
a(0)=1, a(2)=10; for n>2, a(n) = 8*a(n-1) - 12*a(n-2). - Vincenzo Librandi, Aug 10 2013
MATHEMATICA
CoefficientList[Series[(1 + 2 x) / ((1 - 6 x) (1 - 2 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 10 2013 *)
Table[2*6^n-2^n, {n, 0, 20}] (* or *) LinearRecurrence[{8, -12}, {1, 10}, 20] (* Harvey P. Dale, Mar 17 2019 *)
PROG
(Magma) [2*6^n-2^n: n in [0..30]]; // Vincenzo Librandi, Aug 10 2013
(PARI) a(n)=2*6^n-2^n \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 26 2003
STATUS
approved