Recursive function definition: The given recursive function is defined as follows:g(1)=0g(n)=g(n−1)+nWe need to find the value of g(2).Since we know g(1), we can use it to find g(2) by substituting n=2 into the recursive formula.
Finding g(2): Using the recursive formula:g(2)=g(2−1)+2g(2)=g(1)+2We know that g(1)=0, so we substitute that value in:g(2)=0+2g(2)=2
More problems from Evaluate recursive formulas for sequences