recurrence - Iteration method T(n)=T(n-a)+n
Hint: Let's solve the case $a = 1$; I'll leave the generalization to you:
$$
\begin{align*}
T(n) &amp;= n + T(n-1) \\ &amp;=
n + (n-1) + T(n-2) \\ &amp;=
n + (n-1) + (n-2) + T(n-3) \\ &amp;= \cdots \\ &amp;=
n + (n-1) + (n-2) + \cdots + (1) + T(0) \\ &amp;=
\frac{n(n+1)}{2} + T(0).
\end{align*}
$$
In the general case, if $n = ma$ then you'll get $am(m+1)/2 + T(0) \approx n^2/(2a) + T(0)$.