Friday, 12 July 2019

Finding Fibonacci and Tribonacci Seed Numbers

Today I turned 25667 days old. This number is prime but there is little of interest to be found concerning its properties in either the OEIS or NumbersAplenty, my usual resources. For a while now, the idea that every number could be considered as being part of a Fibonacci sequence has been knocking around in my head.

Today the idea came into focus when I started to look at 25667 in this light. I knew that the ratio of consecutive terms in a Fibonacci sequence approached closer and closer to the Golden Ratio as the terms got larger. I figured I'd use this property to find the previous term.$$ \frac{25667}{\frac{1+ \sqrt {5}}{2}} \approx 15863.0783892436$$Rounding to the nearest whole number gives 15863 and from there it is easy to reverse engineer the remaining terms until a point is reached where the previous term is larger than the subsequent term. This is the point at which the algorithm I developed will stop.

Here is the SageMathCell permalink to the algorithm and Figure 1 shows a screenshot of the SageMath code.

Figure 1

The sequence of Fibonacci terms is:

25667 15863 9804 6059 3745 2314 1431 883 548 335 213 122 91 31

The two seed numbers are 31 and 91. Different numbers produce different sequences, even when only differing by 1. Consider the sequences for the two previous numbers: 25666 and 25665.

25666 15862 9804 6058 3746 2312 1434 878 556 322 234 88

25665 15862 9803 6059 3744 2315 1429 886 543 343 200 143 57

Of course, changing the manner in which the immediate predecessor of the starting number is calculated can affect the sequence. Suppose instead of rounding the decimal number, we simply truncated it, discarding the decimal part and leaving only the whole number. In the examples cited, the sequence remains the same for 25667 and 25666 but there is a difference in the case of 25655.

25665 15861 9804 6057 3747 2310 1437 873 564 309 255 54

The reason is that the decimal number is 15861.8423212660, so that rounding produces 15862 whereas truncating produces 15861. I think rounding is the better way to calculate the immediate predecessor of the starting number because this gives a result that is closest to the Golden Ration when the two numbers are compared. This benefit is clearly seen when a number from the classic Fibonacci sequence is entered e.g. 6765.

6765 4181 2584 1597 987 610 377 233 144 89 55 34 21 13 8 5 3 2 1 
(using rounding)

6765 4180 2585 1595 990 605 385 220 165 55 
(using truncation)

Now every number can be associated with two seed numbers so that the three of them form part of a Fibonacci sequence.



Of course, the idea can be extended to tribonacci numbers with a slight modification of the code. Information about the tribonacci constant can be found here. Here is a permalink to the SageMathCell code and Figure 2 shows a screenshot of the SageMath code:

Figure 2

The sequence of tribonacci terms is:

25667 13955 7587 4125 2243 1219 663 361 195 107 59 29 19 11

So every number can be associated with three tribonacci seed numbers.


No comments:

Post a Comment