File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Recursion is actually a way of defining functions in which the function is appli
1717Definitions in mathematics are often given recursively.
1818For instance, the fibonacci sequence is defined recursively.
1919First, we define the first two fibonacci numbers non-recursively.
20- We say that $F(0) = 0$ and $F(1) = 1$, meaning that the 0< sup >th</ sup > and 1< sup >st</ sup > fibonacci numbers are $0$ and $1$, respectively.
20+ We say that $F(0) = 0$ and $F(1) = 1$, meaning that the 0^th^ and 1^st^ fibonacci numbers are $0$ and $1$, respectively.
2121Then we say that for any other natural number, that fibonacci number is the sum of the previous two fibonacci numbers.
2222So $F(n) = F(n-1) + F(n-2)$.
2323That way, $F(3)$ is $F(2) + F(1)$, which is $(F(1) + F(0)) + F(1)$.
You can’t perform that action at this time.
0 commit comments