Definition:Tribonacci Sequence

Definition
The Tribonacci sequence is a sequence $\left \langle {u_n}\right \rangle$ which is formally defined recursively as:


 * $u_n = \begin{cases} 0 & : n = 0 \\

0 & : n = 1 \\ 1 & : n = 2 \\ u_{n - 1} + u_{n - 2} + u_{n - 3} & : n > 2 \end{cases}$

The Tribonacci sequence begins:
 * $0, 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, \ldots$