OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (10,-29,20).
FORMULA
G.f.: 1/(1-5*x)-1/(1-4*x)+1/(1-x).
E.g.f.: e^(5*x)-e^(4*x)+e^x.
a(n) = 9*a(n-1)-20*a(n-2)+12 with a(0)=1, a(1)=2. - Vincenzo Librandi, Jul 21 2010
a(n) = 10*a(n-1)-29*a(n-2)+20*a(n-3). - Wesley Ivan Hurt, Jun 07 2021
MATHEMATICA
Table[5^n-4^n+1, {n, 0, 40}] (* Vladimir Joseph Stephan Orlovsky, Feb 15 2011*)
LinearRecurrence[{10, -29, 20}, {1, 2, 10}, 30] (* Harvey P. Dale, Oct 11 2023 *)
PROG
(PARI) a(n)=5^n-4^n+1 \\ Charles R Greathouse IV, Jun 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohammad K. Azarian, Jan 29 2009
STATUS
approved