my son is stuck with this programme about recursion,
I would like to help him out.
this is what he wants to do:
1 1 2 0 3 -1 4 -2 5....
such that the 3 terms are 1, 1 and 2 and each term thereafter is defined recusively as the sum of the first 2 items minus the third, that is:
seq(n) = seq(n-3)+seq(n-2)-seq(n-1)
the programme accepts the number into the vairable n
implement the recursive function that computes the above series, call the function recursiveSeq().
Can anyone write this code out so i can analise it and help my son out?? thank you