Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$T(N) = N + T(N-3)$

This is what I got so far

$$\begin{align}&= T(N-6) + (N-3)+N\\ &= T(N-9) + (N-6) + (N-3)+N \\ &= T(N-12) + (N-9) + (N-6) + (N-3)+ N\end{align}$$

I think I should use $(n^2 + n) / 2$.

im not sure if im doing it right or not!

Thanks :)

share|cite|improve this question
Welcome to math.SE! It's not hard to type formulas properly here: see this tutorial. For now, I formatted the formulas in your post. – user53153 Feb 6 '13 at 5:12
$N,N-3,N-6,N-9,\ldots$ form an arithmetic progression. Use the formula for the sum of an AP – dexter04 Feb 6 '13 at 5:12

Note: we generally express functions of integer arguments with subscripts, i.e. $T_n$ rather than $T(n)$.

This is a constant-coefficient difference equation. To specify the solution, you need three initial conditions, say, $T_1$, $T_2$, and $T_3$. In general, the solution takes the form

$$T_n = T_n^{(H)} + T_n^{(I)}$$

where $T_n^{(H)}$ is a homogeneous solution satisfying

$$T_n^{(H)} - T_{n-3}^{(H)} = 0$$

and the initial conditions, and $$T_n^{(I)}$ is an inhomogeneous solution satisfying

$$T_n^{(I)} - T_{n-3}^{(I)} = n$$

The homogeneous piece takes the form $a r^n$ for some (potentially complex) value of $r$. When we plug this into the homogeneous equation, we get


which has solutions $r=1$, $r=\omega = e^{i 2 \pi/3}$, and $r=\omega^2 = e^{i 4 \pi/3}$. The homgeneous solution is then a linear combination of the solutions corresponding to these roots, i.e.,

$$T_n^{(H)} = A + B \omega^n + C \omega^{2 n}$$

where the constants $A$, $B$, and $C$ are determined by the initial conditions.

The inhomogeneous solution is determined by the factor of $n$, and because of the nature of the equation (a difference), we guess it takes the form $T_n^{(I)} = P n + Q n^2$. Plugging this into the equation, we see that

$$3 P + (6 n-9) Q = n$$

which implies that $Q = 1/6$ and $P = 1/2$. The general solution to the equation is then

$$T_n = A + B \omega^n + C \omega^{2 n} + \frac{1}{6} n (n+3)$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.