Given a Fibonacci number, find what number in the sequence it is [duplicate]
$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$?
inverse fibonacci-numbers
$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.
add a comment |
$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$?
inverse fibonacci-numbers
$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
add a comment |
$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$?
inverse fibonacci-numbers
$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
inverse fibonacci-numbers
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
add a comment |
$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
add a comment |
1 Answer
1
active
oldest
votes
$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$.
$endgroup$
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$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$.
$endgroup$
add a comment |
$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$.
$endgroup$
add a comment |
$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$.
$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$.
answered Jan 10 at 0:32
Aditya DuaAditya Dua
1,11418
1,11418
add a comment |
add a comment |
$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