Given a Fibonacci number , find the next Fibonacci numberhow to find nth term in a fibonacci series or sum of...
Will my familiar remember me when I re-summon it, or is it a new entity?
How to prevent password reset from disclosing private email addresses?
What does "he was equally game to slip into bit parts" mean?
Why are there never-ending wars in the Middle East?
Are there any Baryons that have quark-antiquark combinations?
Can I reproduce this in Latex
Do any languages mark social distinctions other than gender and status?
Is Uralic Possibly a Branch of the Indo-European Branch?
Why didn't Petunia know that Harry wasn't supposed to use magic out of school?
What are these objects near the Cosmonaut's faces?
Replacing each letter with the letter that is in the corresponding position from the end of the English alphabet
出かけることにしました - What is the meaning of this?
How to load GeoJSON data in OpenLayers?
Visualize a large int
Probability of a 500 year flood occuring in the next 100 years - comparison of approaches
What plausible reasons why people forget they didn't originally live on this new planet?
How can a stock trade for a fraction of a cent?
Repair drywall and protect wires on back of electrical panel
Why did my relationship with my wife go down by two hearts?
What is the white square near the viewfinder of the Fujica GW690?
Are my triangles similar?
Matrix class in C#
Should I respond to a sabotage accusation e-mail at work?
Why can a T* be passed in register, but a unique_ptr<T> cannot?
Given a Fibonacci number , find the next Fibonacci number
how to find nth term in a fibonacci series or sum of a series of fibonacci numbersdetermine the number of terms in a fibonacci sequence that are divisible by $3$How do I choose first terms of a Fibonacci sequence?Is fibonacci sequence a member of more broad family of sequences?First Fibonacci Number with Given RemainderNumber of ways to write $n$ as sum of odd or even number of Fibonacci numbersModification of the Fibonacci Sequences
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}
.everyonelovesstackoverflow{position:absolute;height:1px;width:1px;opacity:0;top:0;left:0;pointer-events:none;}
$begingroup$
The Fibonacci sequence is $0, 1, 1, 2, 3, 5, 8, 13, 21, 34,ldots$, where each term after the first two is the sum of the two previous terms.
Can we find the next Fibonacci number if we are given any Fibonacci number?
For example, if $n = 8$ then it's answer should be $13$ because $13$ is the next Fibonacci number after $8$.
sequences-and-series combinatorics discrete-mathematics fibonacci-numbers
$endgroup$
add a comment
|
$begingroup$
The Fibonacci sequence is $0, 1, 1, 2, 3, 5, 8, 13, 21, 34,ldots$, where each term after the first two is the sum of the two previous terms.
Can we find the next Fibonacci number if we are given any Fibonacci number?
For example, if $n = 8$ then it's answer should be $13$ because $13$ is the next Fibonacci number after $8$.
sequences-and-series combinatorics discrete-mathematics fibonacci-numbers
$endgroup$
add a comment
|
$begingroup$
The Fibonacci sequence is $0, 1, 1, 2, 3, 5, 8, 13, 21, 34,ldots$, where each term after the first two is the sum of the two previous terms.
Can we find the next Fibonacci number if we are given any Fibonacci number?
For example, if $n = 8$ then it's answer should be $13$ because $13$ is the next Fibonacci number after $8$.
sequences-and-series combinatorics discrete-mathematics fibonacci-numbers
$endgroup$
The Fibonacci sequence is $0, 1, 1, 2, 3, 5, 8, 13, 21, 34,ldots$, where each term after the first two is the sum of the two previous terms.
Can we find the next Fibonacci number if we are given any Fibonacci number?
For example, if $n = 8$ then it's answer should be $13$ because $13$ is the next Fibonacci number after $8$.
sequences-and-series combinatorics discrete-mathematics fibonacci-numbers
sequences-and-series combinatorics discrete-mathematics fibonacci-numbers
edited 1 hour ago
Matthew Daly
7,0301 gold badge10 silver badges29 bronze badges
7,0301 gold badge10 silver badges29 bronze badges
asked yesterday
sr123sr123
966 bronze badges
966 bronze badges
add a comment
|
add a comment
|
3 Answers
3
active
oldest
votes
$begingroup$
The ratio of any two consecutive entries in the Fibonacci sequence rapidly approaches $varphi=frac{1+sqrt5}2$. So if you multiply your number by $frac{1+sqrt5}2$ and round to the nearest integer, you will get the next term unless you're at the very beginning of the sequence.
$endgroup$
$begingroup$
float ans = ((1+sqrt(5))/2.0)*n; return ceil(ans); This is not giving correct result.
$endgroup$
– sr123
yesterday
17
$begingroup$
@sr123 He did say "round to the nearest integer". That's not whatceil
does, so of course you don't get the correct result. From checking the first few values, actually rounding will get you correct results unless you're starting from0
or from1
.
$endgroup$
– HTNW
19 hours ago
$begingroup$
yes float ans = ((1+sqrt(5))/2.0)*n; return round(ans); is working !!
$endgroup$
– sr123
13 hours ago
3
$begingroup$
Trying to do this in floating point is a bad idea; Fibonacci numbers quickly grow beyond the ability of floating point to accurately represent, so your computation will suffer from rounding error.
$endgroup$
– user2357112
11 hours ago
6
$begingroup$
This is a math site, not a computer site, and we work with abstract real number arithmetic here, not floating point. However, anyone actually trying to compute a Fibonacci number by multiplying another Fibonacci number by $(1+sqrt{5})/2$ is probably going to use a computer, and representation issues will be important.
$endgroup$
– user2357112
5 hours ago
|
show 2 more comments
$begingroup$
$ninmathbb{N}$ is a Fibonacci number iff $5n^2-4$ or $5n^2+4$ is a square. In the former case $n=F_{2k+1}$ while in the latter case $n=F_{2k}$. Assuming $ngeq 2$, in the former case $F_{2k+2}=lfloor varphi n rfloor$ and in the latter case $F_{2k+1}=lceil varphi nrceil $, with $varphi=frac{1+sqrt{5}}{2}$.
Example: if $n=8$ we have that $5cdot 8^2+4=18^2$, hence $n$ is a Fibonacci number with even index and the next Fibonacci number is $lceil 8varphi rceil =13$.
$endgroup$
4
$begingroup$
If you've gone to the trouble to find the square root $m$ of $5n^2 - 4$ or $5n^2 + 4$, you can avoid floating-point arithmetic by computing the next Fibonacci number as $(n + m)/2$.
$endgroup$
– Mark Dickinson
8 hours ago
$begingroup$
@MarkDickinson How does that work?
$endgroup$
– Varad Mahashabde
2 hours ago
1
$begingroup$
Good question, but it looks like @TonyK has saved me from answering ...
$endgroup$
– Mark Dickinson
2 hours ago
add a comment
|
$begingroup$
Given a Fibonacci number $n$, let $m$ be the next Fibonacci number. The Fibonacci sequence has the property that for any three consecutive elements $r,s,t$, we have $rt-s^2=pm 1$ (proof is by induction, which you might like to try $-$ the choice of signs alternates). And we know that the previous Fibonacci number is $m-n$. So we have
$$m(m-n)=n^2pm 1$$
This is a quadratic equation in $m$, with solutions
$m=frac12(npmsqrt{5n^2pm 4})$. We know that $m>n$, so $m$ must equal $frac12(n+sqrt{5n^2pm 4})$. And we can choose between $+4$ and $-4$ because only one of $sqrt{5n^2+4}$ and $sqrt{5n^2-4}$ can be an integer (with the single exception of $n=1$).
So the answer is whichever one of $frac12(n+sqrt{5n^2+4})$ and $frac12(n+sqrt{5n^2-4})$ is an integer.
Note that the single exception $n=1$ occurs twice in the Fibonacci sequence, so there are indeed two possible answers.
$endgroup$
add a comment
|
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3390870%2fgiven-a-fibonacci-number-find-the-next-fibonacci-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The ratio of any two consecutive entries in the Fibonacci sequence rapidly approaches $varphi=frac{1+sqrt5}2$. So if you multiply your number by $frac{1+sqrt5}2$ and round to the nearest integer, you will get the next term unless you're at the very beginning of the sequence.
$endgroup$
$begingroup$
float ans = ((1+sqrt(5))/2.0)*n; return ceil(ans); This is not giving correct result.
$endgroup$
– sr123
yesterday
17
$begingroup$
@sr123 He did say "round to the nearest integer". That's not whatceil
does, so of course you don't get the correct result. From checking the first few values, actually rounding will get you correct results unless you're starting from0
or from1
.
$endgroup$
– HTNW
19 hours ago
$begingroup$
yes float ans = ((1+sqrt(5))/2.0)*n; return round(ans); is working !!
$endgroup$
– sr123
13 hours ago
3
$begingroup$
Trying to do this in floating point is a bad idea; Fibonacci numbers quickly grow beyond the ability of floating point to accurately represent, so your computation will suffer from rounding error.
$endgroup$
– user2357112
11 hours ago
6
$begingroup$
This is a math site, not a computer site, and we work with abstract real number arithmetic here, not floating point. However, anyone actually trying to compute a Fibonacci number by multiplying another Fibonacci number by $(1+sqrt{5})/2$ is probably going to use a computer, and representation issues will be important.
$endgroup$
– user2357112
5 hours ago
|
show 2 more comments
$begingroup$
The ratio of any two consecutive entries in the Fibonacci sequence rapidly approaches $varphi=frac{1+sqrt5}2$. So if you multiply your number by $frac{1+sqrt5}2$ and round to the nearest integer, you will get the next term unless you're at the very beginning of the sequence.
$endgroup$
$begingroup$
float ans = ((1+sqrt(5))/2.0)*n; return ceil(ans); This is not giving correct result.
$endgroup$
– sr123
yesterday
17
$begingroup$
@sr123 He did say "round to the nearest integer". That's not whatceil
does, so of course you don't get the correct result. From checking the first few values, actually rounding will get you correct results unless you're starting from0
or from1
.
$endgroup$
– HTNW
19 hours ago
$begingroup$
yes float ans = ((1+sqrt(5))/2.0)*n; return round(ans); is working !!
$endgroup$
– sr123
13 hours ago
3
$begingroup$
Trying to do this in floating point is a bad idea; Fibonacci numbers quickly grow beyond the ability of floating point to accurately represent, so your computation will suffer from rounding error.
$endgroup$
– user2357112
11 hours ago
6
$begingroup$
This is a math site, not a computer site, and we work with abstract real number arithmetic here, not floating point. However, anyone actually trying to compute a Fibonacci number by multiplying another Fibonacci number by $(1+sqrt{5})/2$ is probably going to use a computer, and representation issues will be important.
$endgroup$
– user2357112
5 hours ago
|
show 2 more comments
$begingroup$
The ratio of any two consecutive entries in the Fibonacci sequence rapidly approaches $varphi=frac{1+sqrt5}2$. So if you multiply your number by $frac{1+sqrt5}2$ and round to the nearest integer, you will get the next term unless you're at the very beginning of the sequence.
$endgroup$
The ratio of any two consecutive entries in the Fibonacci sequence rapidly approaches $varphi=frac{1+sqrt5}2$. So if you multiply your number by $frac{1+sqrt5}2$ and round to the nearest integer, you will get the next term unless you're at the very beginning of the sequence.
edited 1 hour ago
answered yesterday
Matthew DalyMatthew Daly
7,0301 gold badge10 silver badges29 bronze badges
7,0301 gold badge10 silver badges29 bronze badges
$begingroup$
float ans = ((1+sqrt(5))/2.0)*n; return ceil(ans); This is not giving correct result.
$endgroup$
– sr123
yesterday
17
$begingroup$
@sr123 He did say "round to the nearest integer". That's not whatceil
does, so of course you don't get the correct result. From checking the first few values, actually rounding will get you correct results unless you're starting from0
or from1
.
$endgroup$
– HTNW
19 hours ago
$begingroup$
yes float ans = ((1+sqrt(5))/2.0)*n; return round(ans); is working !!
$endgroup$
– sr123
13 hours ago
3
$begingroup$
Trying to do this in floating point is a bad idea; Fibonacci numbers quickly grow beyond the ability of floating point to accurately represent, so your computation will suffer from rounding error.
$endgroup$
– user2357112
11 hours ago
6
$begingroup$
This is a math site, not a computer site, and we work with abstract real number arithmetic here, not floating point. However, anyone actually trying to compute a Fibonacci number by multiplying another Fibonacci number by $(1+sqrt{5})/2$ is probably going to use a computer, and representation issues will be important.
$endgroup$
– user2357112
5 hours ago
|
show 2 more comments
$begingroup$
float ans = ((1+sqrt(5))/2.0)*n; return ceil(ans); This is not giving correct result.
$endgroup$
– sr123
yesterday
17
$begingroup$
@sr123 He did say "round to the nearest integer". That's not whatceil
does, so of course you don't get the correct result. From checking the first few values, actually rounding will get you correct results unless you're starting from0
or from1
.
$endgroup$
– HTNW
19 hours ago
$begingroup$
yes float ans = ((1+sqrt(5))/2.0)*n; return round(ans); is working !!
$endgroup$
– sr123
13 hours ago
3
$begingroup$
Trying to do this in floating point is a bad idea; Fibonacci numbers quickly grow beyond the ability of floating point to accurately represent, so your computation will suffer from rounding error.
$endgroup$
– user2357112
11 hours ago
6
$begingroup$
This is a math site, not a computer site, and we work with abstract real number arithmetic here, not floating point. However, anyone actually trying to compute a Fibonacci number by multiplying another Fibonacci number by $(1+sqrt{5})/2$ is probably going to use a computer, and representation issues will be important.
$endgroup$
– user2357112
5 hours ago
$begingroup$
float ans = ((1+sqrt(5))/2.0)*n; return ceil(ans); This is not giving correct result.
$endgroup$
– sr123
yesterday
$begingroup$
float ans = ((1+sqrt(5))/2.0)*n; return ceil(ans); This is not giving correct result.
$endgroup$
– sr123
yesterday
17
17
$begingroup$
@sr123 He did say "round to the nearest integer". That's not what
ceil
does, so of course you don't get the correct result. From checking the first few values, actually rounding will get you correct results unless you're starting from 0
or from 1
.$endgroup$
– HTNW
19 hours ago
$begingroup$
@sr123 He did say "round to the nearest integer". That's not what
ceil
does, so of course you don't get the correct result. From checking the first few values, actually rounding will get you correct results unless you're starting from 0
or from 1
.$endgroup$
– HTNW
19 hours ago
$begingroup$
yes float ans = ((1+sqrt(5))/2.0)*n; return round(ans); is working !!
$endgroup$
– sr123
13 hours ago
$begingroup$
yes float ans = ((1+sqrt(5))/2.0)*n; return round(ans); is working !!
$endgroup$
– sr123
13 hours ago
3
3
$begingroup$
Trying to do this in floating point is a bad idea; Fibonacci numbers quickly grow beyond the ability of floating point to accurately represent, so your computation will suffer from rounding error.
$endgroup$
– user2357112
11 hours ago
$begingroup$
Trying to do this in floating point is a bad idea; Fibonacci numbers quickly grow beyond the ability of floating point to accurately represent, so your computation will suffer from rounding error.
$endgroup$
– user2357112
11 hours ago
6
6
$begingroup$
This is a math site, not a computer site, and we work with abstract real number arithmetic here, not floating point. However, anyone actually trying to compute a Fibonacci number by multiplying another Fibonacci number by $(1+sqrt{5})/2$ is probably going to use a computer, and representation issues will be important.
$endgroup$
– user2357112
5 hours ago
$begingroup$
This is a math site, not a computer site, and we work with abstract real number arithmetic here, not floating point. However, anyone actually trying to compute a Fibonacci number by multiplying another Fibonacci number by $(1+sqrt{5})/2$ is probably going to use a computer, and representation issues will be important.
$endgroup$
– user2357112
5 hours ago
|
show 2 more comments
$begingroup$
$ninmathbb{N}$ is a Fibonacci number iff $5n^2-4$ or $5n^2+4$ is a square. In the former case $n=F_{2k+1}$ while in the latter case $n=F_{2k}$. Assuming $ngeq 2$, in the former case $F_{2k+2}=lfloor varphi n rfloor$ and in the latter case $F_{2k+1}=lceil varphi nrceil $, with $varphi=frac{1+sqrt{5}}{2}$.
Example: if $n=8$ we have that $5cdot 8^2+4=18^2$, hence $n$ is a Fibonacci number with even index and the next Fibonacci number is $lceil 8varphi rceil =13$.
$endgroup$
4
$begingroup$
If you've gone to the trouble to find the square root $m$ of $5n^2 - 4$ or $5n^2 + 4$, you can avoid floating-point arithmetic by computing the next Fibonacci number as $(n + m)/2$.
$endgroup$
– Mark Dickinson
8 hours ago
$begingroup$
@MarkDickinson How does that work?
$endgroup$
– Varad Mahashabde
2 hours ago
1
$begingroup$
Good question, but it looks like @TonyK has saved me from answering ...
$endgroup$
– Mark Dickinson
2 hours ago
add a comment
|
$begingroup$
$ninmathbb{N}$ is a Fibonacci number iff $5n^2-4$ or $5n^2+4$ is a square. In the former case $n=F_{2k+1}$ while in the latter case $n=F_{2k}$. Assuming $ngeq 2$, in the former case $F_{2k+2}=lfloor varphi n rfloor$ and in the latter case $F_{2k+1}=lceil varphi nrceil $, with $varphi=frac{1+sqrt{5}}{2}$.
Example: if $n=8$ we have that $5cdot 8^2+4=18^2$, hence $n$ is a Fibonacci number with even index and the next Fibonacci number is $lceil 8varphi rceil =13$.
$endgroup$
4
$begingroup$
If you've gone to the trouble to find the square root $m$ of $5n^2 - 4$ or $5n^2 + 4$, you can avoid floating-point arithmetic by computing the next Fibonacci number as $(n + m)/2$.
$endgroup$
– Mark Dickinson
8 hours ago
$begingroup$
@MarkDickinson How does that work?
$endgroup$
– Varad Mahashabde
2 hours ago
1
$begingroup$
Good question, but it looks like @TonyK has saved me from answering ...
$endgroup$
– Mark Dickinson
2 hours ago
add a comment
|
$begingroup$
$ninmathbb{N}$ is a Fibonacci number iff $5n^2-4$ or $5n^2+4$ is a square. In the former case $n=F_{2k+1}$ while in the latter case $n=F_{2k}$. Assuming $ngeq 2$, in the former case $F_{2k+2}=lfloor varphi n rfloor$ and in the latter case $F_{2k+1}=lceil varphi nrceil $, with $varphi=frac{1+sqrt{5}}{2}$.
Example: if $n=8$ we have that $5cdot 8^2+4=18^2$, hence $n$ is a Fibonacci number with even index and the next Fibonacci number is $lceil 8varphi rceil =13$.
$endgroup$
$ninmathbb{N}$ is a Fibonacci number iff $5n^2-4$ or $5n^2+4$ is a square. In the former case $n=F_{2k+1}$ while in the latter case $n=F_{2k}$. Assuming $ngeq 2$, in the former case $F_{2k+2}=lfloor varphi n rfloor$ and in the latter case $F_{2k+1}=lceil varphi nrceil $, with $varphi=frac{1+sqrt{5}}{2}$.
Example: if $n=8$ we have that $5cdot 8^2+4=18^2$, hence $n$ is a Fibonacci number with even index and the next Fibonacci number is $lceil 8varphi rceil =13$.
answered yesterday
Jack D'AurizioJack D'Aurizio
302k33 gold badges297 silver badges695 bronze badges
302k33 gold badges297 silver badges695 bronze badges
4
$begingroup$
If you've gone to the trouble to find the square root $m$ of $5n^2 - 4$ or $5n^2 + 4$, you can avoid floating-point arithmetic by computing the next Fibonacci number as $(n + m)/2$.
$endgroup$
– Mark Dickinson
8 hours ago
$begingroup$
@MarkDickinson How does that work?
$endgroup$
– Varad Mahashabde
2 hours ago
1
$begingroup$
Good question, but it looks like @TonyK has saved me from answering ...
$endgroup$
– Mark Dickinson
2 hours ago
add a comment
|
4
$begingroup$
If you've gone to the trouble to find the square root $m$ of $5n^2 - 4$ or $5n^2 + 4$, you can avoid floating-point arithmetic by computing the next Fibonacci number as $(n + m)/2$.
$endgroup$
– Mark Dickinson
8 hours ago
$begingroup$
@MarkDickinson How does that work?
$endgroup$
– Varad Mahashabde
2 hours ago
1
$begingroup$
Good question, but it looks like @TonyK has saved me from answering ...
$endgroup$
– Mark Dickinson
2 hours ago
4
4
$begingroup$
If you've gone to the trouble to find the square root $m$ of $5n^2 - 4$ or $5n^2 + 4$, you can avoid floating-point arithmetic by computing the next Fibonacci number as $(n + m)/2$.
$endgroup$
– Mark Dickinson
8 hours ago
$begingroup$
If you've gone to the trouble to find the square root $m$ of $5n^2 - 4$ or $5n^2 + 4$, you can avoid floating-point arithmetic by computing the next Fibonacci number as $(n + m)/2$.
$endgroup$
– Mark Dickinson
8 hours ago
$begingroup$
@MarkDickinson How does that work?
$endgroup$
– Varad Mahashabde
2 hours ago
$begingroup$
@MarkDickinson How does that work?
$endgroup$
– Varad Mahashabde
2 hours ago
1
1
$begingroup$
Good question, but it looks like @TonyK has saved me from answering ...
$endgroup$
– Mark Dickinson
2 hours ago
$begingroup$
Good question, but it looks like @TonyK has saved me from answering ...
$endgroup$
– Mark Dickinson
2 hours ago
add a comment
|
$begingroup$
Given a Fibonacci number $n$, let $m$ be the next Fibonacci number. The Fibonacci sequence has the property that for any three consecutive elements $r,s,t$, we have $rt-s^2=pm 1$ (proof is by induction, which you might like to try $-$ the choice of signs alternates). And we know that the previous Fibonacci number is $m-n$. So we have
$$m(m-n)=n^2pm 1$$
This is a quadratic equation in $m$, with solutions
$m=frac12(npmsqrt{5n^2pm 4})$. We know that $m>n$, so $m$ must equal $frac12(n+sqrt{5n^2pm 4})$. And we can choose between $+4$ and $-4$ because only one of $sqrt{5n^2+4}$ and $sqrt{5n^2-4}$ can be an integer (with the single exception of $n=1$).
So the answer is whichever one of $frac12(n+sqrt{5n^2+4})$ and $frac12(n+sqrt{5n^2-4})$ is an integer.
Note that the single exception $n=1$ occurs twice in the Fibonacci sequence, so there are indeed two possible answers.
$endgroup$
add a comment
|
$begingroup$
Given a Fibonacci number $n$, let $m$ be the next Fibonacci number. The Fibonacci sequence has the property that for any three consecutive elements $r,s,t$, we have $rt-s^2=pm 1$ (proof is by induction, which you might like to try $-$ the choice of signs alternates). And we know that the previous Fibonacci number is $m-n$. So we have
$$m(m-n)=n^2pm 1$$
This is a quadratic equation in $m$, with solutions
$m=frac12(npmsqrt{5n^2pm 4})$. We know that $m>n$, so $m$ must equal $frac12(n+sqrt{5n^2pm 4})$. And we can choose between $+4$ and $-4$ because only one of $sqrt{5n^2+4}$ and $sqrt{5n^2-4}$ can be an integer (with the single exception of $n=1$).
So the answer is whichever one of $frac12(n+sqrt{5n^2+4})$ and $frac12(n+sqrt{5n^2-4})$ is an integer.
Note that the single exception $n=1$ occurs twice in the Fibonacci sequence, so there are indeed two possible answers.
$endgroup$
add a comment
|
$begingroup$
Given a Fibonacci number $n$, let $m$ be the next Fibonacci number. The Fibonacci sequence has the property that for any three consecutive elements $r,s,t$, we have $rt-s^2=pm 1$ (proof is by induction, which you might like to try $-$ the choice of signs alternates). And we know that the previous Fibonacci number is $m-n$. So we have
$$m(m-n)=n^2pm 1$$
This is a quadratic equation in $m$, with solutions
$m=frac12(npmsqrt{5n^2pm 4})$. We know that $m>n$, so $m$ must equal $frac12(n+sqrt{5n^2pm 4})$. And we can choose between $+4$ and $-4$ because only one of $sqrt{5n^2+4}$ and $sqrt{5n^2-4}$ can be an integer (with the single exception of $n=1$).
So the answer is whichever one of $frac12(n+sqrt{5n^2+4})$ and $frac12(n+sqrt{5n^2-4})$ is an integer.
Note that the single exception $n=1$ occurs twice in the Fibonacci sequence, so there are indeed two possible answers.
$endgroup$
Given a Fibonacci number $n$, let $m$ be the next Fibonacci number. The Fibonacci sequence has the property that for any three consecutive elements $r,s,t$, we have $rt-s^2=pm 1$ (proof is by induction, which you might like to try $-$ the choice of signs alternates). And we know that the previous Fibonacci number is $m-n$. So we have
$$m(m-n)=n^2pm 1$$
This is a quadratic equation in $m$, with solutions
$m=frac12(npmsqrt{5n^2pm 4})$. We know that $m>n$, so $m$ must equal $frac12(n+sqrt{5n^2pm 4})$. And we can choose between $+4$ and $-4$ because only one of $sqrt{5n^2+4}$ and $sqrt{5n^2-4}$ can be an integer (with the single exception of $n=1$).
So the answer is whichever one of $frac12(n+sqrt{5n^2+4})$ and $frac12(n+sqrt{5n^2-4})$ is an integer.
Note that the single exception $n=1$ occurs twice in the Fibonacci sequence, so there are indeed two possible answers.
edited 1 hour ago
answered 3 hours ago
TonyKTonyK
47.4k3 gold badges62 silver badges140 bronze badges
47.4k3 gold badges62 silver badges140 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3390870%2fgiven-a-fibonacci-number-find-the-next-fibonacci-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown