# $\left\lfloor x\right\rfloor + \left\lfloor n - x\right\rfloor = n -1$ [closed]

For any integer n and any real number x, if x is not integer then

$$\left\lfloor x\right\rfloor + \left\lfloor n - x\right\rfloor = n -1$$

How to prove this argument?

## closed as off-topic by Did, user99914, Daniel W. Farlow, iadvd, Claude LeiboviciSep 8 '16 at 4:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, Community, Daniel W. Farlow, iadvd, Claude Leibovici
If this question can be reworded to fit the rules in the help center, please edit the question.

Note that $\lfloor n-x\rfloor = n+\lfloor -x\rfloor$ and it should be easy to complete.
Denote $x = i.f$ where $i$ is the integral part of $x$ and $f$ is the fraction part. Because $x$ is not an integer, we know $0 < 0.f < 1$. Therefore, $$\color{blue}{\lfloor x \rfloor} + \color{red}{\lfloor n - x \rfloor} = \color{blue}{\lfloor i.f \rfloor} + \color{red}{\lfloor n - i - 0.f \rfloor} = \color{blue}{i} + \color{red}{n-i-1} = n - 1$$
Since $x$ is not an integer, there is an integer $m$ such that $$m < x < m + 1.$$ It follows additionally that $$n - m - 1 < n - x < n-m.$$ In conclusion, $$\lfloor x \rfloor + \lfloor n - x \rfloor = (m) + (n - m - 1) = n- 1.$$