OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..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(1) = 9, a(2) = 12. - Harvey P. Dale, May 09 2012
From G. C. Greubel, Sep 01 2016: (Start)
a(n) = (3/2)*(4 + 2^n).
G.f.: 3*x*(3 - 5*x)/((1 - x)*(1 - 2*x)).
E.g.f.: (3/2)*(-5 + 4*exp(x) + exp(2*x)). (End)
MATHEMATICA
a=9; lst={a}; Do[a=(a-2)*2-2; AppendTo[lst, a], {n, 6!}]; lst
NestList[2#-6&, 9, 30] (* or *) LinearRecurrence[{3, -2}, {9, 12}, 31]
Table[ (3/2)*(4 + 2^n), {n, 1, 25}] (* G. C. Greubel, Sep 01 2016 *)
PROG
(Magma) I:=[9, 12]; [n le 2 select I[n] else 3*Self(n-1)-2*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Sep 01 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jan 03 2009
EXTENSIONS
Definition adapted to offset by Georg Fischer, Jun 18 2021
STATUS
approved