Math Help - Floor Function

1. Floor Function

Prove:
$\displaystyle\left \lfloor \frac{n}{2} \right \rfloor=\frac{n-1}{2} \ \mbox{if n is odd}$

Since n is odd, $\displaystyle n=2p+1 \ \ni \ p\in\mathbb{Z}$

$\displaystyle\left \lfloor \frac{2p+1}{2} \right \rfloor$ but I am not sure how that will help.

2. As a hint, consider $\frac{2p+1}{2}=p+\frac{1}{2}$. Then, $\lfloor p+\frac{1}{2}\rfloor=p$.

3. I have that down as well but don't see the connection.

4. Then what is $\frac{n-1}{2}$?

It is $\frac{n-1}{2}=\frac{(2p+1)-1}{2}=\frac{2p}{2}=p$.