Implement a recursive function F with the following rules:
f(n) = f(n-1)/2 + 2*f(n-2)
f(0) = 4
f(-1) = 1
The function needs to return the result of the calculation.
Implement a recursive function F with the following rules:
f(n) = f(n-1)/2 + 2*f(n-2)
f(0) = 4
f(-1) = 1
The function needs to return the result of the calculation.
Sample Input 1:
5Sample Output 1:
39Create a free account to access the full topic