Maths Olympiad Prep

Library / /15 of 17

Algebra Difficulty 7.8 National Olympiad, round 2 Prove it Balkan Mathematical Olympiad

A natural number nn is given. Determine all (n1)(n-1)-tuples of nonnegative integers a1,a2,,an1a_1, a_2, \dots, a_{n-1} such that
[m2n1]+[2m+a12n1]+[22m+a22n1]+[23m+a32n1]++[2n1m+an12n1]=m \left[ \frac{m}{2^n - 1} \right] + \left[ \frac{2m + a_1}{2^n - 1} \right] + \left[ \frac{2^2m + a_2}{2^n - 1} \right] + \left[ \frac{2^3m + a_3}{2^n - 1} \right] + \dots + \left[ \frac{2^{n-1}m + a_{n-1}}{2^n - 1} \right] = m
holds for all mZm \in \mathbb{Z}.

Solution

Solution 1. We will show that there is a unique such nn-tuple: ak=2n1+2k11a_k = 2^{n-1} + 2^{k-1} - 1 for k=1,,n1k = 1, \dots, n-1.
Write N=2n1N = 2^n - 1 and fk(x)=[2kx+akN]f_k(x) = \left[ \frac{2^k x + a_k}{N} \right] for k=0,1,,n1k = 0, 1, \dots, n-1, where a0=0a_0 = 0. Since
k=0n1fk(m)k=0n1fk(m1)=1, \sum_{k=0}^{n-1} f_k(m) - \sum_{k=0}^{n-1} f_k(m-1) = 1,
for each mZm \in \mathbb{Z}, there is exactly one kk for which fk(m)=fk(m1)+1f_k(m) = f_k(m-1) + 1. We work modulo NN. The last equality holds if and only if 2km+ak{0,1,,2k1}2^k m + a_k \in \{0, 1, \dots, 2^k - 1\}. I.e. if and only if
2km{ak,1ak,,2k1ak}. 2^k m \in \{-a_k, 1-a_k, \dots, 2^k-1-a_k\}.
Multiplying with 2nk2^{n-k}, and noting that 2n1modN2^n \equiv 1 \bmod N, we get the following:
For each mZm \in \mathbb{Z} there is a unique k{0,1,,n1}k \in \{0, 1, \dots, n-1\} such that mBkm \in B_k (modulo NN) where
Bk={bk,bk+2nk,,bk+(2k1)2nk} B_k = \{b_k, b_k + 2^{n-k}, \dots, b_k + (2^k - 1)2^{n-k}\}
with bk=2nkakb_k = -2^{n-k}a_k. Therefore the problem condition is equivalent to k=0n1Bk\bigcup_{k=0}^{n-1} B_k being a partition of {0,1,,N1}\{0, 1, \dots, N-1\}.
For a number bb and set a AZA \subseteq \mathbb{Z} we write b+A={b+a:aA}b + A = \{b + a : a \in A\}. With this notation, Bn1=bn1+{0,2,4,,2n2}B_{n-1} = b_{n-1} + \{0, 2, 4, \dots, 2^n - 2\}. The set Bn2=bn2+{0,4,8,,2n4}B_{n-2} = b_{n-2} + \{0, 4, 8, \dots, 2^n - 4\} is contained in Bn1=bn1+{1,3,,2n3}\overline{B_{n-1}} = b_{n-1} + \{1, 3, \dots, 2^n - 3\}, implying bn2,bn2+2n4Bn1b_{n-2}, b_{n-2} + 2^n - 4 \in \overline{B_{n-1}}, which holds only if bn2bn1+1b_{n-2} \equiv b_{n-1} + 1. Further, the set Bn3=bn3+{0,8,16,,2n8}B_{n-3} = b_{n-3} + \{0, 8, 16, \dots, 2^n - 8\} is contained in Bn1Bn2=bn1+{3,7,,2n5}\overline{B_{n-1}} \cup \overline{B_{n-2}} = b_{n-1} + \{3, 7, \dots, 2^n - 5\}, so we must have bn3bn1+3b_{n-3} \equiv b_{n-1} + 3. Similarly, bn4bn1+7b_{n-4} \equiv b_{n-1} + 7 etc. In general, bnkbn1+2k11b_{n-k} \equiv b_{n-1} + 2^{k-1} - 1 for k=1,,n1k = 1, \dots, n-1. It follows that b0bn1+2n11b_0 \equiv b_{n-1} + 2^{n-1} - 1. On the other hand, we have b0=0b_0 = 0, which gives bn112n1b_{n-1} \equiv 1 - 2^{n-1} and therefore bk2n1k2n1b_k \equiv 2^{n-1-k} - 2^{n-1}. Thus ak2kbk2n+k12n12n1+2k11a_k \equiv -2^k b_k \equiv 2^{n+k-1} - 2^{n-1} \equiv 2^{n-1} + 2^{k-1} - 1 for k=1,,n1k = 1, \dots, n-1.
Finally, kfk(0)=0\sum_k f_k(0) = 0 implies ak<Na_k < N for all kk, so we conclude that ak=2n1+2k11a_k = 2^{n-1} + 2^{k-1} - 1 for each k=1,2,,n1k = 1, 2, \dots, n-1.

Solution 2. We will use the identity
[x]+x+1N+x+2N++x+N1N=[Nx] [x] + \left\lfloor x + \frac{1}{N} \right\rfloor + \left\lfloor x + \frac{2}{N} \right\rfloor + \dots + \left\lfloor x + \frac{N-1}{N} \right\rfloor = [Nx]
which holds for every xRx \in \mathbb{R} and every NNN \in \mathbb{N}. (One can check this by noting that the difference between the two sides of the identity is periodic with period 1/N1/N and that the identity clearly holds for x[0,1N)x \in [0, \frac{1}{N}).)
Writing a0=0a_0 = 0 and N=2n1N = 2^n - 1 we observe that
m=k=0n12km+akN=r=02k1r=02k1m+ak2kN+r2k=k=0n1r=02k1m+ak+rN2kN.(1) m = \sum_{k=0}^{n-1} \left\lfloor \frac{2^k m + a_k}{N} \right\rfloor = \sum_{r=0}^{2^k-1} \sum_{r=0}^{2^k-1} \left\lfloor \frac{m + \frac{a_k}{2^k}}{N} + \frac{r}{2^k} \right\rfloor = \sum_{k=0}^{n-1} \sum_{r=0}^{2^k-1} \left\lfloor \frac{m + \frac{a_k + rN}{2^k}}{N} \right\rfloor . \quad (1)
It follows that cr,k=ak+rN2kc_{r,k} = \left\lceil \frac{a_k+rN}{2^k} \right\rceil are all distinct modulo NN for k=0,1,,n1k = 0, 1, \dots, n-1 and r=0,1,,2k1r = 0, 1, \dots, 2^k - 1. Indeed if two (or more) of them are congruent to tt, then writing f(t)f(t) for the right hand side of (1) we get 1=f(t)f(t1)21 = f(-t) - f(-t-1) \ge 2, a contradiction.
Since N=2n1N = 2^n - 1, then cr,k=r2nk+dr,kc_{r,k} = r2^{n-k} + d_{r,k}, where dr,k=akr2kd_{r,k} = \left\lceil \frac{a_k-r}{2^k} \right\rceil. Because c0,0=0c_{0,0} = 0, then c0,k0c_{0,k} \ne 0 for each k0k \ne 0 giving ak2ka_k \ge 2^k for each k1k \ge 1. Setting m=0m = 0 in the original equation gives ak<Na_k < N for each kk and so d0,k2nk1d_{0,k} \le 2^{n-k} - 1 for each kk. Furthermore
2nk1d0,kd1,kd2k1,kd2k,k=d0,k10.(2) 2^{n-k} - 1 \ge d_{0,k} \ge d_{1,k} \ge \dots \ge d_{2^k-1,k} \ge d_{2^k,k} = d_{0,k} - 1 \ge 0. \quad (2)
In particular 0cr,k=r2nk+dr,k(2n2nk)+(2nk1)=N0 \le c_{r,k} = r2^{n-k} + d_{r,k} \le (2^n - 2^{n-k}) + (2^{n-k} - 1) = N. For k=0,1,2,,n1k = 0, 1, 2, \dots, n-1 define Ak={cr,k:r=0,1,,2k1}A_k = \{c_{r,k} : r = 0, 1, \dots, 2^k - 1\}. From the above, since A0={0}A_0 = \{0\}, we must have that A1A2An1={1,2,,N1}A_1 \cup A_2 \cup \dots \cup A_{n-1} = \{1, 2, \dots, N-1\}.
For a natural number tt let v2(t)v_2(t) be as usual the largest exponent such that 2v2(t)t2^{v_2(t)}|t. Let
f(t)=nv2(t)1,g(t)=t2v2(t)21+v2(t),andh(t)=2f(t)1g(t). f(t) = n - v_2(t) - 1, \quad g(t) = \frac{t - 2^{v_2(t)}}{2^{1+v_2(t)}} , \quad \text{and} \quad h(t) = 2^{f(t)} - 1 - g(t).
Note that f(t)f(t) uniquely determines v2(t)v_2(t) and together with g(t)g(t) they uniquely determine tt. Similarly h(t)h(t) and g(t)g(t) uniquely determine tt.
Claim. For each t{1,2,,2n11}t \in \{1, 2, \dots, 2^{n-1} - 1\} we have:
(i) dg(t),f(t)=2v2(t)d_{g(t),f(t)} = 2^{v_2(t)},
(ii) dh(t),f(t)=2v2(t)1d_{h(t),f(t)} = 2^{v_2(t)} - 1,
(iii) cg(t),f(t)=tc_{g(t),f(t)} = t,
(iv) ch(t),f(t)=Ntc_{h(t),f(t)} = N - t.
Proof of Claim. We proceed by induction on tt. For t=1t = 1 we have v2(1)=0,f(1)=n1,g(1)=0v_2(1) = 0, f(1) = n-1, g(1) = 0 and h(1)=2n11h(1) = 2^{n-1} - 1. From (2) we have 1d0,n11 \ge d_{0,n-1} and d0,n110d_{0,n-1} - 1 \ge 0 proving (i). Also, cg(1),f(1)=c0,n1=d0,n1=1c_{g(1),f(1)} = c_{0,n-1} = d_{0,n-1} = 1 proving (iii). From (2) we have 1d2n11,n101 \ge d_{2^{n-1}-1,n-1} \ge 0. But c2n11,n1=2n2+d2n11,n1=N1+d2n11,n1c_{2^{n-1}-1,n-1} = 2^n - 2 + d_{2^{n-1}-1,n-1} = N - 1 + d_{2^{n-1}-1,n-1}. Since c2n11,n1N1c_{2^{n-1}-1,n-1} \le N-1 we deduce both (ii) and (iv).
Assume now that the result is true for t=s1t = s - 1. We will prove the result for t=st = s.
Case 1: If s1=2us - 1 = 2u is even, then v2(s)=0v_2(s) = 0, so f(s)=n1,g(s)=uf(s) = n-1, g(s) = u and h(s)=2n11uh(s) = 2^{n-1} - 1 - u.
By the induction hypothesis, since all the cr,kc_{r,k}'s are distinct, we must have
scg(s),f(s)=2u+dg(s),f(s)=s1+dg(s),f(s) s \le c_{g(s),f(s)} = 2u + d_{g(s),f(s)} = s - 1 + d_{g(s),f(s)}
and
Nsch(s),f(s)=2n22u+dh(s),f(s)=Ns+dh(s),f(s). N - s \ge c_{h(s),f(s)} = 2^n - 2 - 2u + d_{h(s),f(s)} = N - s + d_{h(s),f(s)}.
From the above we must have dg(s),f(s)1d_{g(s),f(s)} \ge 1 and dh(s),f(s)0d_{h(s),f(s)} \le 0. But from (2) any two dr,kd_{r,k}'s for fixed kk differ by at most 1. This can only be achieved if we have equalities everywhere proving (i)-(iv).
Case 2: If s1=2u+1s - 1 = 2u + 1 is odd, then we write s=2u+2=2vws = 2u + 2 = 2^v w for some odd ww. Then v2(s)=vv_2(s) = v and so k=f(s)=n1vk = f(s) = n - 1 - v and r=g(s)=(w1)/2r = g(s) = (w - 1)/2. Also h(s)=2k1rh(s) = 2^k - 1 - r. By the induction hypothesis we must have
scr,k=r2nk+dr,k=2v(w1)+dr,k=s2v+dr,k s \le c_{r,k} = r2^{n-k} + d_{r,k} = 2^v(w-1) + d_{r,k} = s - 2^v + d_{r,k}
and
Nsch(s),k=(2k1r)2nk+dh(s),k=2n2v+1s+2v+dh(s),k=N+1s2v+dh(s),k. \begin{align*} N - s \ge c_{h(s),k} &= (2^k - 1 - r)2^{n-k} + d_{h(s),k} \\ &= 2^n - 2^{v+1} - s + 2^v + d_{h(s),k} \\ &= N + 1 - s - 2^v + d_{h(s),k}. \end{align*}
From the above we must have dr,k2vd_{r,k} \ge 2^v and dh(s),k2v1d_{h(s),k} \le 2^v - 1. As in Case 1 we must have equalities everywhere proving (i)-(iv). \square
For t=2n12nk1t = 2^{n-1} - 2^{n-k-1} we have v2(t)=nk1,f(t)=k,g(t)=2k11v_2(t) = n-k-1, f(t) = k, g(t) = 2^{k-1}-1 and h(t)=2k1(2k11)=2k1h(t) = 2^k - 1 - (2^{k-1}-1) = 2^{k-1}. Thus from (ii) and (iv) we get
[ak(2k11)2k]=2nk1and[ak2k12k]=2nk11. \left[ \frac{a_k - (2^{k-1} - 1)}{2^k} \right] = 2^{n-k-1} \quad \text{and} \quad \left[ \frac{a_k - 2^{k-1}}{2^k} \right] = 2^{n-k-1} - 1.
This is only possible if ak=2k2nk1+(2k11)=2n1+2k11a^k = 2^k \cdot 2^{n-k-1} + (2^{k-1}-1) = 2^{n-1} + 2^{k-1} - 1 as required.

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.