|
|
A120748
|
|
Expansion of x^2*(1 + 2*x - x^2)/(1 - x - 3*x^2 - x^3 + x^4).
|
|
1
|
|
|
0, 1, 3, 5, 15, 32, 79, 185, 439, 1041, 2464, 5841, 13835, 32781, 77663, 184000, 435935, 1032817, 2446959, 5797345, 13735104, 32541281, 77096979, 182658581, 432755695, 1025287136, 2429115823, 5755074345, 13634953255, 32304004977, 76534823264, 181326717105
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Lim_{n->oo} a(n)/a(n-1) is 2.3692054...; largest real eigenvalue of M and a root of the characteristic polynomial x^4 - x^3 - 3x^2 - x + 1.
a(n) is the top left entry of the n-th power of the 4 X 4 matrix M = [0,1,1,0; 1,1,1,0; 0,1,0,1; 1,0,1,0].
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + 3*a(n-2) + a(n-3) - a(n-4).
|
|
EXAMPLE
|
a(8) = 439 = a(7) + 3*a(6) + a(5) - a(4) = 185 + 3*79 + 32 - 15.
|
|
MATHEMATICA
|
LinearRecurrence[{1, 3, 1, -1}, {0, 1, 3, 5}, 40] (* Amiram Eldar, Feb 28 2020 *)
|
|
PROG
|
(Magma) I:=[0, 1, 3, 5]; [n le 4 select I[n] else Self(n-1) +3*Self(n-2) +Self(n-3) -Self(n-4): n in [1..41]]; // G. C. Greubel, Nov 13 2022
(SageMath)
P.<x> = PowerSeriesRing(ZZ, prec)
return P( x^2*(1+2*x-x^2)/(1-x-3*x^2-x^3+x^4) ).list()
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|