Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 4.1.18* (Prove $\sum_{x=1}^{n-1} \left \lfloor \frac{mx}{n} \right \rfloor = \frac{(m-1)(n-1)}{2}$ if $(m,n)=1$)
Exercise 4.1.18* (Prove $\sum_{x=1}^{n-1} \left \lfloor \frac{mx}{n} \right \rfloor = \frac{(m-1)(n-1)}{2}$ if $(m,n)=1$)
If , prove that
Answers
Proof. As in the proof of quadratic reciprocity, consider the set
and
( and are the sets of points in respectively under the line and above the line , whose equation is . Draw a figure for some fixed values of and .)
We note first that no point satisfies , otherwise , where , thus . Since , this is impossible. This prove that is the complementary set of in , so that
Moreover, because of the symmetry of the figure about the point , there are as many points in under the line than above. More formally, consider the maps
This makes sense, because
and similarly .
Moreover , therefore is a bijection, and . This proves that , thus
For a fixed , consider the set
Then
Therefore , where
Thus
In conclusion, if , then
□