It looks like you're new here. If you want to get involved, click one of these buttons!
The recursive function is $$ f(n)= \begin{cases} 0, & \text{if $x \le 0$}.\\\\ f(n-1) + n, & \text{otherwise}. \end{cases} $$ Assume \( f \) is of the form \( \frac{n(n+1)}{2} \); then $$ f(0) = \frac{0(0+1)}{2} = 0 $$ $$ f(n) = \frac{n(n+1)}{2} = f(n-1) + n = \frac{[n-1]([n-1]+1)}{2} + n $$
Comments
This is only true of recursive functions that work on numbers.
This is only true of recursive functions that work on numbers.
Sorry, what?
Are you commenting on the content or the format?
Sorry, what? Are you commenting on the content or the format?
Just the content. lol
Just the content. lol