Maths Olympiad Prep

Library / /463 of 520

Number theory Difficulty 7.0 National olympiad, round 2 Prove it

Example 6 Let m,nm, n be positive integers, find the necessary and sufficient condition for the equation
i=0mn1(1)[im]+[in]=0\sum_{i=0}^{m n-1}(-1)\left[\frac{i}{m}\right]+\left[\frac{i}{n}\right]=0

to hold.

Solution

Let
fm,n(i)=[im]+[in],S(m,n)=i=0mn1(1)fm,nn(i),f_{m, n}(i)=\left[\frac{i}{m}\right]+\left[\frac{i}{n}\right], S(m, n)=\sum_{i=0}^{m n-1}(-1)^{f_{m, n} n^{(i)}},

The problem is equivalent to finding the necessary and sufficient condition for S(m,n)=0S(m, n)=0.
Case 1: Both mm and nn are odd. In this case, S(m,n)S(m, n) is the sum of an odd number (mn)(m n) of odd numbers, so S(m,n)0S(m, n) \neq 0.

Case 2: One of mm and nn is odd, and the other is even. In this case, for 0imn10 \leqslant i \leqslant m n-1, we have
fm,n(mni1)=[mni1m]+[mni1n]=m+n+[i+1m]+[i+1n]\begin{aligned} f_{m, n}(m n-i-1) & =\left[\frac{m n-i-1}{m}\right]+\left[\frac{m n-i-1}{n}\right] \\ & =m+n+\left[-\frac{i+1}{m}\right]+\left[-\frac{i+1}{n}\right] \end{aligned}

We need the following result: For mN,iNm \in \mathbf{N}^{*}, i \in \mathbf{N},
[im]+[i+1m]=1\left[\frac{i}{m}\right]+\left[-\frac{i+1}{m}\right]=-1

In fact, let im=k+α,kN,0α<1\frac{i}{m}=k+\alpha, k \in \mathbf{N}, 0 \leqslant \alpha<1, then [im]=k\left[\frac{i}{m}\right]=k, and 0αm1m0 \leqslant \alpha \leqslant \frac{m-1}{m}. At this time,
i+1m=kα1mkm1m1m=k1,-\frac{i+1}{m}=-k-\alpha-\frac{1}{m} \geqslant-k-\frac{m-1}{m}-\frac{1}{m}=-k-1,

and
i+1m=kα1mk1m<k-\frac{i+1}{m}=-k-\alpha-\frac{1}{m} \leqslant-k-\frac{1}{m}<-k

Therefore,
[i+1m]=(k+1)\left[-\frac{i+1}{m}\right]=-(k+1)

This shows that (8) holds.
From (8) and (7), we know
fm,n(mni1)=m+n1[im]1[in]=m+n2fm,n(i)fm,n(i)+1(mod2)\begin{aligned} f_{m, n}(m n-i-1) & =m+n-1-\left[\frac{i}{m}\right]-1-\left[\frac{i}{n}\right] \\ & =m+n-2-f_{m, n}(i) \\ & \equiv f_{m, n}(i)+1(\bmod 2) \end{aligned}

Thus, by pairing the first and last terms in the sum S(m,n)S(m, n) (noting that the number of terms mnm n is even), we can see that S(m,n)=0S(m, n)=0.

Case 3: Both mm and nn are even. Let m=2k,n=2lm=2 k, n=2 l. Since for any pN,jNp \in \mathbf{N}^{*}, j \in \mathbf{N}, we have [2j2p]=[2j+12p]\left[\frac{2 j}{2 p}\right]=\left[\frac{2 j+1}{2 p}\right], therefore, S(m,n)S(m, n) is twice the sum of all even i(0,2,,mn2)i (0, 2, \cdots, m n-2), i.e.,
S(m,n)=2i=02H1(1)fm,n(i=2i=02H1(1)fk,l(i)=2(S(k,l)+i=kl2H1(1)fk,l(i))=2(S(k,l)+i=0k1(1)k+l(1)fk,l(i(i))=2S(k,l)(1+(1)k+l)\begin{aligned} S(m, n) & =2 \sum_{i=0}^{2 H-1}(-1)^{f_{m, n^{(i}}}=2 \sum_{i=0}^{2 H-1}(-1)^{f_{k, l^{(i)}}} \\ & =2\left(S(k, l)+\sum_{i=k l}^{2 H-1}(-1)^{f_{k, l^{(i)}}}\right) \\ & =2\left(S(k, l)+\sum_{i=0}^{k-1}(-1)^{k+l} \cdot(-1)^{f_{k, l^{(i}}(i)}\right) \\ & =2 S(k, l)\left(1+(-1)^{k+l}\right) \end{aligned}

By replacing k,lk, l with m,nm, n and repeating the above discussion until k,lk, l are not both even, we find that the necessary and sufficient condition for S(m,n)=0S(m, n)=0 is: the exponents of 2 in the prime factorizations of mm and nn are different.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.