# Solve for n in golden ratio fibonacci equation

To calculate the $n^{th}$ Fibonacci number, I can use the golden ratio.

\begin{align*} F_n=\frac{1}{\sqrt{5}}\bigg[\Big(\frac{1+\sqrt5}{2}\Big)^n-\Big(\frac{1-\sqrt5}{2}\Big)^n\bigg] \end{align*}

I can not figure out how to solve for $n$ in this equation.

Is there a way to take the log of the right-hand side?

• – lhf
Commented Apr 11, 2017 at 23:44
• @ZacharySelk Yes you are right. My comment was pointless and I deleted it. Commented Apr 12, 2017 at 0:00
• For any nontrivial n, the contribution of the second term is tiny, so you can just multiply by sqrt(5), and take the base [1+sqrt(5)]/2 logarithm.
– TMM
Commented Apr 12, 2017 at 0:25

If I understand correctly, you have a number $F_n$ that is known to be a Fibonacci number and you would like to find the value of $n$. Clearly, extracting the $n$ from the Binet formula is tricky at best. The way around this is as follows: in my experience, the Binet equation can be written as
$$F_n=\text{round} (\phi^n/\sqrt{5})$$
where $\phi=(1+\sqrt{5})/2$.
$$n=\text{round} \left(\ln(\sqrt{5}\cdot F_n)/\ln \ \phi\right)$$
I have found empirically that this works for all $n>1$. I see that the problem was solved exactly on the Wiki page pointed out elsewhere on this post, but the presence of the $\pm$ leaves some ambiguity. The present solution seems to be more to the point.