# How do you determine if a number is a even Fibonacci number or not? [duplicate]

This question already has an answer here:

Rather than computing out the whole Fibonacci sequence and check if $n$ is even and in there, is there a more straightforward way to compute if $n$ is a even Fibonacci number?

## marked as duplicate by user99914, Zain Patel, Lucian, Jyrki LahtonenJul 18 '15 at 16:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 2 Answers

The $n^\text {th}$ Fibonacci number is given by $$F_n=\frac {\phi^n-(-\phi)^{-n}}{\sqrt {5}},$$ where $\phi$ is the golden ratio. If your number is $x$, then you could try $$\frac {\cosh^{-1}(\sqrt {5}x/2)}{\ln\phi}.$$ If this is an even integer, then $x$ is a Fibonacci number. Also if $$\frac {\sinh^{-1}(\sqrt {5}x/2)}{\ln\phi}$$ is odd.

• It's definitely true, but I don't think that using of golden ratio is a good idea. In my opinion, question related to very big numbers (small numbers we can find in a table or check OEIS for its), and you should use only integer operations (even if it's integer square root) – Michael Galuza Jul 18 '15 at 16:54
• You are saying integer square roots should not be used? – Alex S Jul 18 '15 at 16:56
• of course no, it's my awful English. I want to say that $\sqrt5$ and $\ln\phi$ should not be used – Michael Galuza Jul 18 '15 at 17:01

Hint: $~F_n~\simeq~\dfrac{\phi^n}{\sqrt5}$

• Improve your wiki skills! ) – Michael Galuza Jul 18 '15 at 16:50