A087798 a(n) = 9*a(n-1) + a(n-2), starting with a(0) = 2 and a(1) = 9.
2, 9, 83, 756, 6887, 62739, 571538, 5206581, 47430767, 432083484, 3936182123, 35857722591, 326655685442, 2975758891569, 27108485709563, 246952130277636, 2249677658208287, 20494051054152219, 186696137145578258
Offset: 0
Examples
a(4) = 9*a(3) + a(2) = 9*756 + 83 = 6887.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Tanya Khovanova, Recursive Sequences
- Index entries for recurrences a(n) = k*a(n - 1) +/- a(n - 2)
- Index entries for linear recurrences with constant coefficients, signature (9,1).
Crossrefs
Cf. A014511.
Programs
-
Magma
I:=[2,9]; [n le 2 select I[n] else 9*Self(n-1)+Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 19 2016
-
Mathematica
RecurrenceTable[{a[0] == 2, a[1] == 9, a[n] == 9 a[n-1] + a[n-2]}, a, {n, 30}] (* Vincenzo Librandi, Sep 19 2016 *) LinearRecurrence[{9,1}, {2,9}, 30] (* G. C. Greubel, Nov 07 2018 *)
-
PARI
x='x+O('x^30); Vec((2-9*x)/(1-9*x-x^2)) \\ G. C. Greubel, Nov 07 2018
Formula
a(n) = ((9 + sqrt(85))/2)^n + ((9 - sqrt(85))/2)^n.
G.f.: (2 - 9*x)/(1 - 9*x - x^2). - Philippe Deléham, Nov 02 2008
From Johannes W. Meijer, Jun 12 2010: (Start)
Extensions
More terms from Ray Chandler, Nov 06 2003
Comments