Skip to content

Understanding Fibonacci Numbers: The Mathematical Magic Unveiled

Notifications You must be signed in to change notification settings

arifuzzaman-tanin/fibonacci-number-explain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HOW TO CALCULATE FIBONACCI ?

What is a fibonacci: The last number will be the summation of the immediate two first number.

Rule

Fn = Fn-2 + Fn-1

Now calculation of fibonacci number for n = 5

F5 = F3 + F4

F3 = F1 + F2

F4 = F2 + F3

In fibonacci series 0 & 1 are the fibonacci for 1 & 2. For that reason

F1 = 0

F2 = 1

We know from the previous calculation

F5 = F3 + F4

F5 = F1 + F2 + F4

F5 = F1 + F2 + F2 + F3

F5 = F1 + F2 + F2 + F1 + F2

F5 = 0 + 1 + 1 + 0 + 1

F5 = 3

The 5th number fibonacci is 3

HOW TO RUN

To compile TypeScript to javascript, run the command.

tsc

Run the main js file

node main.js
TypeScript has a dependency of node js, if node js is not available on your machine then install the node js.

About

Understanding Fibonacci Numbers: The Mathematical Magic Unveiled

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published