You need to figure out what the solution is, and then you can use induction to prove it.
To understand the solution is simple.
- + 2.
2, 2+2, 2+2+2, 2+2+2+2, 2+2+2+2+2, ...
:
T(0) = 2
T(n) = T(n-1) + 2;
Solution
T(n) = 2(n+1)
Proof:
T(n) = T(n-1) + 2 => 2((n-1)+1) + 2 = 2(n+1)
Check for n=0
2(0+1)=2
End of proof