Finding the kth n-anacci number

226 Views Asked by At

At this wolfram link the formula for the kth n-anacci number is given:

http://mathworld.wolfram.com/Fibonaccin-StepNumber.html#eqn8

(Eq. 4)

Not sure if I understand correctly. If I want the fifth tribonacci (n=3) number does the following do the trick?

$$F_5^{(3)}=\sum_{i=1}^{3}\frac{x^5_i}{-x_i^2+4x_i-1}$$

But then what are the $x_i$? I understand that they are the roots of the polynomial $x^n(2-x)=1$ (Eq. 2 at the link) but the only really important root here is the n-anacci constant (which for eg. is $\phi$, the golden ratio, when n=2). I'm not even sure how to get my software to spit out the other roots.