Solve for n in golden ratio fibonacci equation

434 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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$.

Therefore I tried

$$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.