recursive functions

chance1

New member
Joined
Mar 14, 2010
Messages
1
refresh me on how to solve:
g(x) = {-12 if x = 0
{ g (x-1) + x, if x > 0
 
For a closed form I'm betting?

g(0)=-12
g(1)=g(0)+1=-11
g(2)=g(1)+2=-9
g(3)=g(2)+3=-6
...

The common difference is the input.

g(x) = -12+x(x+1)/2

This is easy to prove for INTEGER values, and I'm suspecting that is what is being asked. If not, report back.
 
Top