Maths Olympiad Prep

Library / /12 of 29

Number theory Difficulty 5.5 AIME, harder Prove it Croatia

S={0,1,1+2,1+2+3,,1+2+3++(n1)}. S = \{0, 1, 1+2, 1+2+3, \dots, 1+2+3+\dots+(n-1)\}.

a) If nn is a power of 22, prove that all the elements of SS have different remainders modulo nn.

b) If nn is not a power of 22, prove that there exist two elements of SS with the same remainder modulo nn.

Solution

Let kk and ll be positive integers such that 0k<ln10 \le k < l \le n-1. Sums 1+2++k1+2+\dots+k and 1+2++l1+2+\dots+l give the same remainder modulo nn if and only if
12k(k+1)12l(l+1)(modn), \frac{1}{2} k (k + 1) \equiv \frac{1}{2} l (l + 1) \pmod{n},
i.e. if and only if l(l+1)k(k+1)=(lk)(l+k+1)l(l+1) - k(k+1) = (l-k)(l+k+1) is divisible by 2n2n.
Notice that lkl-k and l+k+1l+k+1 give a different remainder modulo 22.

a) Let n=2mn = 2^m. Then 2n=2m+12n = 2^{m+1}, and since lkl-k and l+k+1l+k+1 give a different remainder modulo 22, one of them has to be divisible by 2m+12^{m+1}.
On the other hand, clearly lk<2m+1l-k < 2^{m+1}, and we have l+k+12l<2n=2m+1l+k+1 \le 2l < 2n = 2^{m+1}, so none of those numbers is divisible by 2m+12^{m+1}.
We conclude that distinct elements of the set SS give different remainders modulo nn.

b) Let n=2msn = 2^m s where s>1s > 1 is odd.
We have to choose kk and ll, 0k<ln10 \le k < l \le n-1 such that
(lk)(l+k+1)=2n=2m+1s. (l-k)(l+k+1) = 2n = 2^{m+1}s.
If 2m+1s+12^{m+1} \ge s+1 we will choose them so that l+k+1=2m+1l+k+1 = 2^{m+1} and lk=sl-k = s, and if 2m+1s12^{m+1} \le s-1 then we will choose them so that l+k+1=sl+k+1 = s and lk=2m+1l-k = 2^{m+1}.
In the first case solving the system we get l=2m+s12l = 2^m + \frac{s-1}{2} and k=2ms+12k = 2^m - \frac{s+1}{2}. Clearly 0k<l0 \le k < l. Since 2<s2m+112 < s \le 2^{m+1} - 1, it follows that
l=2m+s122m+2m+122=2m+11<2ms1. l = 2^m + \frac{s-1}{2} \le 2^m + \frac{2^{m+1}-2}{2} = 2^{m+1} - 1 < 2^m s - 1.
In the second case we get l=s12+2ml = \frac{s-1}{2} + 2^m and k=s122mk = \frac{s-1}{2} - 2^m. Again it is clear that 0k<l0 \le k < l. Finally, we check
l=s12+2ms12+s12=s12ms1. l = \frac{s-1}{2} + 2^m \le \frac{s-1}{2} + \frac{s-1}{2} = s-1 \le 2^m s - 1.

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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.