Generating Fibonacci numbers

The Fibonacci numbers F1,F2,... are defined by F1=1=F2 and Fm=Fm-1+Fm-2 for m ≥ 3.
Fm=(αmm)/√5, where α=(1+√5)/2 and β=(1-√5)/2.
If m and n are positive integers, m ≤ n, not greater than 10000, the Fibonacci numbers Fm,...,Fn are printed.

Enter m (1 ≤ m ≤ 10000):
Enter n (m ≤ n ≤ 10000):

Last modified 30th April 2012
Return to main page