OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-4).
FORMULA
a(n) = 4*(a(n-1) - 3) with n > 0, a(0)=5.
G.f.: ( 5-17*x ) / ( (1-4*x)*(1-x) ). - R. J. Mathar, Jan 05 2011
a(n) = 5*a(n-1) - 4*a(n-2). - Vincenzo Librandi, Jun 18 2013
E.g.f.: exp(4*x) + 4*exp(x). - G. C. Greubel, Jan 27 2019
MATHEMATICA
Table[4^n +4, {n, 0, 40}] (* or *) CoefficientList[Series[(5-17x)/((4x - 1)(x-1)), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 18 2013 *)
LinearRecurrence[{5, -4}, {5, 8}, 30] (* Harvey P. Dale, Sep 12 2023 *)
PROG
(Magma)[4^n+4: n in [0..35]];
(Magma) I:=[5, 8]; [n le 2 select I[n] else 5*Self(n-1)-4*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 18 2013
(PARI) vector(40, n, n--; 4^n+4) \\ G. C. Greubel, Jan 27 2019
(Sage) [4^n+4 for n in range(40)] # G. C. Greubel, Jan 27 2019
(GAP) List([0..30], n -> 4^n + 4); # G. C. Greubel, Jan 27 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Dec 25 2010
STATUS
approved