# [Haskell-cafe] More on Fibonacci numbers

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Wed Nov 7 07:30:19 EST 2007

```Andrew Bromage:

> I do note that nobody has tried it with continued fractions yet.

Now, it depends... If we take the PHI expansion as a CF: 1,1,1,1,1,... then
the convergents constitue the (rations of) Fibonaccis, but it goes through
the standard recurrence, so it is not so fancy.

But we can take a decent representation of the Rabbit Number, in binary:
0.101101011011010110101101101011...., and then develop it in CF, which will
give
[0; 1, 2, 2, 4, 8, 32, 256, ...],
then we find that those numbers are powers of Fibonaccis, 8=2^3, 32=2^5,
256=2^8, the next is 2^13, etc. It suffices to take the binary logarithm
and the problem is solved. This is an industrial-strength, serious
algorithm, involving lazy Rabbit Sequences, infinite Continued Fractions and
Binary Logarithms, so everybody sees that it will for sure contribute to the
Progress of the Western Civilization. I leave the homework for some
Haskell newbies who want to become famous.

Anyway, if somebody finds in his/her library The Fibonacci Quarterly, there