OFFSET
2,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 2..1000
Index entries for linear recurrences with constant coefficients, signature (20, -109, 90).
FORMULA
a(n) = (10^n - 1) - 9^n.
a(n) = 20*a(n-1) - 109*a(n-2) + 90*a(n-3) with a(2)=18, a(3)=270, a(4)=3438. - Harvey P. Dale, Sep 05 2015
G.f.: 18*x^2*(1 - 5*x) / ((1 - x)*(1 - 9*x)*(1 - 10*x)). - Colin Barker, Jul 29 2017
MATHEMATICA
Table[10^n-9^n-1, {n, 2, 20}] (* or *) LinearRecurrence[{20, -109, 90}, {18, 270, 3438}, 20] (* Harvey P. Dale, Sep 05 2015 *)
PROG
(Magma) [(10^n-1)-9^n: n in [2..20]]; // Vincenzo Librandi, Jul 29 2017
(PARI) Vec(18*x^2*(1 - 5*x) / ((1 - x)*(1 - 9*x)*(1 - 10*x)) + O(x^30)) \\ Colin Barker, Jul 29 2017
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 01 2003
EXTENSIONS
More terms from Michel ten Voorde Jun 13 2003
STATUS
approved