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
LINKS
Index entries for linear recurrences with constant coefficients, signature (14,-35,22).
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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohammad K. Azarian, Jan 29 2009
STATUS
approved