Difference between revisions of "Calculate the Fibonacci Sequence"

Kipkis (Kipkis | contribs)
(importing article from wikihow)
 
Kipkis (Kipkis | contribs)
m (Update ref tag)
Line 22: Line 22:
 
#Add the third term (2) and the fourth term (3). This will give you the fifth number in the sequence.
 
#Add the third term (2) and the fourth term (3). This will give you the fifth number in the sequence.
 
#*2 + 3 = 5. The fifth term is 5.
 
#*2 + 3 = 5. The fifth term is 5.
#Sum the previous two numbers to find any given number in the Fibonacci Sequence. When you use this method, you are using the formula <math>F_{n}=F_{n-1}+F_{n-2}</math>.<ref>http://mathworld.wolfram.com/FibonacciNumber.html</ref> Since this is not a closed formula, however, you cannot use it to calculate any given term in the sequence without calculating all the previous numbers.
+
#Sum the previous two numbers to find any given number in the Fibonacci Sequence. When you use this method, you are using the formula <math>F_{n}=F_{n-1}+F_{n-2}</math>.<ref name="rf1">http://mathworld.wolfram.com/FibonacciNumber.html</ref> Since this is not a closed formula, however, you cannot use it to calculate any given term in the sequence without calculating all the previous numbers.
  
 
===Using Binet's Formula and the Golden Ratio ===
 
===Using Binet's Formula and the Golden Ratio ===
#Set up the formula <math>x_{n}</math>=<math>\frac{\phi^{n}-(1-\phi)^{n}}{\sqrt{5}}</math>. In the formula, <math>x_{n}</math> = the term in the sequence you are trying to find, <math>n</math> = the position number of the term in the sequence, and <math>\phi</math> = the golden ratio.<ref>https://www.mathsisfun.com/numbers/fibonacci-sequence.html</ref>
+
#Set up the formula <math>x_{n}</math>=<math>\frac{\phi^{n}-(1-\phi)^{n}}{\sqrt{5}}</math>. In the formula, <math>x_{n}</math> = the term in the sequence you are trying to find, <math>n</math> = the position number of the term in the sequence, and <math>\phi</math> = the golden ratio.<ref name="rf2">https://www.mathsisfun.com/numbers/fibonacci-sequence.html</ref>
 
#*This is a closed formula, so you will be able to calculate a specific term in the sequence without calculating all the previous ones.
 
#*This is a closed formula, so you will be able to calculate a specific term in the sequence without calculating all the previous ones.
#*This formula is a simplified formula derived from Binet’s Fibonacci number formula.<ref>http://mathworld.wolfram.com/FibonacciNumber.html</ref>
+
#*This formula is a simplified formula derived from Binet’s Fibonacci number formula.<ref name="rf1" />
#*The formula utilizes the golden ratio (<math>\phi</math>), because the ratio of any two successive numbers in the Fibonacci sequence are very similar to the golden ratio.<ref>https://www.mathsisfun.com/numbers/fibonacci-sequence.html</ref>     
+
#*The formula utilizes the golden ratio (<math>\phi</math>), because the ratio of any two successive numbers in the Fibonacci sequence are very similar to the golden ratio.<ref name="rf2" />     
 
#Plug the number for <math>n</math> into the formula. The <math>n</math> represents whatever term you are looking for in the sequence.
 
#Plug the number for <math>n</math> into the formula. The <math>n</math> represents whatever term you are looking for in the sequence.
 
#*For example, if you are looking for the fifth number in the sequence, plug in 5. Your formula will now look like this: <math>x_{5}</math>=<math>\frac{\phi^{5}-(1-\phi)^{5}}{\sqrt{5}}</math>.
 
#*For example, if you are looking for the fifth number in the sequence, plug in 5. Your formula will now look like this: <math>x_{5}</math>=<math>\frac{\phi^{5}-(1-\phi)^{5}}{\sqrt{5}}</math>.
#Substitute the golden ratio into the formula. You can use 1.618034 as an approximation of the golden ratio.<ref>https://www.mathsisfun.com/numbers/fibonacci-sequence.html</ref>
+
#Substitute the golden ratio into the formula. You can use 1.618034 as an approximation of the golden ratio.<ref name="rf2" />
 
#*For example, if you are looking for the fifth number in the sequence, the formula will now look like this: <math>x_{5}</math>=<math>\frac{(1.618034)^{5}-(1-1.618034)^{5}}{\sqrt{5}}</math>.
 
#*For example, if you are looking for the fifth number in the sequence, the formula will now look like this: <math>x_{5}</math>=<math>\frac{(1.618034)^{5}-(1-1.618034)^{5}}{\sqrt{5}}</math>.
 
#Complete the calculations in parentheses. Remember to use the order of operations by completing the calculation in parentheses first: <math>1- 1.618034 = -0.618034</math>.
 
#Complete the calculations in parentheses. Remember to use the order of operations by completing the calculation in parentheses first: <math>1- 1.618034 = -0.618034</math>.
Line 42: Line 42:
 
#*In the example problem, <math>\frac{11.180339}{2.236067} = 5.000002</math>.
 
#*In the example problem, <math>\frac{11.180339}{2.236067} = 5.000002</math>.
 
#Round to the nearest whole number. Your answer will be a decimal, but it will be very close to a whole number. This whole number represents the number in the Fibonacci sequence.
 
#Round to the nearest whole number. Your answer will be a decimal, but it will be very close to a whole number. This whole number represents the number in the Fibonacci sequence.
#*If you used the complete golden ratio and did no rounding, you would get a whole number. It’s more practical to round, however, which will result in a decimal.<ref>https://www.mathsisfun.com/numbers/fibonacci-sequence.html</ref>
+
#*If you used the complete golden ratio and did no rounding, you would get a whole number. It’s more practical to round, however, which will result in a decimal.<ref name="rf2" />
 
#*In the example, after using a calculator to complete all the calculations, your answer will be approximately 5.000002. Rounding to the nearest whole number, your answer, representing the fifth number in the Fibonacci sequence, is 5.
 
#*In the example, after using a calculator to complete all the calculations, your answer will be approximately 5.000002. Rounding to the nearest whole number, your answer, representing the fifth number in the Fibonacci sequence, is 5.