# Proof about floor function: $\lfloor x\rfloor+\lfloor x + \frac{1}{n} \rfloor+\cdots + \lfloor x + \frac{(n-1)}{n} \rfloor = \lfloor nx \rfloor$ [duplicate]

How can we prove that $$\left\lfloor x\right\rfloor + \left\lfloor x + \frac{1}{n} \right\rfloor + \left\lfloor x + \frac{2}{n} \right\rfloor + \cdots + \left \lfloor x + \frac{(n-1)}{n} \right\rfloor = \left\lfloor nx \right \rfloor$$ Where $\lfloor x\rfloor$ denotes greatest integer less than or equal to $x$. I was able to prove it when $n = 2$ or $3$. Please see this link.

But I can't prove it generally. I tried it using Principle of mathematical Induction but couldn't. Can someone prove it using some other way using properties of greatest integer function?

## marked as duplicate by Martin Sleziak, user186170, Did, PSPACEhard, JonMark PerryAug 17 '16 at 8:48

• This is the same question as math.stackexchange.com/questions/5650/… – Martin Sleziak Aug 17 '16 at 8:20
• The answers given there are really hard for me to understand as they are not completely elaborated. Hence I reasked it. – Matt Aug 17 '16 at 9:05
• Raghav Singal: That does not change the fact that you have asked a duplicate question. Moreover, you now say that you have seen the linked question and you did not mention that in your post at all. The right thing to do in your situation would be clearly explain which part of older answers you do not understand and ask about that part, see meta. Or perhaps ask in chat. – Martin Sleziak Aug 17 '16 at 9:08
• BTW here is one more post about the same problem: math.stackexchange.com/questions/403879/… – Martin Sleziak Aug 17 '16 at 9:11
• Thanks for the help, this answer was really simple and elaborate, Now I get it. – Matt Aug 17 '16 at 9:24

Denoting the left hand side with $f(x)$, the right hand side with $g(x)$, show that $f(x+\frac1n)=f(x)+1$ and $g(x+\frac1n)=g(x)+1$. Also show $f(x)=0=g(x)$ for $0\le x<\frac 1n$. Then show by backward and forward induction on $k\in \Bbb Z$ that $f(x)=g(x)$ for all $x$ with $\frac kn\le x<\frac{k+1}n$.
Alternatively, write $x=k+y$ with $k=[x]\in\Bbb Z$ and $y\in[0,1)$, then write $ny=m+z$ with $m=[ny]\in\{0,1,\ldots,n-1\}$ and $z\in[0,1)$ and see what happens if you plug in $x=k+\frac1n m+\frac1nz$.
• How is $f(x)=0$ for $0\le x<\frac 1n$? – Matt Aug 17 '16 at 9:01