A091140 a(n) = 2*a(n-1) + 4*a(n-2) - 2*a(n-3) with initial terms 1, 3, 9.
1, 3, 9, 28, 86, 266, 820, 2532, 7812, 24112, 74408, 229640, 708688, 2187120, 6749712, 20830528, 64285664, 198394016, 612269632, 1889544000, 5831378496, 17996393728, 55539213440, 171401244800, 528966555904, 1632459664128, 5037983062272, 15547871669248
Offset: 1
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (2,4,-2).
Programs
-
Mathematica
a[n_] := (MatrixPower[{{1, 1, 1}, {3, 1, 0}, {2, 0, 0}}, n-1].{{1}, {1}, {1}})[[1, 1]] LinearRecurrence[{2,4,-2},{1,3,9},30] (* Harvey P. Dale, May 18 2021 *)
-
PARI
Vec(-x*(x^2-x-1)/(2*x^3-4*x^2-2*x+1) + O(x^100)) \\ Colin Barker, May 21 2015
Formula
Let v(n) be the column vector with elements r(n), s(n), t(n); then v(n) = [1 1 1 / 3 1 0 / 2 0 0] v(n-1).
The limit as n->infinity of a(n+1)/a(n) is the largest root of x^3 - 2x^2 - 4x + 2 = 0, which is about 3.086130197651494.
G.f.: -x*(x^2-x-1) / (2*x^3-4*x^2-2*x+1). - Colin Barker, May 21 2015
Comments