What is the 30th term in the Fibonacci series?

Join Trial or Access Free Resources

We all know about the famous Fibonacci (was the name given to Leonardo Pisano) Series. In this series, each number is the sum of the two preceding ones, starting from 0 and 1. That is \(F_0\)=0 and \(F_1\)=1

and

\(F_n\)=\(F_{n−1}\)+\(F_{n−2}\) for n>1

In some old books \(F_0\) is omitted and the entire things starts with \(F_1\)and \(F_2\)that is \(F_1\)=\(F_2\)=1

so it starts like this 0,1,1,2,3,5,8,13,……..

But, is this really possible to find the 30th term in the Fibonacci series by just adding the previous terms in order to get such large terms?

Now, in order to find the 30th term of the above mentioned series we write a program in C and that is

  1. #include <stdio.h>
  2. Void main ()
  3. {
  4. long int i, n, t1 = 0, t2 = 1, nextTerm;
  5. printf("Enter the number of terms: ");
  6. scanf("%li", &n);
  7. printf("Fibonacci Series: ");
  8. for (i = 1; i <= n; ++i)
  9. {
  10. printf("%d, ", t1);
  11. nextTerm = t1 + t2;
  12. t1 = t2;
  13. t2 = nextTerm;
  14. }
  15. }

After compiling the above program in C , we enter the value of ?n as 30 and the output is

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 5142290, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229

Here 514229 is the 30th term of the Fibonacci Series.

Some Useful Links:

More Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram