Given a Fibonacci number, find what number in the sequence it is [duplicate]












0












$begingroup$



This question already has an answer here:




  • How can I find an inverse to the Binet formula?

    2 answers




I came across the formula for the $n$th Fibonacci number:



$$frac{Phi^n-(-Phi)^n}{sqrt5} = x,$$



where $x$ is the $n$th Fibonacci number.



This formula works one way around, but I cannot seem to get it to flip around. How would I go about isolating $n$?










share|cite|improve this question











$endgroup$



marked as duplicate by José Carlos Santos, Ross Millikan, Milo Brandt, Lee Mosher, Eevee Trainer Jan 10 at 2:50


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.


















  • $begingroup$
    Set $phi = 1/Phi$ and take cases for $n$ even and odd.
    $endgroup$
    – Eelvex
    Jan 10 at 0:22










  • $begingroup$
    $n={{log left(-{{sqrt{5,x^2pm 4}pmsqrt{5},x}over{2}}right) }over{log {it Phi}}}$
    $endgroup$
    – Eelvex
    Jan 10 at 0:34












  • $begingroup$
    See en.wikipedia.org/wiki/Fibonacci_number#Identification
    $endgroup$
    – lhf
    Jan 10 at 0:36
















0












$begingroup$



This question already has an answer here:




  • How can I find an inverse to the Binet formula?

    2 answers




I came across the formula for the $n$th Fibonacci number:



$$frac{Phi^n-(-Phi)^n}{sqrt5} = x,$$



where $x$ is the $n$th Fibonacci number.



This formula works one way around, but I cannot seem to get it to flip around. How would I go about isolating $n$?










share|cite|improve this question











$endgroup$



marked as duplicate by José Carlos Santos, Ross Millikan, Milo Brandt, Lee Mosher, Eevee Trainer Jan 10 at 2:50


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.


















  • $begingroup$
    Set $phi = 1/Phi$ and take cases for $n$ even and odd.
    $endgroup$
    – Eelvex
    Jan 10 at 0:22










  • $begingroup$
    $n={{log left(-{{sqrt{5,x^2pm 4}pmsqrt{5},x}over{2}}right) }over{log {it Phi}}}$
    $endgroup$
    – Eelvex
    Jan 10 at 0:34












  • $begingroup$
    See en.wikipedia.org/wiki/Fibonacci_number#Identification
    $endgroup$
    – lhf
    Jan 10 at 0:36














0












0








0





$begingroup$



This question already has an answer here:




  • How can I find an inverse to the Binet formula?

    2 answers




I came across the formula for the $n$th Fibonacci number:



$$frac{Phi^n-(-Phi)^n}{sqrt5} = x,$$



where $x$ is the $n$th Fibonacci number.



This formula works one way around, but I cannot seem to get it to flip around. How would I go about isolating $n$?










share|cite|improve this question











$endgroup$





This question already has an answer here:




  • How can I find an inverse to the Binet formula?

    2 answers




I came across the formula for the $n$th Fibonacci number:



$$frac{Phi^n-(-Phi)^n}{sqrt5} = x,$$



where $x$ is the $n$th Fibonacci number.



This formula works one way around, but I cannot seem to get it to flip around. How would I go about isolating $n$?





This question already has an answer here:




  • How can I find an inverse to the Binet formula?

    2 answers








inverse fibonacci-numbers






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 10 at 0:22









David G. Stork

10.9k31432




10.9k31432










asked Jan 10 at 0:06









Random ChannelRandom Channel

1033




1033




marked as duplicate by José Carlos Santos, Ross Millikan, Milo Brandt, Lee Mosher, Eevee Trainer Jan 10 at 2:50


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.









marked as duplicate by José Carlos Santos, Ross Millikan, Milo Brandt, Lee Mosher, Eevee Trainer Jan 10 at 2:50


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.














  • $begingroup$
    Set $phi = 1/Phi$ and take cases for $n$ even and odd.
    $endgroup$
    – Eelvex
    Jan 10 at 0:22










  • $begingroup$
    $n={{log left(-{{sqrt{5,x^2pm 4}pmsqrt{5},x}over{2}}right) }over{log {it Phi}}}$
    $endgroup$
    – Eelvex
    Jan 10 at 0:34












  • $begingroup$
    See en.wikipedia.org/wiki/Fibonacci_number#Identification
    $endgroup$
    – lhf
    Jan 10 at 0:36


















  • $begingroup$
    Set $phi = 1/Phi$ and take cases for $n$ even and odd.
    $endgroup$
    – Eelvex
    Jan 10 at 0:22










  • $begingroup$
    $n={{log left(-{{sqrt{5,x^2pm 4}pmsqrt{5},x}over{2}}right) }over{log {it Phi}}}$
    $endgroup$
    – Eelvex
    Jan 10 at 0:34












  • $begingroup$
    See en.wikipedia.org/wiki/Fibonacci_number#Identification
    $endgroup$
    – lhf
    Jan 10 at 0:36
















$begingroup$
Set $phi = 1/Phi$ and take cases for $n$ even and odd.
$endgroup$
– Eelvex
Jan 10 at 0:22




$begingroup$
Set $phi = 1/Phi$ and take cases for $n$ even and odd.
$endgroup$
– Eelvex
Jan 10 at 0:22












$begingroup$
$n={{log left(-{{sqrt{5,x^2pm 4}pmsqrt{5},x}over{2}}right) }over{log {it Phi}}}$
$endgroup$
– Eelvex
Jan 10 at 0:34






$begingroup$
$n={{log left(-{{sqrt{5,x^2pm 4}pmsqrt{5},x}over{2}}right) }over{log {it Phi}}}$
$endgroup$
– Eelvex
Jan 10 at 0:34














$begingroup$
See en.wikipedia.org/wiki/Fibonacci_number#Identification
$endgroup$
– lhf
Jan 10 at 0:36




$begingroup$
See en.wikipedia.org/wiki/Fibonacci_number#Identification
$endgroup$
– lhf
Jan 10 at 0:36










1 Answer
1






active

oldest

votes


















0












$begingroup$

A "practical" solution could be the following:



For large enough $n$, you can write the $n^{th}$ Fibonacci number as $$y_n = frac{1}{sqrt{5}} left( frac{1+sqrt{5}}{2} right)^{n+1}$$ where index $n$ starts from 0.



Now you can solve for $n$ from $y_n = x$ as:



$$ n = frac{log(x sqrt{5})}{log( (1+sqrt{5})/2)} - 1 = frac{log(x) + 0.8047}{0.4812}-1 = 2.0781log(x)+0.6723$$.



The $log$ is the natural logarithm. You can round the above expression to the nearest integer.



For example, with $x=233$, I get $n=12.0001$, which I can round off to 12. Indeed, with the 0 based indexing, $y_{n+1} = y_{13} = 233$.






share|cite|improve this answer









$endgroup$




















    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0












    $begingroup$

    A "practical" solution could be the following:



    For large enough $n$, you can write the $n^{th}$ Fibonacci number as $$y_n = frac{1}{sqrt{5}} left( frac{1+sqrt{5}}{2} right)^{n+1}$$ where index $n$ starts from 0.



    Now you can solve for $n$ from $y_n = x$ as:



    $$ n = frac{log(x sqrt{5})}{log( (1+sqrt{5})/2)} - 1 = frac{log(x) + 0.8047}{0.4812}-1 = 2.0781log(x)+0.6723$$.



    The $log$ is the natural logarithm. You can round the above expression to the nearest integer.



    For example, with $x=233$, I get $n=12.0001$, which I can round off to 12. Indeed, with the 0 based indexing, $y_{n+1} = y_{13} = 233$.






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      A "practical" solution could be the following:



      For large enough $n$, you can write the $n^{th}$ Fibonacci number as $$y_n = frac{1}{sqrt{5}} left( frac{1+sqrt{5}}{2} right)^{n+1}$$ where index $n$ starts from 0.



      Now you can solve for $n$ from $y_n = x$ as:



      $$ n = frac{log(x sqrt{5})}{log( (1+sqrt{5})/2)} - 1 = frac{log(x) + 0.8047}{0.4812}-1 = 2.0781log(x)+0.6723$$.



      The $log$ is the natural logarithm. You can round the above expression to the nearest integer.



      For example, with $x=233$, I get $n=12.0001$, which I can round off to 12. Indeed, with the 0 based indexing, $y_{n+1} = y_{13} = 233$.






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        A "practical" solution could be the following:



        For large enough $n$, you can write the $n^{th}$ Fibonacci number as $$y_n = frac{1}{sqrt{5}} left( frac{1+sqrt{5}}{2} right)^{n+1}$$ where index $n$ starts from 0.



        Now you can solve for $n$ from $y_n = x$ as:



        $$ n = frac{log(x sqrt{5})}{log( (1+sqrt{5})/2)} - 1 = frac{log(x) + 0.8047}{0.4812}-1 = 2.0781log(x)+0.6723$$.



        The $log$ is the natural logarithm. You can round the above expression to the nearest integer.



        For example, with $x=233$, I get $n=12.0001$, which I can round off to 12. Indeed, with the 0 based indexing, $y_{n+1} = y_{13} = 233$.






        share|cite|improve this answer









        $endgroup$



        A "practical" solution could be the following:



        For large enough $n$, you can write the $n^{th}$ Fibonacci number as $$y_n = frac{1}{sqrt{5}} left( frac{1+sqrt{5}}{2} right)^{n+1}$$ where index $n$ starts from 0.



        Now you can solve for $n$ from $y_n = x$ as:



        $$ n = frac{log(x sqrt{5})}{log( (1+sqrt{5})/2)} - 1 = frac{log(x) + 0.8047}{0.4812}-1 = 2.0781log(x)+0.6723$$.



        The $log$ is the natural logarithm. You can round the above expression to the nearest integer.



        For example, with $x=233$, I get $n=12.0001$, which I can round off to 12. Indeed, with the 0 based indexing, $y_{n+1} = y_{13} = 233$.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 10 at 0:32









        Aditya DuaAditya Dua

        1,11418




        1,11418















            Popular posts from this blog

            Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

            Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

            A Topological Invariant for $pi_3(U(n))$