f(n+1)= 3*f(n)+6*n+17