T(1)=1; T(n) = n^2 + n/2 - 1 + T(n/2)