Practice problem
Convert the following recursive formula for g(n)g(n)g(n) to an explicit formula. g(0)=0g(0) = 0g(0)=0 g(1)=1g(1) = 1g(1)=1 g(n)=n+g(n−1)g(n) = n + g(n-1)g(n)=n+g(n−1)
g(n)=n+(n−1)g(n) = n+ (n-1)g(n)=n+(n−1)
g(n)=n−1g(n) = n-1g(n)=n−1
g(n)=n(n+1)2g(n) = \frac{ n(n+1)}{2}g(n)=2n(n+1)
g(n)=n−(n−1)g(n) = n- (n-1)g(n)=n−(n−1)
Type a concept, like “slope” or “photosynthesis”.