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 ( m , n ) = 1 , prove that

x = 1 n 1 mx n = ( m 1 ) ( n 1 ) 2 .

Answers

Proof. As in the proof of quadratic reciprocity, consider the set

E = [ [ 1 , m 1 ] ] × [ [ 1 , n 1 ] ]

and

A = { ( i , j ) E ni > mj } , B = { ( i , j ) E ni < mj } .

( A and B are the sets of points in E respectively under the line D and above the line D , whose equation is nx + my = 0 . Draw a figure for some fixed values of m and n .)

We note first that no point ( i , j ) E satisfies ni = mj , otherwise n mj , where n m = 1 , thus n j . Since 1 j < n , this is impossible. This prove that B is the complementary set of A in E , so that

E = A B , A B = .

Moreover, because of the symmetry of the figure about the point ( m 2 , n 2 ) , there are as many points in E under the line D than above. More formally, consider the maps

φ { A B ( i , j ) ( m i , m j ) , ψ { B A ( i , j ) ( m i , m j ) ,

This makes sense, because

( i , j ) A ni < mj n ( m i ) > m ( n j ) ( m i , n j ) B ,

and similarly ( i , j ) B ( m i , n i ) A .

Moreover ψ φ = 1 A , φ ψ = 1 B , therefore φ is a bijection, and ψ = φ 1 . This proves that | A | = | B | , thus

| A | = | E | 2 = ( m 1 ) ( n 1 ) 2 .

For a fixed i 0 [ [ 1 , m 1 ] ] , consider the set

A i 0 = { ( i 0 , j ) E n i 0 > mj } .

Then

A = i = 1 m 1 A i ( disjoint union) .

Therefore | A | = i = 1 m 1 | A i | , where

| A i | = Card { j [ [ 1 , n 1 ] ] j < i n m } = i n m .

Thus

( m 1 ) ( n 1 ) 2 = | A | = i = 1 m 1 i n m .

In conclusion, if m n = 1 , then

x = 1 n 1 mx n = ( m 1 ) ( n 1 ) 2 .

User profile picture
2024-12-15 10:50
Comments