login
A155626
a(n) = 5^n-4^n+1.
15
1, 2, 10, 62, 370, 2102, 11530, 61742, 325090, 1690982, 8717050, 44633822, 227363410, 1153594262, 5835080170, 29443836302, 148292923330, 745759583942, 3745977788890, 18798608421182, 94267920012850, 472439111692022
OFFSET
0,2
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