TITLE: Fibonacci sequence inversion
QUESTION [6 upvotes]: 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

There are other ways to compute it?

REPLY [2 votes]: You can find the index using only integer arithmetic.
Since $F_n$ is monotone one can use Binary search
using the fact that $F_i$ can be computed in $O(\log(i))$.
This method works for all monotone sequences and can be used to check if a number is in the sequence.