Showing posts with label Fibonacci sequence. Show all posts
Showing posts with label Fibonacci sequence. Show all posts

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.


Friday, 8 March 2019

Vishwanath Number

I came across this interesting number in a book I was reading on Mathematics. To quote from pages 97 and 98 of The Story of Numbers by Mallick Asok Kumar:
This, almost certainly, irrational number has been discovered recently by an Indian computer scientist — named Divakar Vishwanath. This number is related to “Randomised Fibonacci Sequence”. Just like the normal Fibonacci sequence (see Section 2.6.1), the randomised version also starts with first two numbers as 1, 1. Thereafter one tosses a fair coin at every stage and use the following formula to generate the sequence:$$F_n=F_{n−2}±F_{n−1} \text{ for }n≥3$$The plus sign is used if the coin shows a head and the minus sign is used if the coin shows a tail. Vishwanath has proved that if you start to generate such avsequence, then, with probability 1, the absolute value of the \(N\)-th number in the randomised sequence will be approximately equal to the \(N\)-th power of 1.13198824 . . . . The bigger the value of \(N\), the closer is the absolute value of the \(N\)-th number of the randomised sequence to the \(N\)-th power of Vishwanath number 1.13198824 . . . . This number is almost certainly an irrational number.
Bear in mind that the recent discovery referred to in the above quote is now about twenty years old. Using SageMathCell, I tested this out for N=1000. Here is the code that I used:


The above box sometimes works but is temperamental. Here is a permalink to the code at SageMathCell. Some results are as follows (note that even though the \(N\)-th term can be very large, the \(N\)-th root of the number always reins it in:

71635048983737736457508495785347136900241837532880818653 1.13724785289546
-3868701952168426630626609949500693480141855962812452339 1.13393344608014
-230368470580308360353351991114643286077160535687 1.11522481150615
-1294461166539244845628908128250544767526170899091979974739663 1.14844999189994


Increasing \(N\) to 100,000 gives the following results:
  • 1.13104709702409
  • 1.13203489558527
  • 1.12848774540983
  • 1.13268434714159
Increasing \(N\) to 500,000 gives the following results:
  • 1.13181606331044
  • 1.13153973067764
  • 1.1312382520834
  • 1.13181595957100
Thus we see that, as \(N\) increases, the values draw closer to 1.13198824 . . . While the Vishwanath Number is "almost certainly an irrational number", one wonders whether or not it is a transcendental number. There's a more details report from March 1999 on this constant here and here is a quote in part from report:
To give some idea of what this result says, the way the randomized Fibonacci sequence is generated is a bit like the daily weather at a particular location. Today's weather can be assumed to depend on the weather the previous two days, but there is a large element of chance. The analog of the number 1.13198824 . . . for the weather would give a quantitative measure of the unpredictability of weather. It measures the rate at which small disturbances explode exponentially in time. It would tell you for exactly how many days high-speed computers can forecast weather reliably. Unfortunately, nobody knows this number for global weather, and probably never will. 
Viswanath's result brings to an end a puzzle that has its origins in 1960. In that year, Hillel Furstenberg (now at the Hebrew University) and Harry Kesten (at Cornell University) showed that for a general class of random-sequence generating processes that includes the random Fibonacci sequence, the absolute value of the \(N\)-th member of the sequence will, with probability 1, get closer to the \(N\)-th power of some fixed number. (The exact formulation of their result is in terms of random matrix products, and is not for the faint-hearted. See Viswanath's paper -- cited below -- for an exact statement, or read the whole story in the book Random Products of Matrices With Applications to Infinite-Dimensional Schrodinger Operators, by P. Bougerol and J. Lacroix, published by Birkhauser, Basel, in 1984.) 
Since Furstenberg and Kesten's deep result applied to the randomized Fibonacci process, it followed that, with probability 1, the absolute value of the Nth number in any random Fibonacci sequence will get closer and closer to the Nth power of some fixed number K. But no one knew the value of the number K, or even how to calculate it. 
What Viswanath did was find a way to compute \(K\). At least, he computed the first eight decimal places. Almost certainly, \(K\) is irrational, so cannot be computed exactly. Viswanath presented his new result at a colloquium at MSRI last month. 
Since there is no known algorithm to compute \(K\), Viswanath had to adopt a circuitous route, showing that \(K\) equals \(e^P\), where \(P\) lies somewhere between 0.1239755980 and 0.1239755995 (and, as usual, \(e\) is the base for natural logarithms). Since those two numbers are equal in their first eight decimal places, that meant he could calculate \(K\) to eight decimal places. 
The process involved large doses of mathematics and some heavy duty computing. Since his computation made use of floating point arithmetic -- which is not exact -- Viswanath had to carry out a detailed mathematical analysis to obtain an upper bound on any possible errors in the computation. He describes the key to his new result this way: "The problem was that fractals were coming in the way of an exact analysis. What I did was to guess the fractal and use it to find \(K\). To do this, I made use of some devilishly clever work carried out by Furstenberg in the early 1960s." 
And with that computation, mathematics has a new constant, a direct descendent of a pair of rabbits in thirteenth century Italy.
There's not been much on the Internet about Vishwanath's Number over the subsequent twenty years. The number did get a brief mention in another blog last year but that's about it. Nonetheless, it's an interesting concept.