OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (11, -10).
FORMULA
a(n) = (10^(n-1)-1)/9 for n > 2.
From Chai Wah Wu, Jun 20 2016: (Start)
a(n) = 11*a(n-1) - 10*a(n-2) for n > 3.
G.f.: (40*x^3 - 24*x^2 - 17*x + 2)/((x - 1)*(10*x - 1)). (End)
MATHEMATICA
CoefficientList[Series[(40 x^3 - 24 x^2 - 17 x + 2) / ((x - 1) (10 x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 21 2016 *)
LinearRecurrence[{11, -10}, {2, 5, 11, 111}, 20] (* Harvey P. Dale, Feb 01 2024 *)
PROG
(Magma) I:=[2, 5, 11, 111]; [n le 4 select I[n] else 11*Self(n-1)-10*Self(n-2): n in [1..25]]; // Vincenzo Librandi, Jun 21 2016
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Mar 30 2002
EXTENSIONS
More terms from Patrick De Geest, Jun 11 2003
STATUS
approved