A091142 a(n) = 2*a(n-1) + 4*a(n-2) - 2*a(n-3) with initial terms 1, 2, 6.
1, 2, 6, 18, 56, 172, 532, 1640, 5064, 15624, 48224, 148816, 459280, 1417376, 4374240, 13499424, 41661056, 128571328, 396788032, 1224539264, 3779088000, 11662756992, 35992787456, 111078426880, 342802489600, 1057933111808, 3264919328256, 10075966124544
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}})[[3, 1]]
-
PARI
Vec(-x*(2*x^2-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*(2*x^2-1) / (2*x^3-4*x^2-2*x+1). - Colin Barker, May 21 2015
Comments