At this wolfram link the formula for the kth n-anacci number is given:
Not sure if I understand correctly. If I want the fifth tribonacci (n=3) number does the following do the trick?
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.