To be honest, I'm pretty awful at mathematics however, when up till 6AM I do like to do random things throughout the night to keep me occupied. Tonight, I began playing with the Fibonacci sequence in the Python programming language. I understand that the Fibonacci sequence is just adding the previous two numbers together to produce your next value so I defined a function to spit out the sequence up to the 200th number like so,

def fib(n):
    a, b = 0, 1
    while i < 200:
        print("ITERATION: " + str(i))
        a, b = b, a + b
        i += 1

What I found interesting is a pattern I came across when adding up the total amount of numbers before the sequence added the next digit. (see picture A.)


number sets
from there, I added up the number "sets" and the pattern emerged.(see picture B.)



This pattern continued, I went up to the 22nd "set" of numbers and the whole pattern was like so:

1 2 1 3 1 4 1 5 1 2 1 4 1 4 1 3 1 4 1 3 1 4

I found it interesting that the numbers added a digit sequentially by either 4 or mainly 5 integers and how the overall pattern that emerged out of the "sets" appeared to become less stable after the 8th set which was ironically 5;

1 2 1 3 1 4 1 5

forgive me if this seems obvious or silly, but like I said, I'm pretty bad at math. Can anyone explain why this pattern emerges and a little bit more in depth on what the fibonacci sequence can be used for?


The ratio between Fibonacci numbers soon settles down to a number close to $1.618$. This number is called the Golden Ratio.
You get an extra digit every time the Fibonacci numbers have increased by a factor 10.
$1.618^4=6.854$ and $1.618^5=11.09$
Once the ratio settles down, you get at least one extra digit every five numbers. Sometimes the extra digit arrives sooner, and you only get four numbers with so many digits.

  • $\begingroup$ @lhf Thank you guys! Makes perfect sense now! Cheers! :D $\endgroup$
    – ryanhagz
    Nov 5 '14 at 12:21
  • 1
    $\begingroup$ Bonus fact: the partial averages of the sequence 6,5,5,4,5,5,5,4... tend to $\log_\phi(10)$. Equivalently, the gradient of the side of the blue triangle of numbers in the question is $-\log_\phi(10)$. $\endgroup$ Nov 5 '14 at 16:42

Nice observation!

Here is an explanation:

The $n$-th Fibonacci number $F_n$ is asymptotically equal to $\varphi^n/\sqrt5$, where $\varphi=(1+\sqrt5)/2$. This implies that the number of digits in $F_n$, which is essentially $\log_{10} F_n$, is asymptotically equal to $n\,\log_{10}\varphi\approx0.2090\,n$. As a consequence, there are either $4$ or $5$ Fibonacci numbers with $d$ decimal digits, because $1/0.2090\approx4.785$.

[adapted from Wikipedia]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.