Investigating the Fibonacci Sequence with a Kotlin program.
What is Fibonacci Numbers ?
In mathematics, the Fibonacci sequence is a sequence in which each number is the sum of the two preceding ones. Numbers that are part of the Fibonacci sequence are known as Fibonacci numbers . The sequence commonly starts from 0 and 1, although some authors start the sequence from 1 and 1 or sometimes (as did Fibonacci) from 1 and 2. Starting from 0 and 1.
The sequence begins :
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ..
What is the Origin of It ?
The Fibonacci numbers were first described in Bharatiya Ganit Shashtra (Bharat’s Mathematics) as early as 200 BC in work by Pingala on enumerating possible patterns of Sanskrit poetry formed from syllables of two lengths. They are named after the Italian mathematician Leonardo of Pisa, also known as Fibonacci, who introduced the sequence to Western European mathematics in his 1202 book Liber Abaci.
Kotlin program to print Fibonacci Numbers till nth Number using for loop
Kotlin program to print Fibonacci Numbers till nth Number using while loop
Kotlin program to print Fibonacci Numbers up to N using while loop
Thank you for reading! Feel free to share your suggestions and comments to improve technical blogging. Your input is valued and appreciated!
Subscribe to my newsletter
Read articles from Sandeep Kulkarni directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Sandeep Kulkarni
Sandeep Kulkarni
I am a Android Developer based in Hyderabad. Over of 6+ years of experience in IT industry.