How to Find Fibonacci Numbers

Finds the nth term of the sequence 1, 1, 2, 3, 5, 8 …, in which each term is the sum of the two before it. The sum to the nth term, which is the term two places on less 1, and the ratio to the next term are also shown. That ratio closes in on the golden ratio, 1.618… .

The sequence 1, 1, 2, 3, 5, 8, 13 and so on, where each term is the sum of the two before it.

Fn=Fn1+Fn2F_n = F_{n-1} + F_{n-2}

It starts from F1=1F_1 = 1 and F2=1F_2 = 1. Alongside the nth term, the sum to it and the ratio to the next term are given.

The sum comes from two terms further on

The sum of the first nn terms is Fn+21F_{n+2} - 1. Rather than adding them one by one, take the term two places on and subtract 1.

Example

The tenth term is 55. The sum to it is F121=1441=143F_{12} - 1 = 144 - 1 = 143, and adding 1+1+2+3+5+8+13+21+34+551+1+2+3+5+8+13+21+34+55 by hand gives 143 too. The ratio to the next term is 89÷5589 \div 55, about 1.618.

Closing in on the golden ratio

The ratio of neighbouring terms approaches the golden ratio, 1+52=1.6180339\dfrac{1 + \sqrt{5}}{2} = 1.6180339\ldots . By the tenth term it agrees to three decimal places, and past the twentieth to eight.

Notes

Keep nn at 76 or below. The sum uses the term two places on, and that is as far as whole numbers stay exact in double precision.

Some conventions start from a zeroth term of 0. Here the first term is 1.