hi this is my question:
Consider the folowing relation:
cn= 5 + 2c[n/3], n=2,3,4..............
where it's given c1=1
i) write an iterate algorithm to find cn
ii) write an recursive algorithm to find cn
_______________________________________
i have this so far for iterative:
For n=1 c1=5+(2/3)c, hence 1=5+(2/3)c
c=-4*3/2=-6, so that cn=5-12(n/3)=5-4n
c_n+1 -c_n=-4
is this correct?
can you guys PLEASE help me with the recursive one?
THANKS YOU IN ADVANCE