Maths Olympiad Prep

Library / CroatianCompetitions /12 of 28

CroatianCompetitions

Number theory Difficulty 5.5 AIME, harder Prove it Croatia

S={0,1,1+2,1+2+3,…,1+2+3+⋯+(n−1)}. 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 0≤k<l≤n−10 \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)=(l−k)(l+k+1)l(l+1) - k(k+1) = (l-k)(l+k+1) is divisible by 2n2n.
Notice that l−kl-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 l−kl-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 l−k<2m+1l-k < 2^{m+1}, and we have l+k+1≤2l<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, 0≤k<l≤n−10 \le k < l \le n-1 such that
(l−k)(l+k+1)=2n=2m+1s. (l-k)(l+k+1) = 2n = 2^{m+1}s.
If 2m+1≥s+12^{m+1} \ge s+1 we will choose them so that l+k+1=2m+1l+k+1 = 2^{m+1} and l−k=sl-k = s, and if 2m+1≤s−12^{m+1} \le s-1 then we will choose them so that l+k+1=sl+k+1 = s and l−k=2m+1l-k = 2^{m+1}.
In the first case solving the system we get l=2m+s−12l = 2^m + \frac{s-1}{2} and k=2m−s+12k = 2^m - \frac{s+1}{2}. Clearly 0≤k<l0 \le k < l. Since 2<s≤2m+1−12 < s \le 2^{m+1} - 1, it follows that
l=2m+s−12≤2m+2m+1−22=2m+1−1<2ms−1. 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=s−12+2ml = \frac{s-1}{2} + 2^m and k=s−12−2mk = \frac{s-1}{2} - 2^m. Again it is clear that 0≤k<l0 \le k < l. Finally, we check
l=s−12+2m≤s−12+s−12=s−1≤2ms−1. 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,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.