# Tribonacci Sequence Term

A tribonacci sequence is a sequence of numbers such that each term from the fourth onward is the sum of the previous three terms. The first three terms in a tribonacci sequence are called its seeds For example, if the three seeds of a tribonacci sequence are $1,2$,and $3$, it's 4th terms is $6$
($1+2+3$),then $11(2+3+6)$.

Find the smallest 5 digit term in a tribonacci sequence if the seeds are $6,19,22$

I'm having trouble with this. I don't know where to start. The formula for the tribonacci sequence in relation to its seeds is $$u_{n+3} = u_{n} + u_{n+1} + u_{n+2}$$ This tribonacci formula holds for all integer $n$. But that's all I know how to work out. And just if it helps, the next few numbers in the sequence mentioned in the question are $47,88,157,292$. Is there some shortcut to it, because I need to show some working out and having two pages full of addition doesn't sound very easy to mark, does it?

• Just keep going... – Angina Seng May 14 '17 at 8:28
• The terms in such a sequence will grow exponentially & you will reach $10000+$ quite quickly. ... A general formula will not look nice & the quickest route to victory will be direct computation. So follow Lord Sharks advise. – Donald Splutterwit May 14 '17 at 8:33

In this paper, the authors show that, if $S_1,S_2,S_3$ are the seeds, then

$$S_n=T_{n-2}\,S_1+(T_{n-2}+T_{n-3})\,S_2+T_{n-1}\,S_3$$ where $T_k$ is the "usual" Tribonacci number.

Applied to the seeds you give, this generates the following values $$\left( \begin{array}{ccc} n & T_n & S_n \\ 1 & 0 & 6 \\ 2 & 1 & 19 \\ 3 & 1 & 22 \\ 4 & 2 & 47 \\ 5 & 4 & 88 \\ 6 & 7 & 157 \\ 7 & 13 & 292 \\ 8 & 24 & 537 \\ 9 & 44 & 986 \\ 10 & 81 & 1815 \end{array} \right)$$

Hoping that this could help. Just continue for a few terms to get the answer.

Edit

In this paper, the author shows that $$\lim_{n\to \infty } \, \frac{S_{n+1}}{S_{n}}=\lim_{n\to \infty } \, \frac{T_{n+1}}{T_{n}}=\tau=\frac{1}{3} \left(1+\sqrt[3]{19-3 \sqrt{33}}+\sqrt[3]{19+3 \sqrt{33}}\right)$$ which is $\approx 1.83929$. This could also help you to find your result.

Using the last term you provided, making the approximation $S_n=\text{Round}\left[292 \tau ^{n-7}\right]$, the next terms would be $537, 988, 1817$.

By the theory of linear recurrences, the sequence approximately follows a geometric progression

$$u_n=ar^n$$ where $r$ is the largest root of $r^3=r^2+r+1$, which is about $1.8392867552142$.

With $u_7=292$, we estimate $a=4.1005$.

Then we can expect $u_n\ge10000$ for

$$n\ge\frac{\log 10000-\log a}{\log r}=12.798\cdots$$

Indeed,

$$1\to 6\\ 2\to 19\\ 3\to 22\\ 4\to 47\\ 5\to 88\\ 6\to 157\\ 7\to 292\\ 8\to 537\\ 9\to 986\\ 10\to 1815\\ 11\to 3338\\ 12\to 6139\\ 13\to 11292\\$$

Here is a little python program for your particular tribonacci sequence. You first seed your list with the start values (in your case 6,19,22). The you load your variables with them (a,b,c) and you define how the variables will be updated: a will be the sum of a+b+c in the next iteration. b will be set to the old value of a, and c will be set to the old value of b. Then the process repeats (I have set the repetition to 40 times, but it can be anything. The results are stored in a list called "result". At the end you read them out numerically.

result=[6,19,22]
a,b,c=result[-1],result[-2],result[-3]
for i in range(40):
a,b,c=a+b+c,a,b
result.append(a)
for e,f in enumerate(result,1):
print e,f


You get the following result:

1 6

2 19

3 22

4 47

5 88

6 157

7 292

8 537

9 986

10 1815

11 3338

12 6139

13 11292

...

I did not understand exactly what the question is, but the following result may be useful (I do not quote the proof):

Tribonacci

The formula for calculating the nth term is equivalent to the following relationships where only one cubic constant is used instead of three.

$$q=\left(19–3\sqrt{33}\right)^{\frac{1}{3}}$$b=(1+q+4/q)/3$$$T_{n}=\text{round}( ((b–1)/(4b–6))×b^n )$$ (Note: round$(r)=int(r+1/2), r\ge 0\$)