OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5,-4).
FORMULA
a(n) = A002063(n) - 2. - R. J. Mathar, Jan 03 2009
a(n) = 5*a(n-1) - 4*a(n-2).
G.f.: x*(34-28*x)/((1-x)*(1-4*x)). - Vincenzo Librandi, May 03 2014
E.g.f.: 9*exp(4*x) - 2*exp(x) - 7. - Stefano Spezia, Sep 14 2024
MATHEMATICA
LinearRecurrence[{5, -4}, {34, 142}, 50] (* Vincenzo Librandi, Feb 22 2012 *)
CoefficientList[Series[(34 - 28 x )/((1 - x) (1 - 4 x)), {x, 0, 30}], x] (* Vincenzo Librandi, May 03 2014 *)
PROG
(PARI) a(n)=9*4^n-2; \\ Charles R Greathouse IV, Jan 11 2012
(Magma) I:=[34, 142]; [n le 2 select I[n] else 5*Self(n-1)-4*Self(n-2): n in [1..50]]; // Vincenzo Librandi, Feb 22 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Dec 27 2008
STATUS
approved