Use recursion and the following function fib (for the computation of a Fibonacchi number):
def fib(n):
if n <2:
return 1
else:
return fib(n-1) + fib(n-2)
To prove that $2^n\geq F_n\geq 2^\frac{n}{2}$ when $n\geq 2$ and $n$ is an integer.
The key here is that I'm supposed to "use recursion" to accomplish this proof. However, I'm confused by this and am uncertain as to how I should be using recursion to prove that those values are bounds for the Fibonacci numbers when $n\geq 2$. How would I do this? Thank you.
Use induction...
$n=2$: $2^2\ge2\ge2^{\frac 22}$
Assume true for $k\le n$..
$n+1$: $ F_{n+1}=F_n+F_{n-1}$ So $$2^{n+1}\gt3(2^{n-1})=2^n+2^{n-1}\ge F_{n+1}\ge2^{\frac n2}+2^{\frac {n-1}2}=2^{\frac {n-1}2}(2^{\frac12}+1).\ge2^{\frac {n-1}2}\cdot2=2^{\frac {n+1}2}$$........