Empowering a brighter world through superior education is our commitment.

Online Calculators & Tools

Fibonacci Numbers & Sequence

Fibonacci sequence is a sequence of numbers, where each number is the sum of the 2 previous numbers, except the first two numbers that are 0 and 1.

Fibonacci sequence formula

Fibonacci sequence table

nFn
00
11
21
32
43
55
68
713
821
934
1055
1189
12144
13233
14377
15610
16987
171597
182584
194181
206765

Fibonacci sequence calculator

TBD

C code of Fibonacci function

double Fibonacci(unsigned int n)

{

    double f_n =n;

    double f_n1=0.0;

    double f_n2=1.0;

 

    if( n > 1 ) {

        for(int k=2; k<=n; k++) {

            f_n  = f_n1 + f_n2;

            f_n2 = f_n1;

            f_n1 = f_n;

        }

    }

 

    return f_n;

}