The Fibonacci Sequence is a sequence of integer numbers that follow these rules:
- The first two numbers in the sequence are equal to 1: F(1) = 1, F(2) = 1
It is also possible to add F(0) = 0, or even extend to negativ numbers, but for the app we started with 1. - For n > 2 the corresponding Fibonacci number is the sum of the two previous ones:
F(n) = F(n-1) + F(n-2)
Examples:
- F(3) = F(2) + F(1) = 1 + 1 = 2
- F(4) = 2 + 1 = 3
- The first 10 Fibonacci numbers: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55