I have to solve the following recurrence. $$\begin{gather} T(n) = T(n − 3) + 1/2\\ T(0) = T(1) = T(2) = 1. \end{gather}$$
I tried solving it using the forward iteration. $$\begin{align} T(3) &= 1 + 1/2\\ T(4) &= 1 + 1/2\\ T(5) &= 1 + 1/2\\ T(6) &= 1 + 1/2 + 1/2 = 2\\ T(7) &= 1 + 1/2 + 1/2 = 2\\ T(8) &= 1 + 1/2 + 1/2 = 2\\ T(9) &= 2 + 1/2 \end{align}$$
I couldnt find any sequence here. can anyone help!
It’s just three copies of a single recurrence interlaced with one another. The three copies are the sequences $\langle T(3n):n\in\Bbb N\rangle$, $\langle T(3n+1):n\in\Bbb N\rangle$, and $\langle T(3n+2):n\in\Bbb N\rangle$. Each looks just like the sequence defined by $S(0)=1$ and $S(n)=S(n-1)+\frac12$ for $n\ge 1$, which pretty clearly has the closed form $S(n)=\frac{n}2$.
How does $T(n)$ compare with $S\left(\left\lfloor\frac{n}3\right\rfloor\right)$?