OFFSET
0,2
COMMENTS
Encountered during the analysis of a certain cellular automaton.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,2).
FORMULA
a(n) = 3*a(n-1) + 2*a(n-2) with a(0)=-1, a(1)=3.
a(n) = -(17+9*sqrt(17))/34*(3/2-sqrt(17)/2)^n+(-17+9*sqrt(17))/34*(3/2+sqrt(17)/2)^n. For n >= 3, a(n) = round(-17+9*sqrt(17))/34*(3/2+sqrt(17)/2)^n). - Robert Israel, Aug 27 2014
MAPLE
a:= LRETools[REtoproc](a(n)=3*a(n-1)+2*a(n-2), a(n), {a(0)=-1, a(1)=3}):
seq(a(i), i=0..100); # Robert Israel, Aug 27 2014
MATHEMATICA
CoefficientList[Series[(6 x - 1)/(1 - 3 x - 2 x^2), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 27 2014 *)
PROG
(Magma) I:=[-1, 3]; [n le 2 select I[n] else 3*Self(n-1)+2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Aug 27 2014
(PARI) Vec((-1+6*x)/(1-3*x-2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 02 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Aug 26 2014
STATUS
approved