OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,2).
FORMULA
a(n) = (8-5(-2)^n)/3.
G.f.: (1+7x)/((1-x)(1+2x)).
E.g.f.: (8*exp(x)-5*exp(-2*x))/3.
MATHEMATICA
Table[(8 - 5 (-2)^n)/3, {n, 0, 40}] (* or *) CoefficientList[Series[(1 + 7 x)/((1 - x) (1 + 2 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 23 2014 *)
PROG
(Magma) [(8-5*(-2)^n)/3: n in [0..40]]; // Vincenzo Librandi, Aug 23 2014
(PARI) a(n)=8/3-5*(-2)^n/3 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, May 01 2003
STATUS
approved