Well, the thing with recursion is you take a larger problem and make it slightly smaller. So, to begin with you test whether you need to break the problem down and if so, you make a single recursive call that simplifies the problem by one step.
Since this is a homework problem, we can't give you the answer, but we can try to point you in the right direction.
So consider this...
1. If the problem is reduced to its simplest form, just return the required answer.
2. If the problem is larger, recursively call your function with a slightly smaller problem (perhaps one less term?)
Remember that the result of (2) will always be the solution to the slightly smaller problem, so you have to adjust the result to account for that.
I hope that helps.
