3
$\begingroup$

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?

$\endgroup$

marked as duplicate by user99914, Zain Patel, Lucian, Jyrki Lahtonen Jul 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
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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) $\endgroup$ – Michael Galuza Jul 18 '15 at 16:54
  • $\begingroup$ You are saying integer square roots should not be used? $\endgroup$ – Alex S Jul 18 '15 at 16:56
  • $\begingroup$ of course no, it's my awful English. I want to say that $\sqrt5$ and $\ln\phi$ should not be used $\endgroup$ – Michael Galuza Jul 18 '15 at 17:01
0
$\begingroup$

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

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.