General tribonacci explicit formula I have been thinking about finding an explicit formula for the tribonacci numbers, where, namely:
$$a_n = a_{n-1}+a_{n-2}+a_{n-3}$$
and $a_1 = 0, a_1 = 1, a_2 = 1.$ Obviously, these beginning terms can be shifted, but we'll leave them as such for now.
This has proven difficult, and I'm still not sure how it's done, but what about the general sequence:
$$a_n = xa_{n-1}+ya_{n-2}+za_{n-3}$$
With arbitrary $a_1, a_2,$ and $a_3.$ How is a tribonacci explicit formula calculated?
Cheers.
 A: Please see https://www.fq.math.ca/Scanned/36-2/wolfram.pdf in The Fibonacci Quarterly, sub-section 6.2.2. That approach also considers having initial functions instead of any given initial values.
Changing the constant coefficients to $x$, $y$ and $z$ from 1 can be solved similarly.
Specifically, we are seeking a solution for $f$ where $f: \Re \rightarrow \Im$  which  has the property
\begin{equation} \label{rec-eq}
f(x) = \sum_{1 \leq l \leq 3}~f(x - l)
\end{equation} where  $f(0)$, $f(1)$ and $f(2)$ are given initial values.
The real root of the associated characteristic equation $x^3 - x^2 - x - 1 = 0$ is
$r_1 = \frac{1 + (19 - 3\sqrt{33})^{\frac{1}{3}} + (19 + 3\sqrt{33})^{\frac{1}{3}}}{3}$. The approximate values of the complex roots
are $-0.419643377607081 \pm 0.606290729207199 i$.
A general solution is
$f(x) = K_1 r_1^x  + K_2 r_1^{\frac{-x}{2}}\cos (\theta x) +
r_1^{\frac{-x}{2}} \left( \frac{K_2\left(\frac{1 -r_1}{2}\right) + 
K_3}{\sqrt{\frac{1}{r_1} - \left(\frac{r_1 - 1}{2}\right)^2}} \right) 
\sin (\theta x)$ where $\theta =\arccos \left(\frac{1 - r_1}{2}
\sqrt{r_1}\right)$ and $K_1$, $K_2$ and $K_3$ are solutions to the system
$\left[ \begin{array}{ccc}
1 & 1 & 0\\
r_1 -1 & -r_1 & 1\\
\frac{1}{r_1} & 0 & -r_1
\end{array}\right]
\left[\begin{array}{c}
K_1\\ K_2\\ K_3
\end{array}\right] =
\left[\begin{array}{c}
f(0)\\ f(1) - f(0)\\ f(2) - f(1) - f(0)
\end{array}\right].
$
