OFFSET
0,3
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1, 2).
FORMULA
G.f.: (-3*x^2-x-1) / (2*x^2-x-1).
a(n) = (-5*(-1 + (-2)^(n-1)))/3, for n>0. - Andres Cicuttin, Apr 15 2016
a(n) = 5 - 2*a(n-1), for n>2. - Andres Cicuttin, Apr 15 2016
MAPLE
a:= n-> `if`(n=0, 1, (<<0|1>, <2|-1>>^(n-1). <<0, 5>>)[1, 1]):
seq(a(n), n=0..30); # Alois P. Heinz, Dec 28 2010
MATHEMATICA
{1}~Join~Table[(-5 (-1 + (-2)^(n - 1)))/3, {n, 32}] (* or *)
CoefficientList[Series[(-3 x^2 - x - 1)/(2 x^2 - x - 1), {x, 0, 32}], x] (* Michael De Vlieger, Apr 15 2016 *)
CROSSREFS
KEYWORD
sign
AUTHOR
Paul Curtz, Jun 24 2008
EXTENSIONS
More terms from Alois P. Heinz, Dec 28 2010
STATUS
approved