A091141 a(n) = 2*a(n-1) + 4*a(n-2) - 2*a(n-3) with initial terms 1, 4, 13.
1, 4, 13, 40, 124, 382, 1180, 3640, 11236, 34672, 107008, 330232, 1019152, 3145216, 9706576, 29955712, 92447296, 285304288, 880486336, 2717295232, 8385927232, 25880062720, 79869243904, 246486884224, 760690618624, 2347590286336, 7244969278720, 22358918465536
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}})[[2, 1]] LinearRecurrence[{2,4,-2},{1,4,13},30] (* Harvey P. Dale, Jun 19 2018 *)
-
PARI
Vec(x*(x+1)^2/(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+1)^2 / (2*x^3-4*x^2-2*x+1). - Colin Barker, May 21 2015
Comments