# Showing that $\lfloor\frac{x-1}3\rfloor=\lfloor\frac{x}3+\frac23\rfloor-1$ and $\lfloor\frac{x+1}3\rfloor=\lfloor\frac{x}3+\frac13\rfloor$.

I have 2 questions about the floor functions:

1) $$\left\lfloor \frac{x-1}{3}\right\rfloor =\left\lfloor \frac{x}{3}+\frac{2}{3}\right\rfloor -1$$

2) $$\left\lfloor \frac{x+1}{3}\right\rfloor =\left\lfloor \frac{x}{3}+\frac{1}{3}\right\rfloor$$

As we know that the definitions and properties of floor functions are:

1) $$\lfloor x\rfloor =m$$ if $$m\leq x and

2) $$\lfloor m+x\rfloor =\lfloor x\rfloor +m$$ if $$m$$ is an integer.

Questions:

1) Why the first floor function above has to +1 inside the floor brackets and -1 outside the floor brackets: $$\left\lfloor \frac{x-1}{3}\right\rfloor$$ = $$\left\lfloor \frac{x-1}{3}+1\right\rfloor -1$$ = $$\left\lfloor \frac{x}{3}+\frac{2}{3}\right\rfloor -1$$

2)Why the second floor function above doesn't need to add or minus 1 inside or outside the floor brackets: $$\left\lfloor \frac{x+1}{3}\right\rfloor$$ = $$\left\lfloor \frac{x}{3}+\frac{1}{3}\right\rfloor$$

Does anyone here know the reason? Thank you.

• This is hard to read. here is a good tutorial on formatting for this site.
– lulu
Sep 9, 2019 at 12:23
• Thank you so much.
– Kuan
Sep 9, 2019 at 13:35

An integer number can freely cross the floor delimiters. For all real $$a$$ and integer $$n$$,

$$\lfloor a+n\rfloor=\lfloor a\rfloor+n.$$

This is enough to justify the claims.

• The problems are $\frac{-1}{3}$ of $\left\lfloor \frac{x-1}{3}\right\rfloor$ is not an integer, where $\frac{x}{3}$ is real number. Also, $\frac{1}{3}$ of $\left\lfloor \frac{x+1}{3}\right\rfloor$ is not an integer, where $\frac{x}{3}$ is a real number..
– Kuan
Sep 9, 2019 at 13:32
• @Kuan: think twice. Also note that the question 2) has absolutely nothing to do with the floor.
– user65203
Sep 9, 2019 at 13:35
• Is this because $\left\lfloor -\frac{1}{3}\right\rfloor =-1$ of $\left\lfloor \frac{x-1}{3}\right\rfloor$? But, can we do it likes $\left\lfloor \frac{x-1}{3}\right\rfloor =\left\lfloor \frac{x}{3}\right\rfloor +\left\lfloor -\frac{1}{3}\right\rfloor$? This is because $\left\lfloor \frac{x-1}{3}\right\rfloor \neq \left\lfloor \frac{x}{3}\right\rfloor +\left\lfloor -\frac{1}{3}\right\rfloor$. For example: let x=4, $\left\lfloor \frac{x-1}{3}\right\rfloor =1$ and $\left\lfloor \frac{x}{3}\right\rfloor +\left\lfloor -\frac{1}{3}\right\rfloor =1-1=0$.
– Kuan
Sep 9, 2019 at 13:48
• @Kuan: use the given property !!!
– user65203
Sep 9, 2019 at 14:12

If n is an integer, then $$\lfloor x + n \rfloor = \lfloor x \rfloor + n$$.

\begin{align} \left\lfloor\frac{x-1}3 \right\rfloor &= \left\lfloor\frac{x-1}3 \right\rfloor + 1 - 1 \\ &= \left\lfloor\frac{x-1}3 + 1\right\rfloor - 1 \\ &= \left\lfloor\frac x3 + \frac 23 \right\rfloor - 1 \end{align}

The second is true because $$\dfrac{x+1}3 = \dfrac x3 + \dfrac 13$$.

I did it finally.

Definition: $$\lfloor x\rfloor =m$$ if $$m\leq x.

So, $$\left\lfloor \frac{x-1}{3}\right\rfloor =\frac{m-1}{3}$$ if $$\frac{m-1}{3}\leq \frac{x-1}{3}<\frac{m-1}{3}+1$$.

Then, $$\left\lfloor \frac{x-1}{3}\right\rfloor =\frac{m-1}{3}=\left\lfloor \frac{x-1}{3}\right\rfloor$$, where $$\lfloor x\rfloor =m$$.

Next, $$\left\lfloor \frac{x+2}{3}\right\rfloor -1=\frac{m+2}{3}-1$$ if $$\frac{m+2}{3}-1\leq \frac{x+2}{3}-1<\frac{m+2}{3}$$.

$$\frac{m+2}{3}-1=\frac{1}{3} (m+2-3)=\frac{m-1}{3}=\left\lfloor \frac{x-1}{3}\right\rfloor$$.

Thus, $$\left\lfloor \frac{x-1}{3}\right\rfloor =\left\lfloor \frac{x+2}{3}\right\rfloor -1$$.