login
A155622
a(n) = 11^n - 2^n + 1.
12
1, 10, 118, 1324, 14626, 161020, 1771498, 19487044, 214358626, 2357947180, 25937423578, 285311668564, 3138428372626, 34522712135740, 379749833566858, 4177248169382884, 45949729863506626, 505447028499162700
OFFSET
0,2
COMMENTS
In general: r^n - s^n + 1 = (r+s)*a(n-1)-(r*s)*a(n-2)+(r-1)*(s-1). - Vincenzo Librandi, Jul 21 2010
FORMULA
G.f.: 1/(1 - 11*x) - 1/(1 - 2*x) + 1/(1-x).
E.g.f.: exp(11*x) - exp(2*x) + exp(x).
a(n) = 13*a(n-1) - 22*a(n-2) + 10 for n>1, a(0)=1, a(1)=10. - Vincenzo Librandi, Jul 21 2010
MATHEMATICA
Table[11^n - 2^n + 1, {n, 0, 20}] (* or *) LinearRecurrence[{14, -35, 22}, {1, 10, 118}, 20] (* Harvey P. Dale, Oct 21 2013 *)
PROG
(PARI) a(n)=11^n-2^n+1 \\ Charles R Greathouse IV, Jun 11 2015
KEYWORD
nonn,easy
AUTHOR
Mohammad K. Azarian, Jan 29 2009
STATUS
approved