# For all $x$ which are real numbers, prove that $\lfloor 2x\rfloor = \lfloor x\rfloor + \lfloor x+0.5\rfloor.$ [duplicate]

For all $x$ which are real numbers, prove that $$\lfloor 2x\rfloor = \lfloor x\rfloor + \lfloor x+0.5\rfloor.$$

I know that

Let $\lfloor x\rfloor = n$

$n \leq x < n+1$

## marked as duplicate by Marnix Klooster, N. F. Taussig, user147263, John B, Daniel W. FarlowFeb 28 '16 at 0:23

• Use $\lfloor x\rfloor$ to show $\lfloor x\rfloor$. Formatting tips here. – Em. Feb 17 '16 at 1:50
• Well your def. for floor could use a little rewording. – ThisIsNotAnId Feb 17 '16 at 1:50
• Divide the case $0\le \{x\} < 1/2$ and $1/2 \le \{x\} < 1$, where $\{x\}:=x-\lfloor x\rfloor$ is the fractional part of $x$. – Hanul Jeon Feb 17 '16 at 1:50
• I think this is a special case of $\lfloor nx \rfloor = \sum_{k=0}^{n-1} \lfloor \frac{k}{n} x \rfloor$. – marty cohen Feb 17 '16 at 1:58
• I think this is a special case of $\lfloor nx \rfloor = \sum_{k=0}^{n-1} \lfloor x+\frac{k}{n} \rfloor$. (first version had a mistake) – marty cohen Feb 17 '16 at 2:17

Let $x = i + d$ where $0 \le d < 1$

$\lfloor 2x \rfloor = \lfloor 2i + 2d \rfloor = 2i + \lfloor 2d \rfloor$

$\lfloor x \rfloor + \lfloor x + 0.5 \rfloor = 2i + \lfloor d \rfloor + \lfloor d + 0.5 \rfloor$

So we reduced the problem to just show for $d$

Suppose $0 \le d < 0.5$, then both sides are just $2d$

Suppose $0.5 \le d < 1$, then both sides are just $d + 1$.

QED $\blacksquare$

I am assuming $\lfloor x\rfloor = n$

Let's take two cases - one - the fractional part of $x$ is less than $0.5$
LHS will be $2n$ RHS will be $n+n$

case two - The fractional part of $x$ is greater than $0.5$
LHS will be $2n+1$ RHS will be $n+n+1$

Hence, proved.

• You should describe what $n$ is formally, Otherwise, the proof seems to be on point. – ThisIsNotAnId Feb 17 '16 at 3:24
• @ThisIsNotAnId The question said so. Anyway, I edited. – Win Vineeth Feb 17 '16 at 3:31

I will try to show $\lfloor nx \rfloor = \sum_{k=0}^{n-1} \lfloor x+\frac{k}{n} \rfloor$.

Let $m = \lfloor x \rfloor$ and $d = x - m$, so $0 \le d < 1$.

Let $j =\lfloor nd \rfloor$, so $0 \le j \le n-1$ and $\frac{j}{n} \le d < \frac{j+1}{n}$. If $0 \le k \le n-j-1$,

$\begin{array}\\ m &\le m+d+\frac{k}{n}\\ &< m+\frac{n-j}{n}+\frac{j}{n}\\ &= m+\frac{n}{n}\\ &= m+1\\ \end{array}$

so $\lfloor m+d+\frac{k}{n} \rfloor =m$.

If $n-j \le k \le n-1$,

$\begin{array}\\ m+d+\frac{k}{n} &\ge m+\frac{n-j}{n}+\frac{j}{n}\\ &= m+\frac{n}{n}\\ &= m+1\\ \end{array}$

and

$\begin{array}\\ m+d+\frac{k}{n} &\lt m+\frac{n-j+1}{n}+\frac{n-1}{n}\\ &= m+\frac{2n-j}{n}\\ &= m+2-\frac{j}{n}\\ \end{array}$

so $\lfloor m+d+\frac{k}{n} \rfloor =m+1$.

Therefore

$\begin{array}\\ \sum_{k=0}^{n-1} \lfloor x+\frac{k}{n} \rfloor &=\sum_{k=0}^{n-1} \lfloor m+d+\frac{k}{n} \rfloor\\ &= \sum_{k=0}^{n-j-1} \lfloor m+d+\frac{k}{n} \rfloor +\sum_{k=n-j}^{n-1} \lfloor m+d+\frac{k}{n} \rfloor\\ &= (n-j)m+j(m+1)\\ &= nm+j\\ \end{array}$

and $\lfloor nx \rfloor =\lfloor n(m+d) \rfloor =nm+\lfloor nd \rfloor =nm+j$.

We are done.

$n\leq x< n+1$ , then $f(x)=n$ for all $x$

I) If $n<x< \frac{2n+1}{2}$

$f(x)+f(x+0.5)= n+n=2n=f(2x)$

since $x+0.5<\frac{2n+1}{2} + \frac{1}{2}=n+1$

II) If $n+1>x\geq \frac{2n+1}{2}$

$f(x)+f(x+0.5)= n+n+1=2n+1=f(2x)$

Since $x+0.5\geq\frac{2n+1}{2} + \frac{1}{2}=n+1$