So base case would be
if n = 1 then 2
I'm trying to figuring out what would be the recursive case.
n= 1 f(1) = 2
n= 2 f(2) = 2 + 4 = 6
n= 3 f(3) = 2 + 4 + 6 = 12
n= 4 f(4) = 2 + 4 + 6 + 8 = 20
n= 5 f(5) = 2 + 4 + 6+ 8 + 10 = 30
I thought n(n+1) would be the recursive case but it's a closed-formula.
need help !
comments: