Skip to main content
3 of 4
edited body
Tony Huynh
  • 32.1k
  • 11
  • 112
  • 187

Fibonacci sequence inversion

How do I get the index in the sequence from the Fibonacci number?

0 1 1 2 3 5 8 13 21 34...

For example

N(3) = 4 (starting from zero)

N(34) = 9 (starting from zero)

..

N(X) = ?

I've seen an equation in wikipedia

alt text http://upload.wikimedia.org/math/4/6/2/462ccc015b0168c2838cc212ccea259e.png

There are other ways to compute it?