Method for soliving the tribonacci Binet in Mathematica



This method for solving the tribonacci Binet in Mathematica
is different than the method here:
http://mathworld.wolfram.com/TribonacciNumber.html

I used the Matrix Markov version as the solution set and solved for the
coefficients {x,y,z}.
Except for the negative one , the output which has small complex
residues in Mathematica
is the same. It works...
{-1, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, 1705, 3136, 5768,
10609, 19513, 35890, 66012, 121415, 223317, 410744, 755476}
Notebook:
M = {{0, 1, 0}, {0, 0, 1}, {1, 1, 1}}
w[0] = {0, 1, 1};
w[n_] := w[n] = M.w[n - 1]
a0 = Table[w[n][[1]], {n, 0, 25}]
b0 = 1.8392867552141612`;
b1 = -0.4196433776070806` - 0.6062907292071994` I;
b2 = -0.4196433776070806` + 0.6062907292071994` I;
g[n_] := N[(x*b0^n - y*b1^n - z*b2^n)];
digits = 200
a = Table[g[n], {n, 1, 25}]
(* here I solve it three times and get the same answers*)
Solve[Table[a[[n]] - a0[[n]] == 0, {n, 1, 3}], {x, y, z}]
Solve[Table[a[[n]] - a0[[n]] == 0, {n, 2, 4}], {x, y, z}]
Solve[Table[a[[n]] - a0[[n]] == 0, {n, 3, 5}], {x, y, z}]
x = 0.18280353296829546; y =
0.09140176648414754`\[InvisibleSpace]+ 0.34054653082707936` \
\[ImaginaryI];
z = 0.0914017664841477`\[InvisibleSpace]- 0.3405465308270794`
\[ImaginaryI];

a2 = Table[Floor[Re[g[n]]], {n, 1, 25}]

Roger L. Bagula { email: rlbagula@xxxxxxxxxxxxx or rlbagulatftn@xxxxxxxxx }

11759 Waterhill Road,
Lakeside, Ca. 92040 telephone: 619-561-0814
.