OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2).
FORMULA
a(0) = 1, a(1) = 5, a(n+1) = 2*a(n) + 4, for n >= 1.
a(n) = 9*2^(n-1) - 4, n >= 1.
a(n) = 4*n + Sum[i = 0, n - 1] a(i). - Jon Perry, Nov 20 2012
a(n) = A048491(n)/2, n>0. - Philippe Deléham, Apr 15 2013
G.f.: (1+x)^2/((1-x)*(1-2*x)). - Philippe Deléham, Apr 15 2013
a(n) = 3*a(n-1) - 2*a(n-2) with a(0)=1, a(1)=5, a(2)=14. - Philippe Deléham, Apr 15 2013
E.g.f.: (1 - 8*exp(x) + 9*exp(2*x))/2. - Stefano Spezia, Sep 28 2022
MATHEMATICA
Join[{1}, LinearRecurrence[{3, -2}, {5, 14}, 50]] (* G. C. Greubel, Sep 03 2018 *)
PROG
(PARI) m=30; v=concat([5, 14], vector(m-2)); for(n=3, m, v[n] = 3*v[n-1] -2*v[n-2]); concat([1], v) \\ G. C. Greubel, Sep 03 2018
(Magma) I:=[5, 14]; [1] cat [n le 2 select I[n] else 3*Self(n-1) - 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Sep 03 2018
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1+x)^2)/((1-x)*(1-2*x))); // Marius A. Burtea, Oct 15 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Asher Auel (asher.auel(AT)reed.edu), Dec 14 1999
STATUS
editing